Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
docker run -i --rm ghcr.io/hanochzhu/codeagent-memory:0.1.6Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add io.github.hanochzhu-codeagent-memory -- docker run -i --rm ghcr.io/hanochzhu/codeagent-memory:0.1.6รันในเทอร์มินัล
{ "mcpServers": { "io.github.hanochzhu-codeagent-memory": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/hanochzhu/codeagent-memory:0.1.6" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดCode graph + memory · surgical reads · 100% local · MCP + CLI
Kernel written in Rust
When an AI coding agent explores a repository, it usually rediscovers structure the slow way — running grep, glob, and full-file Read one file at a time — and forgets everything in the next session.
cam gives the agent two local retrieval planes in a single binary:
One binary, two interfaces: The main agent calls
camover MCP (cam mcp); subagents (which rarely inherit MCP tools) call the exact same CLI (cam --json …). Both share.cam/cam.dbon disk, 100% local, zero API cost.
Paste this prompt directly into your coding agent (Cursor, Claude Code, Codex, Windsurf, GitHub Copilot, Cline, etc.) and let it install, index, and wire cam for you:
Install cam from https://github.com/HanochZhu/codeagent_memory: require a working Rust toolchain (rustup), run `cargo install --git https://github.com/HanochZhu/codeagent_memory --locked`, ensure ~/.cargo/bin (or %USERPROFILE%\.cargo\bin on Windows) is on PATH, then verify with `cam --help`. In this repo run `cam index`. For the main agent, register MCP stdio: command `cam`, args `["mcp"]` (Cursor: .cursor/mcp.json; Claude Code: .mcp.json). Subagents call `cam --json` in the shell. Do not add extra docs.
Note: cargo install places cam in ~/.cargo/bin (Windows: %USERPROFILE%\.cargo\bin). Restart your terminal or IDE if cam is not immediately found on PATH.
Requires a Rust toolchain:
cargo install --git https://github.com/HanochZhu/codeagent_memory --locked
cam --help
From a local clone:
git clone https://github.com/HanochZhu/codeagent_memory.git
cd codeagent_memory
cargo install --path . --locked
Docker (no Rust toolchain required):
docker pull ghcr.io/hanochzhu/codeagent-memory:0.1.5
docker run -i --rm -v "$PWD:/work" -w /work ghcr.io/hanochzhu/codeagent-memory:0.1.5
Or build locally: docker build -t cam https://github.com/HanochZhu/codeagent_memory.git
cd your-project
cam index # parse repo into .cam/cam.db
# Query the code graph
cam ls src/ # list files or symbols in a file
cam read src/main.rs/main # read a single symbol body
cam ref main --dir in # 1-hop callers (in) or callees (out)
# Query & write to the memory tree
cam recall "how does hybrid recall fuse BM25 and vectors"
cam add --summary "..." < notes.md
cam auto-initializes .cam/ on first use. Run cam watch in the background if you want live incremental graph updates as files change.
Add cam mcp to your host's MCP configuration (e.g. .cursor/mcp.json or .mcp.json):
{
"mcpServers": {
"cam": {
"command": "cam",
"args": ["mcp"]
}
}
}
See docs/mcp.md for host-specific config paths and docs/agents.md for main-agent / subagent prompt rules.
The first recall or add downloads the default embedding model (potion-multilingual-128M to ~/.cam/models/) and falls back to a lexical hash embedder if offline.
tree-sitter walks the workspace and stores symbol definitions and call edges in .cam/cam.db.ls → find → read → ref). Reading a file returns its symbol outline; reading file/symbol returns only that symbol's source slice.recall takes an English query, embeds it locally, runs identifier-aware BM25 (splitting snake_case, kebab-case, camelCase + English stemming), prunes low-confidence tails, and fuses both lists with RRF ($k=60$) scaled by $0.9 + 0.1 \times R$. Superseded revisions are automatically expanded to their newest replacement.add stores only one fact (English summary; body supports non-Latin characters). Related facts are connected via --link / links into a knowledge graph (inspected via mem show; recall does not traverse graph links yet). --parent attaches a memory to a structural topic; --supersedes replaces an outdated memory while preserving lineage.Architecture deep dive (Chinese): DESIGN.md.
Every coding task follows the same four-step loop:
cam_recall / cam recall in English before grepping. Reuse a hit if it is latest and not needs_update.not_indexed, run cam_index / cam index once for the project.find or ls, read symbol bodies with read <file>/<symbol>, and trace callers/callees with ref <symbol> --dir in|out.cam_add / cam add as atomic facts (one fact per memory, English summary; body supports non-Latin characters), linking related facts with links / --link.Full agent rules & copy-paste system prompts: docs/agents.md.
Global flags & conventions:
--project <dir> (or CAM_PROJECT env var) overrides automatic upward .cam / .git root detection.--json emits compact JSON (--pretty for indented JSON). Errors on --json print {"error":{"code":…,"message":…}} to stdout and exit non-zero.read or ref matches multiple definitions, cam returns status: "ambiguous" with candidate node IDs (e.g. src/main.rs:function:main:12) that can be passed directly back to read or ref..gitignore and .camignore at any depth. Skips git submodules and linked worktrees; indexes nested standalone clones as kind: "project" (passable to --scope).--link / links to form a knowledge graph (graph recall is not enabled yet).needs_update; entries older than stale_days (default 30) are marked stale. Every valid recall hit (needs_update = false) refreshes last-accessed time and multiplies stability $S$ by 1.7.--parent forms branching trees; --supersedes forms linear revision chains where only the tail is marked latest and older revisions are folded out of default recall results.Global settings live in ~/.cam/config.toml:
stale_days = 30
# embedding_model = "minishlab/potion-multilingual-128M" # default (cached under ~/.cam/models/)
# embedding_model = "minishlab/potion-base-8M" # lighter Hugging Face model2vec repo
# embedding_model = "/path/to/local/model2vec" # dir with tokenizer.json, config.json, model.safetensors
# embedding_model = "hash" # zero-download lexical hash embedder
Use CAM_EMBED_MODEL to override the model for a single process, or cam config set embedding_model default to reset. When the embedding model changes, the next recall automatically re-embeds existing memories before scoring.
cam evaluates its code graph and memory planes separately against the closest open-source systems on identical corpora:
General chat memory frameworks (Mem0, Zep, Letta) target conversational logs rather than these coding-agent corpora and are omitted from the tables below.
coding-agent-life-v115 sessions, 15 queries, $k=5$ (same scoring as agentmemory score.ts; P@5 ceiling is 0.240).
Revision chains (--lineage): Re-ingesting every turn as a --supersedes revision tests whether top-$k$ returns the newest node of each gold chain (newest R@k) and whether any superseded node falsely claims latest (stale latest).
LongMemEval-S100 non-abstention questions sampled with seed 42 from cleaned LongMemEval-S. Retrieval fuses embeddings + BM25 with RRF at $k=10$ without an LLM reader.
edit2ripple)58 anchored-change queries across 44 frozen repository snapshots (no LLM; BCY = Budgeted Context Yield under the canonical 8K-token file-packing protocol).
cam graph achieves the highest first-hit rank (MRR 0.297, query P95 7.3 ms), while lexical search provides broader multi-file coverage — motivating graph + lexical rank fusion.
clap)clap v4.6.1, 536 scenarios against SCIP gold (no LLM, P95 ≈ 5.2 ms, $/1k = 0).
Full context dump vs. per-turn cam retrieval (deepseek-flash, hash embedder, 2026-10-13):
Dataset paths are configured in eval/datasets.toml (coding-agent-life-v1 defaults to ../agentmemory or CAM_EVAL_CODING_LIFE).
python3 eval/coding_life/run.py --adapter grep
python3 eval/coding_life/run.py # potion; errors if the model fails
python3 eval/coding_life/run.py --hash-embed # hash embedder
python3 eval/longmemeval/run.py --sample 100 --seed 42 --workers 8 # potion
python3 eval/longmemeval/run.py --sample 100 --seed 42 --workers 8 --hash-embed
python3 eval/locomo/run.py --workers 4 # potion, evidence recall
git clone --depth 1 https://github.com/eyuansu62/agent-retrieval-bench \
eval/agent_retrieval/vendor/agent-retrieval-bench
python3 -m pip install -e eval/agent_retrieval/vendor/agent-retrieval-bench
arb download-benchmark --version v2_edit2ripple --local-dir eval/agent_retrieval/data --force
python3 eval/agent_retrieval/run.py --workers 8
python3 eval/llm_multiturn/run.py --track both # potion; requires DEEPSEEK_API_KEY
python3 eval/longmemcode/run.py --corpus clap
python3 eval/charts/generate.py
Register cam mcp (stdio) for the main agent; subagents use the cam --json CLI directly with zero extra setup.
Copy-paste configs: docs/mcp.md · System prompts: docs/agents.md.
cam compiles natively on macOS, Linux, and Windows via cargo install --git https://github.com/HanochZhu/codeagent_memory --locked, or runs anywhere via Docker (ghcr.io/hanochzhu/codeagent-memory:0.1.5). See Get Started.
MIT
Made for AI coding agents — Claude Code, Cursor, Codex, Windsurf, Copilot, and JetBrains
Local code graph and solution memory for coding agents via CLI and MCP.
{ "mcpServers": { "io.github.hanochzhu-codeagent-memory": { "command": "docker", "args": [ "run", "-i", "--rm", "ghcr.io/hanochzhu/codeagent-memory:0.1.6" ] } }}เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Codeagent Memory ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-09 Local code graph and solution memory for coding agents via CLI and MCP.