Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Cross-session memory for AI agents - knowledge graph, scoring, semantic search
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"agent-knowledge": {
"command": "npx",
"args": [
"-y",
"agent-knowledge"
]
}
}
}在终端中运行这条命令
claude mcp add agent-knowledge -- npx -y agent-knowledge粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"agent-knowledge": {
"command": "npx",
"args": [
"-y",
"agent-knowledge"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"agent-knowledge": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"agent-knowledge"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 keshrath 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(2.0.0)于13天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
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.
In Claude Code, the agent-knowledge plugin adds the /knowledge pane: the knowledge base beside the conversation. How it works, with pictures: the user manual.
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. The /knowledge pane marks them.author: frontmatter, kept with the entry and returned by the REST API.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 locationknowledge_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.SessionStart auto-wakeup + ingest-freshness check, UserPromptSubmit first-prompt targeted injection, PreCompact memory-flush nudge + distill, SessionEnd distill. Six hook scripts total, all fail-open, each toggleable via an AGENT_KNOWLEDGE_* env var. See docs/HOOKS.md.~/.claude/projects/*/memory/, similar in other IDEs), route durable user facts and feedback to agent-knowledge instead. Auto-memory is machine-local and invisible to other machines; agent-knowledge is git-synced, cross-machine, searchable, and surfaces in wakeup. See the Claude Code integration note in docs/USER-MANUAL.md.The knowledge-ingest skill populates or updates the knowledge base from a codebase directory. It uses tree-sitter for zero-token structural extraction (classes, functions, imports, call graphs, rationale comments), then clusters files into subsystems and creates knowledge entries + graph edges via existing MCP tools. Subsequent runs are incremental — only changed files are reprocessed.
/knowledge-ingest ./my-project
Uses the Agent Skills standard — works with Claude Code, OpenCode, Cursor, Codex CLI, and Gemini CLI. See Ingestion Guide for details.
Supported languages: TypeScript, JavaScript, Python, Go, Rust, Java, C, C++.
npm install -g agent-knowledge
git clone https://github.com/keshrath/agent-knowledge.git
cd agent-knowledge npm install && npm run build
Add to your MCP client config (Claude Code, Cline, etc.):
{
"mcpServers": { "agent-knowledge": { "command": "npx", "args": ["agent-knowledge"] } } }
The first MCP process also serves a local REST API on 127.0.0.1:3423 (what the hooks, the /knowledge pane and agent-tasks call); when it exits, another running session takes the port over.
See Setup Guide
只显示了开头部分;其余内容请在仓库中阅读