agentmemory
AGENTS.md29k starsChanged 58 days agoApache-2.0View on GitHub
agentmemory is a persistent memory system for AI coding agents, built on iii-engine's three primitives (Worker/Function/Trigger). Everything goes through registerFunction/registerTrigger/sdk.trigger() — never bypass iii-engine with standalone SQLite or in-process alternatives. When adding or removing MCP tools, you MUST update ALL of the following: 1. src/mcp/tools-registry.ts — tool definition + getAllTools() array 2. src/mcp/server.ts — handler case in the mcp::tools::call switch 3. src/triggers/api.ts — REST endpoint registration 4. src/index.ts — function registration + endpoint count in the log line 5. test/mcp-standalone.test.ts…
Trending
More talk lately.about the whole repository
Who's talking about rohitg00/agentmemory
- NousResearch/hermes-agent“Integration: agentmemory as a memory provider plugin for Hermes”GitHub · Apr 9, 2026 · 8 reactions
- ranxianglei/billion-context“agentmemory 借鉴研究”GitHub · Sep 2, 2026 · 7 reactions
- @qdrddr.bsky.social“Persistent #memory for #codeagents WebUI with graph Visualization, #MCP, #Skills, saves tokens. Builds …”Bluesky · May 8, 2026 · 6 likes
- Zoo-Code-Org/Zoo-Code“feat: add experiment-gated self-improving learning, bounded memory, background curation, and …”GitHub · May 22, 2026 · 4 reactions
- @github-trending-js.bsky.social“📦 rohitg00 / agentmemory ⭐ 27,459 (+60) 🗒 TypeScript #1 Persistent memory for AI coding agents based on …”Bluesky · Aug 26, 2026 · 3 likes
The biggest 5 of 70 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 70
Talked about on GitHub and Bluesky (70 times).
On GitHub · 50
- Apr 9, 2026Integration: agentmemory as a memory provider plugin for Hermes — NousResearch/hermes-agent8 reactions · 7 comments
- Sep 2, 2026agentmemory 借鉴研究 — ranxianglei/billion-context7 reactions · 3 comments
- May 22, 2026feat: add experiment-gated self-improving learning, bounded memory, background curation, and auto-create/update skill — Zoo-Code-Org/Zoo-Code4 reactions · 9 comments
- Oct 23, 2026Mémoire : un score de rappel (recall@3, MRR) sur un jeu de questions synthétique (1/2) — charlescstpierr/ezerbot1 reaction · 4 comments
- Jul 22, 2026Workspace GitHub plugin importer rejects local stdio MCP for Codex-only plugins — openai/codex1 reaction · 1 comment
45 more on GitHub
- Jul 9, 2026Enterprise-grade audit: docs, prompts, examples — luminik-io/alfred1 reaction · 4 comments
- May 12, 2026Memory for AI with https://github.com/rohitg00/agentmemory — jellydn/my-ai-tools1 reaction
- Nov 26, 2026chore(container): update image ghcr.io/joryirving/agentmemory ( bebf688 ➔ cec9ad4 ) — jhart99/home-ops0 reactions · 1 comment
- Nov 13, 2026[GOAL][PROGRAM][P0–P2] Agents Director · Agent Memory Digest — verified summaries, cross-agent recall & mobile Memory — andylitvinov-design/books0 reactions
- Nov 10, 2026Category-5 re-read batch 2026-11: next triggers + falsifiers (ai-memory, OpenViking, MemPalace, agentmemory) — leandromineti/ai-assisted-coding0 reactions
- Nov 9, 2026agent-skills.github.rohitg00.agentmemory: 0.9.32 → 0.9.33 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-plugins.github.rohitg00.agentmemory: 0.9.32 → 0.9.33 — sudosubin/agents.nix0 reactions
- Nov 9, 2026claude-code-marketplaces.github.rohitg00.agentmemory: 0.9.32 → 0.9.33 — sudosubin/agents.nix0 reactions
- Nov 9, 2026release(agentmemory): update rohitg00/agentmemory ( v0.9.32 → v0.9.33 ) — joryirving/containers0 reactions · 2 comments
- Nov 7, 2026Curate CUA resources batch w5-006 (OpenAgentFleet, Orynn, Safari iOS Web Inspector MCP, +6 more) — reacher-z/Awesome-CUA0 reactions
- Nov 5, 2026chore(deps): update dependency rohitg00/agentmemory to v0.9.32 — thekoma/hermes-koma0 reactions
- Nov 5, 2026claude-code-marketplaces.github.rohitg00.agentmemory: 0.9.31 → 0.9.32 — sudosubin/agents.nix0 reactions
- Nov 4, 2026build(deps): bump the runtime group across 1 directory with 2 updates — djr747/kube-agentmemory0 reactions · 2 comments
- Nov 4, 2026agent-skills.github.rohitg00.agentmemory: 0.9.31 → 0.9.32 — sudosubin/agents.nix0 reactions
- Nov 4, 2026claude-code-plugins.github.rohitg00.agentmemory: 0.9.31 → 0.9.32 — sudosubin/agents.nix0 reactions
- Nov 4, 2026release(agentmemory): update rohitg00/agentmemory ( v0.9.31 → v0.9.32 ) — joryirving/containers0 reactions · 1 comment
- Oct 28, 2026claude-code-marketplaces.github.rohitg00.agentmemory: init at 0.9.31 — sudosubin/agents.nix0 reactions
- Oct 26, 2026agent-skills.github.rohitg00.agentmemory: 0.9.30 → 0.9.31 — sudosubin/agents.nix0 reactions
- Oct 26, 2026claude-code-plugins.github.rohitg00.agentmemory: 0.9.30 → 0.9.31 — sudosubin/agents.nix0 reactions
- Oct 20, 2026post: Agent Memory Goes Stale: Make Your Agent Check Its Facts — 5hirish/duct0 reactions
- Oct 16, 2026Keep core memory tools easy to select and enforce bounded recall context — alberttwong/Redis-Agent-Memory-for-Claude-and-ChatGPT0 reactions
- Oct 16, 2026Expose capture, delivery, and recall diagnostics with an end-to-end memory check — alberttwong/Redis-Agent-Memory-for-Claude-and-ChatGPT0 reactions
- Oct 16, 2026Stable project memory identity across worktrees and machines — alberttwong/Redis-Agent-Memory-for-Claude-and-ChatGPT0 reactions
- Oct 16, 2026chore(deps): update dependency rohitg00/agentmemory to v0.9.30 — thekoma/hermes-koma0 reactions · 1 comment
- Oct 15, 2026architect: a re-survey that replaces a skip with patterns keeps the old skip reason — tenishai/techne0 reactions
- Oct 14, 2026agent-skills.github.rohitg00.agentmemory: 0.9.29 → 0.9.30 — sudosubin/agents.nix0 reactions
- Oct 13, 2026Add privacy filter to redact secrets and passwords — DarkLord017/Groove0 reactions
- Oct 13, 2026Benchmark implementation of https://github.com/rohitg00/agentmemory — jeremyjousse/dot-files0 reactions
- Oct 9, 2026Agent Memory — YoungIT/yitec-academy0 reactions
- Oct 8, 2026Observability metric store deadlocks the engine: all tokio workers parked on the TimeIndexedMetricStorage RwLock (v0.11.2) — iii-hq/iii0 reactions · 4 comments
- Oct 7, 2026claude-code-plugins.github.rohitg00.agentmemory: 0.9.29 → 0.9.30 — sudosubin/agents.nix0 reactions
- Oct 6, 2026fix(container): update image registry.vzkn.eu/containers/agentmemory (0.9.29 → 0.9.30) - autoclosed — vrozaksen/home-ops0 reactions · 2 comments
- Oct 6, 2026release(agentmemory): update rohitg00/agentmemory ( v0.9.29 → v0.9.30 ) — joryirving/containers0 reactions · 1 comment
- Oct 4, 2026claude-code-plugins.github.rohitg00.agentmemory: init at 0.9.29 — sudosubin/agents.nix0 reactions
- Oct 1, 2026agent-skills.github.rohitg00.agentmemory: init at 0.9.29 — sudosubin/agents.nix0 reactions
- Sep 28, 2026Github trending [rohitg00/ai-engineering-from-scratch] 免费AI工程实战课 — web1992/github-trending0 reactions
- Sep 27, 2026[assessment] Competitor assessment 3×7: KIP, mem0, ruflo, MemPalace, [redacted vendor], cognee, agentmemory, [redacted vendor] Agent Memory, Haystack vs ai-memory release/v1.0.0 (level, value, licensing) — alphaonedev/ai-memory-mcp0 reactions · 11 comments
- Sep 27, 2026Github trending [rohitg00/ai-engineering-from-scratch] 523节AI工程实战课 — web1992/github-trending0 reactions
- Sep 25, 2026Add AgriciDaniel, AI Engineering from Scratch, and AgentMemory — CryptoSuess/FoutainOfYouth0 reactions
- Sep 25, 2026Github trending [rohitg00/ai-engineering-from-scratch] 免费开源AI工程实战课 — web1992/github-trending0 reactions
- Sep 4, 2026fix(container): update image registry.vzkn.eu/containers/agentmemory (0.9.28 → 0.9.29) — vrozaksen/home-ops0 reactions · 2 comments
- Sep 4, 2026[Issue]: 【三方 Provider】中希望可以支持agentmemory — omdsh-dev/dsh-mnemon0 reactions
- Sep 3, 2026Evaluate AgentMemory patterns against Memory OS retrieval + developer-agent context — antonypaul98/ai-memory-search-agent0 reactions
- Aug 27, 2026Github trending [rohitg00/ai-engineering-from-scratch] 免费AI工程全栈手册 — web1992/github-trending0 reactions
- Aug 26, 2026Github trending [rohitg00/ai-engineering-from-scratch] 511课系统提升AI工程能力 — web1992/github-trending0 reactions
On Bluesky · 20
- May 8, 2026Persistent #memory for #codeagents WebUI with graph Visualization, #MCP, #Skills, saves tokens. Builds #CodeGraph. Retrieval with Vector,… — @qdrddr.bsky.social6 likes and reposts · 1 reply
- Aug 26, 2026📦 rohitg00 / agentmemory ⭐ 27,459 (+60) 🗒 TypeScript #1 Persistent memory for AI coding agents based on real-world benchmarks — @github-trending-js.bsky.socialsays it tested it3 likes and reposts · 1 reply
- May 15, 2026This GitHub project caught my eye: agentmemory lets AI coding agents share persistent, searchable memory across sessions, with smart… — @alexiskirke.bsky.social3 likes and reposts
- Aug 1, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 rohitg00 / agentmemory ⭐ 26,310 (+120) 🗒 TypeScript #1 Persistent memory for AI coding agents based on… — @github-trending-js.bsky.social2 likes and reposts · 1 reply
- Jul 22, 2026📦 rohitg00 / agentmemory ⭐ 25,485 (+72) 🗒 TypeScript #1 Persistent memory for AI coding agents based on real-world benchmarks — @github-trending-js.bsky.socialsays it tested it2 likes and reposts
15 more on Bluesky
- May 20, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 rohitg00 / agentmemory ⭐ 13,586 (+1,244) 🗒 TypeScript #1 Persistent memory for AI coding agents… — @github-trending.bsky.social2 likes and reposts · 3 replies
- Sep 26, 2026📦 rohitg00 / agentmemory ⭐ 28,874 (+41) 🗒 TypeScript #1 Persistent memory for AI coding agents based on real-world benchmarks — @github-trending-js.bsky.socialsays it tested it1 likes and repost
- May 20, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 rohitg00 / agentmemory ⭐ 11,989 (+1,226) 🗒 TypeScript #1 Persistent memory for AI coding agents… — @github-trending-js.bsky.social1 likes and repost · 2 replies
- May 19, 2026今日のGitHubトレンド rohitg00/agentmemory Claude CodeやCursorなどのAIコーディングエージェントに永続的なメモリ機能を提供するツールです。 一度伝えた内容を記憶させることで、繰り返し説明する手間を省きます。… — @dailygithubtrends.bsky.social1 likes and repost
- May 14, 2026AIコーディングエージェントに永続的な記憶機能を追加して文脈を保持させるツールっぽい 面倒な再説明を減らして作業を効率化したいときに使えそう yug1224 starred rohitg00/agentmemory… — @yug1224.com1 likes and repost
- May 14, 2026One memory server. All agents share the same brain. 95.2% retrieval R@5. 92% fewer tokens. 51 MCP tools. 12 auto hooks. 0 external DBs.… — @mayankvora.bsky.socialsays it tested it1 likes and repost · 1 reply
- May 14, 2026今日のGitHubトレンド rohitg00/agentmemory Claude CodeやCursorなどのコーディングエージェント間で共有可能な永続メモリを提供します。… — @dailygithubtrends.bsky.social1 likes and repost
- May 14, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 rohitg00 / agentmemory ⭐ 6,897 (+1,335) 🗒 TypeScript #1 Persistent memory for AI coding agents… — @github-trending.bsky.social1 likes and repost · 2 replies
- May 12, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 rohitg00 / agentmemory ⭐ 5,271 (+430) 🗒 TypeScript #1 Persistent memory for AI coding agents based… — @github-trending-js.bsky.social1 likes and repost · 2 replies
- May 12, 2026今日のGitHubトレンド rohitg00/agentmemory agentmemoryは、Claude CodeやCursorなどのAIコーディングエージェントに永続的なメモリ機能を提供するツールです。… — @dailygithubtrends.bsky.social1 likes and repost
- May 9, 2026今日のGitHubトレンド rohitg00/agentmemory agentmemoryは、Claude CodeやCursorなどのAIコーディングエージェントに永続的なメモリを付与するツールです。 セッション間で設定や過去の経緯を記憶させ、再説明の手間を省きます。… — @dailygithubtrends.bsky.social1 likes and repost
- May 9, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 rohitg00 / agentmemory ⭐ 2,538 (+257) 🗒 TypeScript #1 Persistent memory for AI coding agents based… — @github-trending-js.bsky.social1 likes and repost · 2 replies
- Jun 22, 2026ただ、公式サイトは『12 auto-capture hooks』『every tool call, every prompt, every stop becomes a compressed observation』とも書いてる。 README でも No-op default… — @mel-echosphere.bsky.social0 likes and reposts · 1 reply
- May 10, 2026rohitg00/agentmemory #1 Persistent memory for AI coding agents based on real-world benchmarks Your coding agent remembers everything. No… — @llms.activitypub.awakari.com.ap.brid.gysays it tested it0 likes and reposts · 1 reply
- May 9, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 rohitg00 / agentmemory ⭐ 3,055 (+400) 🗒 TypeScript #1 Persistent memory for AI coding agents based… — @github-trending.bsky.social0 likes and reposts · 2 replies
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 104
No code comments explaining WHAT — use clear naming instead
- Very specific: line 105
Use fingerprintId() for content-addressable dedup, generateId() for unique IDs
- Very specific: line 109
Use recordAudit() for state-changing operations
- Very specific: line 114
All tests must pass before PR: npm test (1,596+ tests)
- Very specific: line 115
Before any npm publish: npm run release:gate must pass.
- Very specific: line 117
Test files go in test/ with .test.ts extension
- Very specific: line 118
Follow existing patterns in test/crystallize.test.ts for function tests
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agentmemory — Agent Instructions
Architecture
agentmemory is a persistent memory system for AI coding agents, built on iii-engine's three primitives (Worker/Function/Trigger). Everything goes through registerFunction/registerTrigger/sdk.trigger() — never bypass iii-engine with standalone SQLite or in-process alternatives.
- Engine: iii-sdk 0.22.1 with @iii-dev/helpers 0.22.1 (WebSocket to iii-engine 0.22.1 on port 49134; the client type is
IIIClient, HTTP requests areHttpRequestfrom@iii-dev/helpers/http) - State: File-based SQLite via iii-engine's StateModule (
./data/state_store.db) - Build: TypeScript → ESM via tsdown, output to
dist/ - Test: vitest (
npm testexcludes integration tests)
Consistency Rules
When adding or removing MCP tools, you MUST update ALL of the following:
src/mcp/tools-registry.ts— tool definition +getAllTools()arraysrc/mcp/server.ts— handler case in themcp::tools::callswitchsrc/triggers/api.ts— REST endpoint registrationsrc/index.ts— function registration + endpoint count in the log linetest/mcp-standalone.test.ts— tool count assertionREADME.md— tool counts (search for "MCP tools")plugin/.claude-plugin/plugin.json— tool count in descriptionplugin/plugin.jsonandplugin/.mcp.copilot.json(when present) — tool count or MCP exposure
When adding REST endpoints, you MUST update:
src/triggers/api.ts— endpoint registrationsrc/index.ts— endpoint count in the log lineREADME.md— endpoint count (search for "REST endpoints" and "endpoints on port")
When bumping version, you MUST update ALL of the following:
package.json— version fieldsrc/version.ts— VERSION constant and type unionsrc/types.ts— ExportData version unionsrc/functions/export-import.ts— supportedVersions settest/export-import.test.ts— version assertionplugin/.claude-plugin/plugin.json— version fieldplugin/plugin.json(when present) — version field
When adding new KV scopes:
src/state/schema.ts— add to the KV objectsrc/types.ts— add the corresponding interface
When adding new audit operations:
src/types.ts— add to AuditEntry.operation union type
Code Patterns
Function Registration
sdk.registerFunction(
"mem::your-function",
async (data: { ... }) => {
// validate inputs
// do work via kv.get/kv.set/kv.list
// record audit via recordAudit()
return { success: true, ... };
},
);REST Endpoint Registration
import type { HttpRequest } from "@iii-dev/helpers/http";
sdk.registerFunction("api::your-endpoint", async (req: HttpRequest) => {
const denied = checkAuth(req, secret);
if (denied) return denied;
const body = req.body as Record<string, unknown>;
// validate + whitelist fields (never pass raw body to sdk.trigger)
const result = await sdk.trigger({
function_id: "mem::your-function",
payload: { ... },
});
return { status_code: 200, body: result };
});
sdk.registerTrigger({
type: "http",
function_id: "api::your-endpoint",
config: { api_path: "/agentmemory/your-path", http_method: "POST" },
});MCP Tool Handler
case "memory_your_tool": {
// validate args with typeof checks
// parse CSV args: args.field.split(",").map(t => t.trim()).filter(Boolean)
const result = await sdk.trigger({
function_id: "mem::your-function",
payload: { ... },
});
return { status_code: 200, body: { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] } };
}Hook Scripts
Hook scripts in src/hooks/ are standalone Node.js scripts (no iii-sdk import). They read JSON from stdin, make HTTP calls to the REST API, and exit. There are two patterns depending on whether Claude Code consumes the script's stdout:
- Context-injecting hooks (
pre-tool-use,pre-compact,session-start) write recalled context to stdout for Claude Code to inject. These MUST usetry/catchwithawait fetch(..., { signal: AbortSignal.timeout(N) })— the script has to wait for the response before exiting, and the timeout is the only bound on hang time. - Telemetry-only hooks (
notification,post-tool-failure,post-tool-use,prompt-submit,stop,session-end,subagent-start,subagent-stop,task-completed) write nothing to stdout. These MUST use fire-and-forgetfetch(..., { signal: AbortSignal.timeout(N) }).catch(() => {})paired withsetTimeout(() => process.exit(0), 500).unref(). The unawaited fetch dispatches the request; the unref'dsetTimeoutforce-exits the process after the request has been flushed to the local daemon's socket buffer (~500ms is enough for single-request hooks; use 1500ms for multi-request hooks likestopandsession-endso all fetches have time to start, especially whenAGENTMEMORY_URLpoints to a remote daemon). Without thesetTimeoutNode keeps the event loop alive waiting for any in-flight fetch to settle, which means the hook still blocks Claude Code's next-prompt boundary for up to the AbortSignal duration — exactly the bug fire-and-forget is meant to fix.
Coding Standards
- TypeScript, ESM only (
"type": "module") - No code comments explaining WHAT — use clear naming instead
- Use
fingerprintId()for content-addressable dedup,generateId()for unique IDs - Parallel operations where possible (
Promise.allfor independent kv writes/reads) - Input validation at system boundaries (MCP handlers, REST endpoints)
- REST endpoints must whitelist fields — never pass raw request body to
sdk.trigger() - Use
recordAudit()for state-changing operations - Timestamps: capture once with
new Date().toISOString()and reuse
Testing
- All tests must pass before PR:
npm test(1,596+ tests) - Before any npm publish:
npm run release:gatemust pass. It installs the packed tarballs into a clean home and runs capture, recovery, restart, export/import, MCP and status checks against the installed CLI (see CONTRIBUTING.md, Release process) - Mock pattern:
vi.mock("iii-sdk")with mocksdk.trigger,kv.get/set/list - Test files go in
test/with.test.tsextension - Follow existing patterns in
test/crystallize.test.tsfor function tests
Current Stats (v0.9.29)
- 54 MCP tools (8 visible by default,
AGENTMEMORY_TOOLS=allfor all) - 138 REST endpoints
- 6 MCP resources, 3 MCP prompts
- 12 hooks, 17 skills
- 260+ iii functions
- 1,596+ tests
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

