What is agent2kb?
agent2kb is an open-source knowledge compiler for AI agent teams. Agents, bots and people add sources (web pages, PDFs, videos, notes) with one command; an LLM compiles them into an interlinked, cited Markdown wiki stored in your own S3-compatible bucket; agents read it through the CLI or an MCP server, and people read and edit the same pages in Obsidian or any Markdown editor.
- Type self-hosted CLI, MCP server and Docker backend
- Licence AGPL-3.0, commercial licence available
- LLMs Claude Code CLI, Codex CLI, Ollama, Gemini, Groq, OpenRouter
- Storage AWS S3, Cloudflare R2, MinIO, SeaweedFS, any S3
How it works
How agent2kb works: collect, compile, use
Collection is deliberately simple, understanding is the compile step, and use happens through two interfaces over the same files: the CLI and MCP for agents, Obsidian or any Markdown editor for people.
Any process runs a2kb ingest with a URL, a file or a folder. Web pages, video, audio, PDF, DOCX, images and Web Clipper notes land in raw/.
An LLM turns sources into pages with titles, summaries, tags and [[wikilinks]], rewrites only what changed, and labels what it derived.
Agents query over the CLI or MCP and get cited answers; people read and edit the same Markdown in Obsidian. The index opens with a "Past 7 days" recap, and saved answers feed the next compile.
Why agent2kb
Why agent2kb: understanding, not fragments
Agent teams scatter knowledge across chat logs, scratch notes and browser tabs. A vector store returns fragments; a shared vault mixes projects and drifts. agent2kb keeps one auditable wiki per project, always compiled.
Compiles, not just retrieves
An LLM writes real pages with titles, summaries, tags and links, so readers get understanding instead of chunks.
One isolated KB per project
Each KB has its own prefix and, where the provider allows, its own scoped key. An agent on one KB cannot read another.
Agents and people, one wiki
MCP and CLI for Claude Code, Codex and your bots; plain Markdown with [[wikilinks]] in Obsidian for people.
Knowledge that compounds
Answers you save feed the next compile as derived context, and the index opens with an automatic recap of the past week, so everyone sees what the KB learned.
Your bucket, no lock-in
AWS S3, Cloudflare R2, B2, MinIO, SeaweedFS, Wasabi. Files you can read, diff, back up and edit by hand.
Safe with untrusted content
SSRF-guarded page and file fetches, sandboxed claude and codex with no tools, privacy-first defaults, and a fully local option.
How it compares
| Vector store / RAG | Shared notes vault | Agent session memory | agent2kb | |
|---|---|---|---|---|
| Readable pages, not fragments | ✕chunks | ✓hand-written | ✕transcripts | ✓LLM-compiled |
| Kept consistent without manual work | ✕ | ✕ | ✕ | ✓incremental compile + lint |
| Isolated knowledge per project | ◐per index | ✕one vault | ◐per agent | ✓prefix + key per KB |
| Agents and people share one source | ✕agents only | ◐people only | ✕agents only | ✓MCP + Markdown editor |
| Answers cite their sources | ◐ | ✕ | ✕ | ✓ |
| Plain files in storage you own | ✕ | ✓ | ✕ | ✓any S3 bucket |
| Runs with no third party at all | ◐ | ✓ | ✕ | ✓Ollama + local S3 |
For people
What your team sees in Obsidian or any Markdown editor
Every compiled page arrives as plain Markdown with its properties, a summary, structured sections and
[[wikilinks]] — so graph view, backlinks and tag search work out of the box.
Illustration built from the sample note that ships with agent2kb, shown in Obsidian, the reader agent2kb documents and recommends (synced with the Remotely Save plugin). The files are plain Markdown, so other editors can read them too.
Automatic recap
An automatic recap of what is new
Every compile refreshes the top of the index with a recap of the last 7 days: a short summary of the themes the new pages share, written from those pages, and links to each of them.
- Nobody has to write it. It keeps up with the KB on every scheduled compile.
- Made for catching up. A teammate back from leave or a learner checking in once a week sees what the KB learned.
- Your window. 7 days by default, 30 for a monthly recap, or off; an optional weekly digest goes deeper.
Past 7 Days (4 articles)
This week the KB focused on safer releases. Two articles compare canary and blue-green deployments and agree that automated rollback matters more than the strategy itself; a third shows how feature flags keep unfinished work out of a release, and an incident review traces an outage to a missing health check, linking it to Rollback and Monitoring.
Anywhere
Every device and every agent, one shared knowledge base
The KB lives in your S3 bucket, not on one machine. Desktop, iPhone, iPad and Android read it in Obsidian; agents on any laptop, server or CI runner read it over the CLI or MCP. Compile runs on a schedule beside the storage, so the wiki keeps improving while your devices are off.
Obsidian on macOS, Windows and Linux, synced with the Remotely Save plugin; the vault root is the KB.
The same vault on your phone over HTTPS: AWS S3, Cloudflare R2, or the Docker backend's HTTPS profile.
Claude Code, Codex and your bots query the same KB with the CLI, or remotely over bearer-token MCP.
Quick start
Quick start: your first page in minutes
Python 3.10+, an S3-compatible bucket (or the Docker backend, which includes storage) and an LLM:
a logged-in claude or codex CLI, an API key, or a local Ollama server.
- Guided setup.
a2kb setupasks for storage, LLM, language and privacy, then runs diagnostics. - Unattended after that. Cron runs compile, lint, backup and digest; a fallback CLI takes over when one is down.
- Easiest LLM: the CLI you already use. A logged-in
claudeorcodexCLI needs no API key; switch a KB to a local Ollama model when its content must stay on your machine. - Docker in one command.
docker compose up -dbrings S3 storage with per-KB keys, cron and an MCP server per KB.
# install into a virtual environment python3 -m venv .venv && source .venv/bin/activate python -m pip install ".[all]" # storage, LLM, language, privacy, first KB a2kb setup a2kb doctor # ingest → compile → ask a2kb ingest --file examples/first-note.md a2kb compile a2kb query "What is the codename of the alpha project?" # give an agent read-only access over MCP claude mcp add kb-notes -- a2kb -p notes mcp
Built for real teams
Secure and private by default
- Privacy-first new KBs. Jina Reader and cloud image OCR stay off until you opt in; every run names the provider it uses.
- SSRF guard on page and file fetches. Private addresses blocked, every redirect checked, connect IP pinned, size capped. Video URLs are fetched by
yt-dlpitself, so only ingest them from hosts you trust; over MCP they are limited to YouTube or an allow-list. - Sandboxed LLM CLIs.
claudeandcodexrun as text transformers: no tools, no MCP, no session. - Two layers of isolation. A prefix check in agent2kb plus per-KB credentials scoped by your storage provider.
- MCP read-only by default.
askandingest_urlare opt-in; HTTP mode needs a bearer token. - No telemetry. Data goes only to the storage and the LLM you configure — or nowhere, with Ollama.
Works with
Works with your LLM, storage and sources
LLMs
Storage
Sources
Output language
FAQ
Frequently asked questions
What is agent2kb used for?
Giving a team of AI agents and the people who work with them one shared, always-up-to-date knowledge base: agents save what they find, agent2kb compiles it into readable wiki pages with citations, and everyone queries or browses the same pages.
How is agent2kb different from RAG or a vector database?
A vector store returns text fragments close to a question. agent2kb compiles sources into readable pages with titles, summaries, tags and links, then searches those pages and answers with citations. Embeddings are optional.
Does agent2kb work with Claude Code and other MCP clients?
Yes. a2kb mcp serves a knowledge base over the Model Context Protocol, read-only by default, over stdio or bearer-token HTTP, so Claude Code, Codex, Claude Desktop and other MCP clients can search and read it.
Is agent2kb free?
Yes. It is open source under the AGPL-3.0; you pay only for the storage and the LLM you choose, or nothing with a local model and local storage. A commercial licence is available for closed-source use.
Is my data used for training?
agent2kb has no telemetry and sends data only to the storage and the LLM you configure. Whether a provider trains on prompts is that provider's policy; a local Ollama server keeps data on your machine.
Can it run fully locally?
Yes. Use Ollama for compile and embeddings, SeaweedFS or MinIO for storage, and enable privacy_mode. Your content then never reaches a third party.
Which LLMs are supported?
A logged-in claude or codex CLI (no API key needed), Gemini, Groq, OpenRouter and Ollama, with separate models for bulk compile and aux jobs.
Does it need a GPU?
No. Only a local Ollama model benefits from one; compiling through a CLI or an API runs remotely.
Can people edit pages?
Yes, in Obsidian or any Markdown editor. A page is regenerated only when its raw source is recompiled; a2kb promote --as wiki-topic keeps hand-written pages untouched.
How do I see what is new?
Every compile refreshes the wiki index, which opens with a "Past 7 days" recap: a short summary of the themes added in that window, written by the LLM, plus links to the new pages. Nobody has to write it. Change the window per KB (for example 30 days for a monthly recap) or turn it off; an optional weekly digest writes a longer recap, a handy reading list for anyone learning from the KB.
Is it production-ready?
It is a pre-1.0 alpha. The CLI, config formats and S3 layout are pinned by contract tests, but expect rough edges and verify on a throwaway stack first.
Licensing
Licence: open source, with a commercial option
Community licence
Use, modify and redistribute agent2kb freely. If you run a modified version for others over a network, the AGPL asks you to share that source.
Commercial licence
Embedding agent2kb in a closed-source product or service? A separate commercial licence may be available — write to licensing@agent2kb.com.
Give your agents a memory people can read
Ingest once, compile unattended, and let every agent and teammate work from the same cited wiki.