Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Auditable memory for AI agents: provable deletion, tamper-evident audit, time-travel recall.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ATTESTARI_KEK, ATTESTARI_DATABASE_URL, ATTESTARI_SQLITE_PATH, ATTESTARI_MCP_ALLOW_FORGET, ANTHROPIC_API_KEYค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"attestari": {
"command": "uvx",
"args": [
"attestari"
],
"env": {
"ATTESTARI_KEK": "ใส่ค่าของคุณ",
"ATTESTARI_DATABASE_URL": "ใส่ค่าของคุณ",
"ATTESTARI_SQLITE_PATH": "ใส่ค่าของคุณ",
"ATTESTARI_MCP_ALLOW_FORGET": "ใส่ค่าของคุณ",
"ANTHROPIC_API_KEY": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add attestari --env ATTESTARI_KEK='ใส่ค่าของคุณ' --env ATTESTARI_DATABASE_URL='ใส่ค่าของคุณ' --env ATTESTARI_SQLITE_PATH='ใส่ค่าของคุณ' --env ATTESTARI_MCP_ALLOW_FORGET='ใส่ค่าของคุณ' --env ANTHROPIC_API_KEY='ใส่ค่าของคุณ' -- uvx attestariเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"attestari": {
"command": "uvx",
"args": [
"attestari"
],
"env": {
"ATTESTARI_KEK": "ใส่ค่าของคุณ",
"ATTESTARI_DATABASE_URL": "ใส่ค่าของคุณ",
"ATTESTARI_SQLITE_PATH": "ใส่ค่าของคุณ",
"ATTESTARI_MCP_ALLOW_FORGET": "ใส่ค่าของคุณ",
"ANTHROPIC_API_KEY": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"attestari": {
"type": "stdio",
"command": "uvx",
"args": [
"attestari"
],
"env": {
"ATTESTARI_KEK": "ใส่ค่าของคุณ",
"ATTESTARI_DATABASE_URL": "ใส่ค่าของคุณ",
"ATTESTARI_SQLITE_PATH": "ใส่ค่าของคุณ",
"ATTESTARI_MCP_ALLOW_FORGET": "ใส่ค่าของคุณ",
"ANTHROPIC_API_KEY": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ATTESTARI_SQLITE_PATH envATTESTARI_MCP_ALLOW_FORGET envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub attestari ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: ATTESTARI_KEK, ATTESTARI_DATABASE_URL, ANTHROPIC_API_KEY
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.0.8) เข้า registry 28 วันที่ผ่านมา
โปรแกรมที่รองรับ 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
The auditable memory layer for AI agents. Give your agent long-term memory — like any memory layer — except every fact carries a receipt (where it came from, when), it runs on plain Postgres, the audit trail is tamper-evident, and any user's data can be provably deleted with a signed certificate.
from attestari import Memory
mem = Memory() mem.add("Hi, I'm Alice. I live in Toronto and I work at Acme.", subject_id="alice", valid_from="2021-06-01") mem.add("Update: I moved to Berlin and I now work at Globex.", subject_id="alice", valid_from="2026-01-01") # supersedes Acme + Toronto
mem.answer("where does the user work", subject_id="alice") # -> "Globex" (latest) mem.answer("where did the user live", subject_id="alice", as_of="2022-01-01") # -> "Toronto" (time-travel)
cert = mem.forget("alice") # right-to-be-forgotten -> a signed deletion certificate
No database, no API key, no model download required to run that — the core engine has zero dependencies.
Hosted memory is a black box: you can't see where a "memory" came from, you can't cleanly delete one user's data, and you can't *prove* the history wasn't altered. For a bank, hospital, or insurer — and under GDPR / the EU AI Act — that's a dealbreaker. Attestari is the neutral, self-hostable layer that fixes exactly that.
| Attestari | Typical memory layer | |
|---|---|---|
| Runs on plain Postgres (no graph DB) | ✅ | ✗ (needs Neo4j / a vector service) |
| Provenance on every fact | ✅ | partial |
| Bi-temporal ("what was true on date D?") | ✅ | ✗ |
| Provable deletion + certificate (GDPR) | ✅ | ✗ |
| Tamper-evident audit trail (hash chain) | ✅ | ✗ |
| Works across model vendors | ✅ | usually locked to one |
The last two rows are the moat. Deletion you can prove: each user's data is encrypted with their own key; forget() destroys the key, so the content is unrecoverable — while an immutable log and a signed certificate remain as proof. A history you can verify: every event is hash-linked, so verify_audit() catches any edit, insert, or delete — and the proof survives deletion.
as_of any past instant; corrections supersede old facts without erasing them, so history is always reconstructable. as_of filters on valid time (when a fact was true). System time (when Attestari recorded it) is stored on every fact, but there's no query on it yet.forget(subject_id) crypto-shreds a user's data and returns a signed DeletionCertificate; content backups and replicas are covered (key storage needs its own backup policy — see the threat model).verify_audit() detects any edit/insert/delete, and the proof survives crypto-shred.conflicts(), not silently dropped.search() and timeline() still see each surface form separately.git clone https://github.com/attestari/attestari && cd attestari
python examples/spike.py # zero-dep end-to-end loop python examples/agent_with_memory.py # the "give an agent memory" pattern
You'll see facts change over time, a bi-temporal query answer differently "as of" different dates, a provenance trace back to the source, and a forget() that issues a certificate. No install, no API key, no database.
One facade, Memory, covers the whole surface:
from attestari import Memory
mem = Memory() # zero-dep, in-memory (tests, demos)
fact_ids = mem.add( "I moved to Berlin and I now work at Globex.", subject_id="alice", # whose memory this is valid_from="2026-01-01", # when it became true (defaults to now) source_ref="chat:msg-42", # where it came from (for provenance) )
mem.search("where does the user work", subject_id="alice") # ranked SearchResults mem.answer("where does the user work", subject_id="alice") # -> "Globex" mem.answer("where did the user live", subject_id="alice", as_of="2022-01-01") # time travel: recall as-of a past date mem.timeline(subject_id="alice") # full bi-temporal history mem.get_provenance(fact_ids[0]) # source episode + span mem.conflicts(subject_id="alice") # surfaced conflicts
report = mem.verify_audit() # AuditReport — is the hash chain intact? cert = mem.forget("alice") # DeletionCertificate — provable erasure
| Method | Returns | What it does | |
|---|---|---|---|
add(text, *, subject_id, valid_from=…, source_ref=…) | list[str] | Ingest a message; extract, dedup, and supersede facts. | |
search(query, *, subject_id, as_of=…, limit=5) | list[SearchResult] | Hybrid retrieval with an optional time filter. | |
answer(query, **kwargs) | `str \ | None` | The single top object for a query. |
timeline(*, subject_id) | list[Edge] | Every fact for a subject, live and superseded. | |
get_provenance(fact_id) | `Provenance \ | None` | Trace a fact to its source episode + span. |
conflicts(*, subject_id=None) | list[dict] | Conflicts resolved by predicate cardinality. | |
resolve_entities(names=None, *, auto=True) | ResolutionResult | Merge duplicate entities (reversible). | |
forget(subject_id) | DeletionCertificate | Crypto-shred a subject; return proof. | |
verify_audit(deep=False) | AuditReport | Verify the tamper-evident hash chain; deep=True also catches silent edits to event content. |
Three storage tiers, one engine — every guarantee (audit chain, crypto-shred, deep verification, time travel) holds on all three:
| Tier | Storage | For | Setup |
|---|---|---|---|
Memory() | in-memory | tests, demos, determinism | none |
Memory.local() | one SQLite file (~/.attestari/attestari.db) | a personal agent, MCP, prototypes — durable, single-process | none (stdlib) |
Memory.postgres() | Postgres + pgvector | production: concurrent access, indexed hybrid search | one container |
Durable with zero infrastructure (survives restarts; nothing to install or run):
from attestari import Memory
mem = Memory.local() # or Memory.local("path/to/agent.db")
Durable, on Postgres + pgvector (one container, no graph DB):
ATTESTARI_PG_PORT=5433 docker compose up -d # applies the schema on first boot
pip install -e ".[postgres,embeddings]" export ATTESTARI_DATABASE_URL=postgresql://attestari:attestari@localhost:5433/attestari
Already have a Postgres (managed or local)? The schema ships inside the pip package — no clone needed:
python -m attestari.initdb postgresql://user:pass@host:5432/db # idempotent
from attestari import Memory
mem = Memory.postgres() # durable; materialized projections + pgvector + full-text search
As a REST API + visual console:
pip install -e ".[server]"
uvicorn attestari.server:app # API at /v1/*, the memory-graph console at /
As an MCP server (any agent — Claude, frameworks — can use it) — exposes add_memory / search_memory / get_provenance over stdio, plus forget_subject if you opt in (below). Register it in your MCP client's config (e.g. Claude Desktop's claude_desktop_config.json); the client launches the process for you:
{
"mcpServers": { "attestari": { "command": "attestari-mcp", "args": [], "env": { "ATTESTARI_SQLITE_PATH": "~/.attestari/attestari.db", "ANTHROPIC_API_KEY": "sk-ant-...", "ATTESTARI_KEK": "base64-kek-here" } } } }
Only `command`/`args` are required. Durable by default (memories go to the local
SQLite file, so they survive app restarts); the env block is where per-server config lives — add ATTESTARI_DATABASE_URL to use Postgres instead of SQLite, ANTHROPIC_API_KEY to upgrade extraction to Claude, ATTESTARI_KEK to enable crypto-shred. To run it standalone (e.g. to debug): attestari-mcp (or python -m attestari.mcp). Without a local install, MCP clients can spawn it straight from PyPI: uvx --from "attestari[server]" attestari-mcp.
Erasure over MCP is opt-in. An agent can be steered by text it reads, and erasure can't be undone, so forget_subject is only offered when the env block sets "ATTESTARI_MCP_ALLOW_FORGET": "1". It is then flagged destructive (clients that honour tool annotations ask before running it) and takes two calls: the first previews what would be erased and returns a manifest_hash; the second passes that hash back as confirm_manifest_hash, and erases only if the subject's records still match the preview. Leave it off unless the agent is meant to erase people; Memory.forget() and POST /v1/forget are unaffected.
From TypeScript — the TS client talks to the REST API, so start the server first (see above; it defaults to http://localhost:8000). Then see clients/ts (@attestari/client), a thin typed client mirroring the Memory surface.
With LangChain: see clients/langchain (attestari-langchain) — a AttestariRetriever (recall facts with provenance) and AttestariChatMessageHistory (drop-in memory for RunnableWithMessageHistory) for any chain or agent.
With real Claude extraction (instead of the zero-dep deterministic extractor):
pip install -e ".[anthropic]"
export ANTHROPIC_API_KEY=sk-ant-... python examples/spike.py --llm anthropic
Enable crypto-shred deletion (turn forget() from a logical delete into cr
ตัดมาแค่ช่วงต้น อ่านต่อใน repo