Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Two-layer memory for AI agents with an immune system. Zero dependencies.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"anneal-memory": {
"command": "uvx",
"args": [
"anneal-memory"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add anneal-memory -- uvx anneal-memoryวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"anneal-memory": {
"command": "uvx",
"args": [
"anneal-memory"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"anneal-memory": {
"type": "stdio",
"command": "uvx",
"args": [
"anneal-memory"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub phillipclapham ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.1) เข้า registry 7 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Living memory for AI agents. Episodes compress into identity.
Memory without grounding is amplification infrastructure.
Persistent user memory profiles increase agent sycophancy 16–45% across models (Gemini 2.5 Pro at 45%, others lower). Production deployments accumulate 97.8% junk entries within weeks. Clinical research documents memory scaffolding delusions across sessions00396-7). The failure mode here isn't memory. It's memory with nothing checking what gets kept.
anneal-memory puts a check between what an agent writes down and what it comes to believe. That idea isn't rare any more. MemTxn refuses a fact update whose values don't appear in the source it cites, and Agent Zero Memory answers only from evidence its reader actually opened.
Here's what I think is actually distinct, going by the 2026 systems I've read. A pattern in anneal is an abstraction, not a copied fact, and it has to earn its rank: it moves up a level (1x → 2x → 3x, up to a 9-digit level) only when it cites real episodes its explanation is grounded in, and a failed citation drops it a level (or holds it there for a while, marked carried-forward, if it was grounded recently). The consolidator can't quietly gut the memory it rewrites, either. On a store that declares an identity layer, a save that collapses those sections is refused, and consolidators wearing down their own memory is a documented failure. Then there's the assembly. An episodic evidence store, a bounded always-loaded continuity file, a long-term pattern tier recalled on cue, prospective tasks, a single-writer consolidation gate and a hash-chained audit log all ship in one package, with zero dependencies and no embeddings. None of those pieces is unique on its own. The combination is, as far as I've found.
The citation checks are narrow and structural: cited IDs must exist, the explanation must share words with the episode it cites, fabricated citations demote (unless carryforward holds a recently grounded pattern), one episode cited too often raises a flag, and re-citing old episodes doesn't count. They are not a complete defense against memory drift. *Honest scope* below says what they catch and what they don't.
And it's memory you own and govern. A local store, zero dependencies, no vendor in the loop — you decide what graduates into long-term memory, every change is recorded in a tamper-evident chain (best-effort on the write side — see *Hash-chained audit trail* for what verify can and cannot see), and the consolidation step that rewrites an agent's identity is gated to a human, not run unbidden (the *Single-consolidator gate* below). Own the substrate; govern what enters it.
An append-only episodic log, consolidated by a single writer into a versioned identity the agent always loads, with an immune system that decides what is allowed to graduate, and a long-term pattern tier recalled on cue. Plus prospective spores (what the agent intends to do next). That's Complementary Learning Systems: a fast episodic store and slow consolidation (see *The Memory Architecture* below). Earlier versions also built a Hebbian link graph and an affect weight. I measured them for months, they never changed what recall returned, and 1.0.2 stopped building them. Zero dependencies (Python stdlib only). Works with any agent framework.
pip install anneal-memory
anneal-memory runs on Windows. What to know:
grep -n "fcntl.flock" anneal_memory/*.py) include store.py's continuity lock, crystal.py's CrystalStore._transaction, spores.py's SporeStore._transaction, and audit.py's audit manifest and audit append locks. On Windows, concurrent writers to one store — whether separate processes or threads within one process — can race or lose updates, since there is no lock of any kind to serialize them there. A single writer (one process, one thread) is unaffected: the unique-tmp + atomic-replace write still prevents a torn file.flock locks follow the open file description, which a forked child inherits. Do not fork a process while an AuditTrail in it is in use; a child must open its own AuditTrail.chmod are skipped there, since Windows/NTFS doesn't restrict access the same way, as are the cross-process lock test (see the write-locking bullet above) and the missing-home-directory simulation that clears the whole environment (the no-home tests that patch Path.expanduser run everywhere).The library is the core product. Import it, use it in any framework or script.
from anneal_memory import Store, EpisodeType, prepare_wrap, validated_save_continuity
store = Store("./memory.db", project_name="MyAgent")
store.record("Connection pool is the real bottleneck", EpisodeType.OBSERVATION) store.record("Chose PostgreSQL as the database because ACID outweighs speed", EpisodeType.DECISION)
result = store.recall(episode_type=EpisodeType.DECISION, keyword="database") for ep in result.episodes: print(f"[{ep.type}] {ep.content}")
wrap = prepare_wrap(store) # fetches episodes, marks wrap in progress if wrap["status"] == "ready":
compressed = your_llm.compress(wrap["package"]) validated_save_continuity(store, compressed) # full immune system pipeline
store.close()
See Library Quickstart for the full guide.
Inspect, debug, and manage agent memory from the command line — a full operator CLI with machine-readable --json output. Agents with shell access (Claude Code, Aider, etc.) can use the CLI directly for the full memory workflow.
# Point the demo at its own store. Without --db or ANNEAL_MEMORY_DB every
export ANNEAL_MEMORY_DB=./demo.db
anneal-memory --project-name MyAgent init
anneal-memory record "Chose PostgreSQL as the database for ACID" --type decision anneal-memory search "database"
anneal-memory baton claim me
anneal-memory --project-name MyAgent prepare-wrap --session-id me # Get compression package
anneal-memory --project-name MyAgent save-continuity out.md \ --session-id me --wrap-token "$WRAP_TOKEN" # the 'Wrap token:' line
anneal-memory stats # Detailed analytics anneal-memory graph --format dot # Graph of links formed before 1.0.2 (Graphviz) anneal-memory diff --wraps 5 # Wrap metric progression anneal-memory audit --since 7d # Read audit trail anneal-memory audit-repair # Rebuild a quarantined audit manifest, or set aside a corrupt sealed week (--set-aside-unreadable: one that only fails to read) anneal-memory export --format json # Full store export
unset ANNEAL_MEMORY_DB
See examples/agent-instructions.lean.cli.example for the agent workflow snippet.
For MCP-capable agent harnesses — Claude Code, Codex and Gemini CLI.
The server is one command — anneal-memory --project-name MyProject serve — wired into the harness's MCP config. The serve subcommand starts the MCP server; --project-name (and optional --db) are global flags and come *before* serve. Each harness has its own config file and format:
Claude Code — mcpServers JSON (a project .mcp.json):
{
"mcpServers": { "anneal_memory": { "command": "uvx", "args": ["anneal-memory", "--project-name", "MyProject", "serve", "--session-id", "claude-code"] } } }
Codex — ~/.codex/config.toml (or a project .codex/config.toml):
[mcp_servers.anneal_memory]
command = "uvx" args = ["anneal-memory", "--project-name", "MyProject", "serve", "--session-id", "codex"]
Gemini CLI — ~/.gemini/settings.json (or a project .gemini/settings.json):
{
"mcpServers": { "anneal_memory": { "command": "uvx", "args": ["anneal-memory", "--project-name", "MyProject", "serve", "--session-id", "gemini"] } } }
Gemini CLI starts MCP servers only from a folder it trusts: in an untrusted folder gemini mcp list shows a server from the user-level settings as Disconnected and does not list one from a project .gemini/settings.json at all, even though the config is right (trust the folder, or set GEMINI_CLI_TRUST_WORKSPACE=true; measured with Gemini CLI 0.42.0, where the variable made the server show Connected).
Then add the agent-instructions snippet — agent-instructions.lean.example (the always-loaded baseline) or the .full.example reference — to the harness's instructions file (CLAUDE.md for Claude Code, AGENTS.md for Codex, GEMINI.md for Gemini CLI). It teaches the agent *when* and *how* to use the memory tools; without it the tools are available but the agent won't know the cognitive workflow. (See Claude Code / agent-harness adopters below for the lean/Skill/full layering.)
Consolidation is yours. Agents record episodes freely. Rewriting the agent's identity layer (the wrap) is the operator's act, so a new store consolidates only through a server whose --session-id you have claimed the baton for, once, from your own shell: uvx anneal-memory baton claim claude-code (or anneal-memory baton claim claude-code with a pip install). Until then the agent's wrap downgrades to capture-only, and both the downgrade and the status tool say how many episodes are waiting and the command for you to run. Set the id in the client's config as above, not in a shell profile (ANNEAL_MEMORY_SESSION_ID also works, but an exported one reaches every client launched from that shell). Every conversation started from one config shares its id, so after the claim each of that client's conversations may consolidate: the claim designates a client, not a single conversation. Move the baton between clients with baton claim NAME --take; see who h
ตัดมาแค่ช่วงต้น อ่านต่อใน repo