Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Universal AI coding assistant memory — session handoff, SLM compression, and semantic retrieval.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"engram-cc": {
"command": "npx",
"args": [
"-y",
"@morous-dev/engram-cc"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add engram-cc -- npx -y @morous-dev/engram-ccวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"engram-cc": {
"command": "npx",
"args": [
"-y",
"@morous-dev/engram-cc"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"engram-cc": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@morous-dev/engram-cc"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 6 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub Morous-Dev ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.4) เข้า registry 8 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
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.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Universal AI session memory substrate. One install. Every AI coding assistant. Persistent context across sessions, folder renames, and tool switches.
*In neuroscience, an engram is the physical trace a memory leaves in the brain. EngramCC does the same for AI — a local memory substrate that persists what your AI assistant learned, decided, and did, so the next session picks up exactly where the last one left off.*
Every AI coding session starts from zero. The assistant re-reads files it read yesterday, re-learns conventions it already knows, re-asks questions you already answered. Context compaction silently erases the session mid-work. Switch tools and all memory is gone.
EngramCC solves this at the infrastructure level — not by prompting harder, but by building a persistent memory layer that runs underneath any AI assistant.
npx engram-cc
Run it from the project root you want ECC to manage, or pass --project-dir .
The setup CLI detects your hardware, prepares a project-local .engram-cc/ workspace, asks for a shared models directory, and generates assistant hook/MCP snippets under .engram-cc/assistant-configs/. No user-home config is modified.
For assistants that self-install MCP servers from npm, the canonical EngramCC command is:
npx --yes --package=@morous-dev/engram-cc -- engramcc-mcp
Equivalent npm exec form:
npm exec --yes --package=@morous-dev/engram-cc -- engramcc-mcp
Assistants should not guess npx @morous-dev/engram-cc mcp. Use the explicit package/bin form above.
For project-local ECC setup, the generated snippets under .engram-cc/assistant-configs/ intentionally use node instead. The npx --package ... form above is for assistants that install EngramCC directly from npm without running project-local setup first.
| Assistant | Hook support | MCP support |
|---|---|---|
| Claude Code | Full lifecycle hooks | recall / search / recent / graph_query |
| Gemini CLI | Full lifecycle hooks | recall / search / recent / graph_query |
| VS Code Copilot | — | recall / search / recent / graph_query |
| Codex CLI | Native hooks (session_start, pre_tool_use, stop) + transcript-exact user_prompt_submit / post_tool_use + synthesized pre_compact | recall / search / recent / graph_query |
| Kilo CLI | Wrapper-assisted only; native hooks not verified | recall / search / recent / graph_query |
| OpenCode | Full lifecycle hooks | recall / search / recent / graph_query |
| Cursor | — | recall / search / recent / graph_query |
On Windows, generated hook snippets call src/hooks/hook-runner.mjs so assistant and project env vars are injected without brittle cmd /C quoting.
Codex-specific note: the exact prompt/tool bridge reads Codex's own session JSONL under CODEX_HOME / ~/.codex/sessions/, but ECC still writes its state only into the project-local .engram-cc/ directory. Because Codex does not expose a true prompt-submit injection hook, startup context also includes a Codex turn policy that steers the assistant toward EngramCC MCP memory on user turns when earlier context may have compacted out.
Kilo-specific note: current verified support is MCP plus the ekilo wrapper flow for session-start / session-stop continuity. Kilo has an open request for native lifecycle hooks, so ECC does not claim native Kilo hook parity yet.
EngramCC runs as session middleware — lifecycle hooks capture what happens during a session, a local SLM synthesizes memory offline at session end, and an MCP server serves pre-digested context to any connected assistant.
┌─────────────────────────────────────────────────────────────────┐
│ Your AI Coding Session │ │ │ │ UserPromptSubmit → PostToolUse → PreCompact → Stop │ │ │ │ │ │ │ │ └───────────────┴──────────────┴──────────┘ │ │ │ │ │ SQLite event DB │ │ │ │ │ ┌───────────┴───────────┐ │ │ │ Local SLM Archivist │ │ │ │ (no API calls, 100% │ │ │ │ offline synthesis) │ │ │ └───────────┬───────────┘ │ │ │ │ │ ┌──────────────────┼──────────────────┐ │ │ │ │ │ │ │ YAML handoff Knowledge graph Vector store │ │ (hot resume) (BFS traversal) (semantic search) │ │ │ │ │ │ │ └──────────────────┴──────────────────┘ │ │ │ │ │ MCP server │ │ (recall / search / recent │ │ / graph_query) │ └─────────────────────────────────────────────────────────────────┘ ↑ ↓ SessionStart hook Next session injects context picks up here
| Hook | When | What it does |
|---|---|---|
UserPromptSubmit | User sends a message | Captures intent and decision signals |
PostToolUse | Any tool completes | Captures file ops, errors, tool results |
PreCompact | Context nears limit | Snapshots session state before erasure |
SessionStart | Session opens | Injects hot handoff or cold summary + MCP pointer |
Stop | Session closes | SLM synthesis → handoff YAML + graph + vector store |
EngramCC injects context surgically, not blindly:
recall tool — zero token waste on stale context| Layer | Storage | Contents | Lifespan |
|---|---|---|---|
| Working | YAML | Preferences, conventions, persistent decisions | Cross-session |
| Episodic | SQLite + FTS5 | All session events, full-text searchable | Per-project |
| Semantic | SQLite graph | File/decision knowledge graph, BFS traversal | Per-project |
| Procedural | sqlite-vec | Embedding-indexed high-value events | Per-project |
EngramCC synthesizes session memory using local models first — zero external API calls for its own compaction, handoff, and retrieval support.
The setup CLI detects your hardware and selects the best available tier:
| Tier | Model | RAM needed | What it does |
|---|---|---|---|
| 1 | Rule-based | 0 | Always-on heuristic extraction |
| 2 | MiniLM-L6-v2 ONNX | ~400 MB | Embeddings via @huggingface/transformers |
| 3 | Llama 3.2 3B Q5_K_M | ~4 GB | Primary local synthesis tier |
| 3b | Qwen3.5 4B Q4_K_M | ~3.5 GB | Alternate synthesis tier, strong multilingual/coding performance |
| 3c | Gemma 3 4B QAT Q4_0 | ~3 GB | Alternate synthesis tier, strong structured reasoning |
| 4 | Ollama / LM Studio / Groq | user-provided | External HTTP provider |
Models are stored in a shared directory chosen during engramcc setup and saved in /.engram-cc/config.json. Tiers auto-cascade: if no Tier 3 model is available, Tier 2 runs; if Tier 2 is unavailable, Tier 1 runs. Core memory capture is never blocked.
EngramCC tracks projects by a stable UUID stored in .ecc-id — not by folder path. This means:
Resolution order: .ecc-id file → git root commit hash → fresh UUIDv4 (written once, never regenerated).
<projectDir>/.engram-cc/
├── sessions/ │ └── .db ← SQLite DB per project (all memory tiers) ├── assistant-configs/ ← Local hook/MCP snippets per assistant ├── config.json ← Project config, including shared models path ├── handoff.yaml ← Session handoff (hot resume data) └── working.yaml ← Cross-session working memory
/Engram Context Continuum/models/ └── .gguf ← Shared GGUF models reused across projects
All data is local. No network calls for core operation. No credentials, tokens, or API keys required.
When connected via MCP, any assistant can query EngramCC directly:
| Tool | Purpose |
|---|---|
recall | Full session context: handoff + working memory |
search | FTS5 full-text search over all session events |
recent | Most recent N events, filterable by category |
graph_query | BFS traversal of the knowledge graph |
Override compression tier or external provider in plugin-config.yaml:
# Force a specific compression tier (default: auto)
compression: tier: "tier3b"
external: provider: "ollama" model: "phi4-mini" base_url: "http://localhost:11434"
The numbers below were verified against the current repo state on March 14, 2026 after the carry-forward compaction fix. They reflect what was actually run, not historical bests.
| Command | What it measures | Current result |
|---|---|---|
npm run build | TypeScript compile integrity | ✅ PASS |
node benchmark/test-session-db.mjs | Session DB, archive, resume-chain, carry-forward regressions | ✅ 53/53 |
npm run test:quality | End-to-end handoff quality across S1/S2/S3 | ✅ 20/20 |
node benchmark/test-hook-portability.mjs | Cross-assistant hook env and startup portability | ✅ 14/14 |
node benchmark/test-codex-adapter.mjs | Codex transcript sync + trigger + stop regressions | ✅ 29/29 |
npm run test:brutal:quick | Real-data extraction calibration (WildChat + SWE-bench) | ✅ PASS |
npm run test:lifecycle:quick | 100-cycle real-data lifecycle / archive retention observation | ✅ PASS |
node benchmark/test-adversarial.mjs --model llama3.2-3b | Hostile SLM inputs A1–A11 | ✅ 11/11 |
node benchmark/test-adversarial.mjs --model qwen | Hostile SLM inputs A1–A11 | ✅ 11/11 |
node benchmark/test-adversarial.mjs --model gemma3-4b | Hostile SLM inputs A1–A11 | ✅ 11/11 |
node benchmark/test-tier-comparison.mjs | Cross-tier compaction retention (4→20 cycles) | ✅ 38/38 on tier3, tier3b, tier3c |
node benchmark/test-scale.mjs | Prompt-length stability | ✅ Llama 16/16 · Qwen 15/16 |
node benchmark/test-compaction-marathon.mjs | Multi-compaction memory retention | ✅ 53/53 |
node benchmark/test-diffmode.mjs | Grammar-constrained JSON output | ✅ PASS for Llama 3.2 3B + Qwen3.5 4B |
npm run test:quality exercises the full path from session events to next-session context injection.
| Scenario | Assertions | Result |
|---|---|---|
| S1 — Initial session | 6/6 | ✅ |
| S2 — Hot resume | 5/5 | ✅ |
|
ตัดมาแค่ช่วงต้น อ่านต่อใน repo