Open Source · Self-hosted · AI-assisted Knowledge Base

Your personal knowledge base
for every Agent you run

Capture notes, documents, conversations, rules, procedures, and source evidence in one private knowledge base. AI helps you organize and retrieve it, while each Agent gets only the context you allow. Share or publish selected knowledge when you choose.

AI-assisted knowledge baseCross-Agent contextWiki + MCPPrivate by defaultSelective sharing
~/next-wiki — zsh

$ git clone https://github.com/hugogu/next-wiki.git

$ cd next-wiki && cp .env.example .env

$ docker compose up -d --build

# One knowledge base, multiple named Agents

✓ ready — http://localhost:3000

# MCP delivers the context each Agent is allowed to use

// Show, don't tell

Try it live — no signup, no install

A real running next-wiki instance, seeded with sample content, embedded right here. It is a genuine app, not a recorded walkthrough — click through pages, search, and the AI chat exactly as a self-hosted install would behave.

Open in new tab
next-wiki-demo.hugogu.cnRead-only demo

1 command

docker compose to launch your knowledge base

Wiki + MCP

one knowledge store for people and Agents

100%

every save is an immutable revision

Private first

share only the context you approve

// Why next-wiki

An AI-assisted knowledge base for people and Agents

Write and organize knowledge like a wiki, then let every Agent retrieve the context it is allowed to use. Sources, revisions, memory, and sharing stay visible to the owner.

AI-assisted knowledge capture

Use AI chat, MCP, or the manual editor to turn conversations, source material, decisions, and working notes into durable knowledge without making a live model connection a requirement.

A real knowledge base

Keep Markdown pages, documents, source evidence, decisions, and revisions in a readable wiki with search, links, history, and citations.

One knowledge base, many Agents

The product model is one owner with multiple explicit Agent identities. Each Agent can keep private context, while shared namespaces are deliberate, reviewable, and auditable.

Private by default

Self-host the store and keep private context inside its intended scope. PostgreSQL is the only required stateful service; integrations remain optional.

Every change has a trail

Immutable revisions, soft deletion, diffs, and source attribution make it possible to understand what changed, where it came from, and how to roll it back.

Controlled sharing & publication

Share selected, reviewed knowledge as Agent context, a portable instruction file, or a public page — never as an accidental mirror of private memory.

Open Agent access

MCP, REST + OpenAPI, and Markdown + frontmatter keep context portable across Agent clients, local tools, and future runtimes.

Grounded integrations

Connect optional integrations such as Feishu to ask grounded questions and receive events, while the core context store remains independent of any one platform.

// From knowledge to Agent context

One knowledge base, many Agents, controlled context

The Web UI is for writing and reviewing knowledge. MCP-connected Agents use the same permission-scoped store, each receiving only the context its owner allows.

The context loop

Conversation / source / command output
Knowledge captured with source and scope
Agent retrieval, synthesis & drafts
Owner review & selective sharing
Knowledge you can reuse as Agent context

Knowledge workspace

Wiki · AI chat · revisions

Context & memory layer

Scopes · provenance · sharing

MCP + Agents

retrieve · propose · write

Connects to:ClaudeCursorAny MCP clientOpenClaw

Two ways to build knowledge today

Copilot

Default · Knowledge base

Humans and AI collaborate in the default wiki space — the simplest way to turn conversations and working notes into durable context.

LLM Wiki

Advanced · Memory pipeline

Keep append-only source material separate from AI-produced concepts so evidence, synthesis, and selective publication can be reviewed independently.

Both modes build toward Agent-specific context, explicit shared namespaces, and version-aware context packs.

// Tech stack

Modern, restrained, all open source

Only the necessary dependencies — every layer is a mainstream, replaceable open-source choice.

App framework

  • Next.js 16 · App Router
  • React 19
  • TypeScript 5
  • Tailwind CSS
  • next-intl (en/zh)

Data & jobs

  • PostgreSQL 16 + pgvector
  • Drizzle ORM
  • pg-boss jobs
  • Local / S3 content backends
  • Git sync (one-way)

AI & rendering

  • Built-in MCP tool runtime
  • @next-wiki/mcp-server
  • remark / rehype + KaTeX + Mermaid
  • OpenRouter · Anthropic · Kimi · Z.ai
  • OpenAPI public API

Engineering

  • Turborepo Monorepo
  • pnpm
  • Docker Compose
  • Vitest + Playwright
  • Caddy + Cloudflare

// Quick start

Four steps to your own AI-assisted knowledge base

01

Clone the repo

All you need is Docker with Docker Compose.

02

Configure env

Copy .env.example; adjust ports and the encryption key as needed.

03

One-command launch

First run migrates the database and seeds itself automatically.

04

Start building knowledge

Open localhost:3000, write pages, let AI help, and connect an MCP client when you are ready.

terminal

$ git clone https://github.com/hugogu/next-wiki.git

$ cd next-wiki

$ cp .env.example .env

$ docker compose up -d --build

# Open your browser

→ http://localhost:3000

Build knowledge once. Give every Agent the context it needs.

Private by default, explicit when shared, portable when published. Apache-2.0 licensed — stars, issues, and contributions are welcome.

Visit GitHub