by dnotitia
AKB — Agent Knowledgebase. Organizational memory for AI agents: vault-scoped docs / tables / files unified by URI graph, served over MCP.
# Add to your Claude Code skills
git clone https://github.com/dnotitia/akbakb is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by dnotitia. AKB — Agent Knowledgebase. Organizational memory for AI agents: vault-scoped docs / tables / files unified by URI graph, served over MCP. It has 169 GitHub stars.
akb's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/dnotitia/akb" and add it to your Claude Code skills directory (see the Installation section above).
akb is primarily written in Python. It is open-source under dnotitia on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh akb against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Organizational memory for AI agents. PostgreSQL-native knowledge base served over the Model Context Protocol (MCP) — agents read and write directly with hybrid semantic + keyword search, structured tables, files, and a URI graph. Drop-in alternative to Confluence / Notion for Claude Code, Cursor, Windsurf, and any MCP-aware agent.
Any agent client that speaks MCP (Streamable HTTP or stdio):
akb-mcp stdio proxyPOST /mcp/ with a Bearer tokenThe stdio proxy accepts an explicit Personal Access Token (PAT). On an
OAuth-enabled installation, run npx akb-mcp login --url <mcp-url> once
before starting the host with a URL-only configuration. One credential covers
MCP and the proxy's local file tools. Configure the stdio proxy.
For direct HTTP OAuth, configure the client and authorization server. Configure direct HTTP OAuth.
Product administrators can view server-observed calls by user, PAT and tool. MCP monitoring
AKB keeps one tool and authorization core behind two protocol adapters:
| Surface | Modern | Legacy |
|---|---|---|
Direct HTTP /mcp/ |
2026-07-28 stateless server/discover and per-request _meta with Mcp-Protocol-Version / Mcp-Method (and Mcp-Name for named calls) |
2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25 initialize, stateless requests (no Mcp-Session-Id lifecycle) |
akb-mcp stdio proxy |
2026-07-28 discovery and per-request metadata |
2025-06-18 initialize |
The proxy answers either handshake locally and normalizes backend calls to the modern stateless contract when available. For older backends without modern discovery, the proxy can fall back to legacy initialization and retain a session ID if that older server returns one. The current backend runs both adapters statelessly. A process cannot mix generations, and unsupported revisions or conflicting protocol evidence fail closed before a tool or local-file operation runs.
Beyond raw MCP access, AKB ships ready-made agent plugins for Claude Code and Codex that wrap common vault workflows:
/plugin marketplace add dnotitia/akb # Claude Code
codex plugin marketplace add dnotitia/akb # Codex
Install details and credentials: plugins/.
A public demo runs at akb-demo.agent.seahorse.dnotitia.ai.
Browse and search a small fictional-organization knowledge base — product docs,
a company handbook, agent session notes, and an engineering wiki, cross-linked
by the URI graph — right in your browser, no signup. To wire it into your own
agent, sign up with any email (a throwaway address is fine) and point the
akb-mcp proxy at
https://akb-demo.agent.seahorse.dnotitia.ai/mcp/.
⚠️ Throwaway demo. It is public, wiped and re-seeded weekly, and runs on minimal resources with no uptime, privacy, or data guarantees. Don't put anything real or sensitive in it — treat every write as public and ephemeral. For real use, self-host with Docker Compose or Kubernetes.
Most knowledge tools are built for humans clicking through a UI. Agents need a
different shape: structured documents, semantic + keyword search in one call,
explicit relations, and full version history. AKB gives agents a single set of
tools (akb_put, akb_search, akb_browse, akb_relations, …) over a
PostgreSQL-native revision store and hybrid index. Explicit Bare Git installations
remain supported for existing deployments.
Memory is only useful if the right note comes back. AKB's hybrid retrieval (dense + BM25, source-level dedup) was benchmarked on LongMemEval-S — 500 long-context questions, ~50 chat sessions per question. Recall@5 = 98.4%, with no reranker in the loop.
| System | R@5 | n | Reranker | Source |
|---|---|---|---|---|
| AKB hybrid | 98.4% | 500 | no | this repo |
| MemPalace hybrid + rerank | 98.4% | 450 | yes | MemPalace |
| gbrain hybrid | 97.6% | 500 | no | gbrain-evals |
| gbrain vector | 97.4% | 500 | no | gbrain-evals |
Methodology, per-category breakdown, and a one-command reproducible harness
live in eval/longmemeval/. The embedding model differs
across systems (AKB: bge-m3@1024), so read this as a stack-level comparison.
Core stays small; flexibility comes from extension, not built-in
automation. AKB does not ship its own consolidator, summariser, or
"knowledge gardener" — instead every write records a structured event in the
PostgreSQL outbox. When redis_url is configured, the publisher fans those
events out to a Redis Stream (akb:events). Operators wire any external
consumer (periodic synthesis bot, doc-rot reaper, weekly-digest agent, audit
trail, …) on top, with no patches to the core. The base contract is a
read/write store; opinions about what to do with the knowledge live outside.
┌──────────────────────────────────────────────────────────┐
│ Access Layer │
│ MCP Server │ REST API │ Web UI │
├──────────────────────────────────────────────────────────┤
│ Core Services │
│ Document (Put/Get) │ Search (Hybrid: dense+BM25) │
│ Relations (graph) │ Session │ Publications │
├──────────────────────────────────────────────────────────┤
│ Storage Layer │
│ Native revisions │ PostgreSQL 16 (text + meta SoT)│
│ │ Vector store (driver): │
│ │ pgvector (default, PG)│
│ │ qdrant (optional) │
│ │ seahorse-cloud (managed) │
│ │ seahorse-db (self-hosted)│
│ │ seahorse-db-grpc(experimental)│
└──────────────────────────────────────────────────────────┘
PostgreSQL is the source of truth — chunk text + metadata + BM25 vocab.
The vector store is a driver-pluggable derived index holding dense
embeddings and corpus-side sparse vectors. Full vector-store loss is
recoverable from PG by setting chunks.vector_indexed_at = NULL and
letting the indexing worker re-populate.
depends_on, related_to, implements in frontmatter form an explicit knowledge graph.akb_sql — Enforced by PostgreSQL ACL. Each
AKB user has a corresponding PG role (akb_user_<uid>) and each
vault has three group roles (akb_vault_<vid>_{reader,writer,admin}).
akb_sql runs the user's SQL inside a transaction with
SET LOCAL ROLE; cross-vault references return PG 42501
directly. No application-side regex inspects user SQL for forbidden
identifiers. See docs/designs/pg-native-rbac/.| Tool | Description |
|---|---|
akb_list_vaults / akb_create_vault |
Vault management |
akb_put / akb_get / akb_update / akb_delete |
Document CRUD (revision + indexing) |
akb_put_file / akb_get_file / akb_update_file / akb_delete_file |
File attachments — proxy-side (requires local filesystem) |
akb_put_image / akb_discard_image |
Validated inline Markdown images — proxy-side in akb-mcp 2.2+ |
akb_create_table / akb_alter_table / akb_drop_table / akb_sql |
Tabular content — per-doc tables + SQL |
akb_browse |
Tree traversal (collection → docs) |
akb_search / akb_grep |
Hybrid search (dense + BM25) / literal grep |
akb_drill_down |
Section-level retrieval |
akb_relations / akb_link / akb_unlink / akb_graph |
Knowledge graph |
akb_edit / akb_diff / akb_history |
In-place edit, diff, revision history |
akb_grant / akb_revoke / akb_set_public |
P |