Cross-session memory for AI agents - knowledge graph, scoring, semantic search
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Agent Knowledge.
knowledgeList entries by category and/or tag
knowledge_searchGeneral hybrid TF-IDF + semantic (no `scope`)
knowledge_sessionList sessions with metadata
knowledge_graphCreate/update edge between entries
knowledge_analyzeFind near-duplicate entries
knowledge_adminVector store statistics
Cross-session memory and recall for AI coding assistants -- works with Claude Code, Cursor, OpenCode, Cline, Continue.dev, and Aider out of the box. Git-synced knowledge base, hybrid semantic+TF-IDF search, auto-distillation with secrets scrubbing.
Benchmark: R@5 = 97.2% (sparse) / 98.8% (hybrid) on longmemeval_s and 86.0% (sparse) / 88.4% (hybrid) on the harder longmemeval_m split β the public LongMemEval academic benchmark (Wu et al. 2024, ICLR 2025), full 500 questions per split, no LLM, no API key, runs entirely offline. +8.6pp to +13.2pp R@5 over the paper's official flat-bm25 baseline in apples-to-apples reproduction. Full per-category table, reproduction instructions, and paper-comparison details in bench/README.md.
![]() | ![]() |
| Knowledge base with category filtering | TF-IDF ranked session search |
AI coding sessions are ephemeral. When a session ends, everything it learned -- architecture decisions, debugging insights, project context -- is gone. The next session starts from scratch.
agent-knowledge solves this with two complementary systems:
Sessions from all major AI coding assistants are auto-discovered -- if a tool is installed, its sessions appear automatically.
| Tool | Format | Auto-detected path |
|---|---|---|
| Claude Code | JSONL | ~/.claude/projects/ |
| Cursor | JSONL | ~/.cursor/projects/*/agent-transcripts/ |
| Codex CLI | JSONL | ~/.codex/projects/ |
| Aider | Markdown/JSONL | .aider.chat.history.md / .aider.llm.history in project dirs |
| Continue.dev | JSON | ~/.continue/projects/ |
| Cline | JSON | VS Code globalStorage saoudrizwan.claude-dev/tasks/ |
| OpenCode | SQLite | ~/.local/share/opencode/opencode.db (or $OPENCODE_DATA_DIR) |
No configuration needed. Additional session roots can be added via the AGENT_KNOWLEDGE_EXTRA_SESSION_ROOTS env var (comma-separated paths).
knowledge_analyze(action: "stale_by_code_activity") cross-references file paths mentioned in each entry body against filesModified in recent session summaries. Pairs with a symbol-presence precision layer: identifiers the entry quotes (inline backticks + fenced blocks) are checked in the touched file; if they still exist, confidence downweights Γ0.3. Entries with evergreen: true are exempt.knowledge_analyze(action: "search_gaps") surfaces zero-result queries over the last since_days, grouped by token-Jaccard similarity. The clearest signal for "what entries should I write next?".knowledge(action: "wakeup") assembles a multi-section bundle (identity β active_tasks β recent_decisions β known_gotchas β last_session_summary β top_weighted β semantic_fallback) within a token budget (default 800, override via token_budget or AGENT_KNOWLEDGE_WAKEUP_BUDGET). Unused section budget redistributes to later sections.minScore, minRecallCount, minUniqueQueries). Runs automatically in background, on demand via knowledge_admin(action: "promote"), or benchable offline via npm run bench:promote. Emits an auditable .dreams/YYYY-MM-DD.md diary every run.SessionAdapter interfaceknowledge, knowledge_search, knowledge_session, knowledge_graph, knowledge_analyze, knowledge_admin)evergreen: true in frontmatter exempts an entry from decay in ranking AND makes it append-only under promotion. Dashboard renders a push-pin badge on these cards.author: <string> frontmatter surfaces as a muted chip on each card.calls, imports, inherits edge types for code structure; directed BFS traversal (outbound/inbound/both); bulk_link for efficient ingestion; unlink_by_origin for clearing stale code edges before re-ingest; code: prefixed node IDs distinguish code from knowledgevalid_from / valid_to validity windows; as_of queries return point-in-time snapshots; invalidate action marks facts as ended without deleting themcategory_mode: "boost" so a wrong category guess down-ranks instead of discarding the right answerAGENT_KNOWLEDGE_INDEX_VERBATIM=falseknowledge_admin(action: "config") for runtime setup, persisted at XDG/AppData locationlocalhost:3423knowledge_analyze(action: "consolidate") for batch dedup scanningknowledge_analyze(action: "reflect") surfaces unconnected entries and generates structured prompts for the agent to identify new graph connectionsextracted (user-written) or inferred (auto-distilled, 0.85Γ search rank multiplier); confidence_score field carries the model's certainty 0-1knowledge_analyze actions god_nodes (most-connected entries), bridges (cross-category connectors), gaps (isolated entries)knowledge_analyze(action: "brief") returns a cached ~200 token summary (core concepts, active projects, recent decisions, stale and gap counts) for session-start orientationorigin (manual, auto-link, distill, reflect) so analysis can distinguish user judgment from automated heuristicsfreshness: { body_age_days, last_accessed, access_count, verified_at, verification_age_days, evergreen }. Agent reads the trust signal and decides; we impose no policy demotion.Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/agent-knowledge)<a href="https://allmcps.com/mcp/agent-knowledge"><img src="https://allmcps.com/api/badge/agent-knowledge?style=directory" alt="Agent Knowledge on AllMCPs" /></a>