docs: AI memory worker design + reorganize docs/ to canonical layout#106
Merged
Conversation
Two new docs slotted into the canonical docs/ layout established by PR #99: - docs/research/ai-memory-systems-survey.md (287 lines) Survey of 10 systems: Mem0, Letta/MemGPT, Zep/Graphiti, A-MEM, Cognee, MemMachine, LangMem, Claude memory tool, ChatGPT memory, OpenMemory MCP. Covers four-type memory taxonomy (episodic/semantic/procedural/profile), three-stage pipeline (extract/consolidate/retrieve), storage substrates (vector/graph/ JSON/files), retrieval mechanics (tool-call vs pre-call RAG vs full-context injection), portability formats (Letta .af, JSON Agents PAM, JSONL), privacy patterns, LoCoMo/LongMemEval benchmarks. - docs/plan/agentkeys-memory-design.md (796 lines) Design plan for evolving crates/agentkeys-worker-memory from a blob-storage primitive into a structured-memory service. Headline invariants: worker NEVER calls an LLM (embeddings come from caller); LLM never sees the whole memory (top-K snippets only); LLM is replaceable without re-keying. Storage: one S3 object per JSONL line at bots/<actor>/memory/episodic/<date>/ <ulid>.enc with atomic per-key PUT, HEAD-for-dedup, clean K3 rotation. Brute-force cosine over packed-binary index file is the v0 default (vector DB deferred as operator-elected cache). Prerequisite M-1: envelope v3 lands in agentkeys-worker-creds as a separate PR before any memory-worker code change. Plan went through /plan-eng-review (18 findings folded, 8 new test files spec'd, 4 critical failure modes covered, parallelization lanes documented). The two files are pre-implementation research and design. No code, no API changes, no migration. They inform the next batch of issues filed against crates/agentkeys-worker-memory.
df72051 to
53ccc9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two related changes in one PR. They land together because the docs reorganization establishes the canonical
docs/plan/location that the new memory plan inhabits.1. New AI memory worker design plan + research
docs/research/ai-memory-systems-survey.md— survey of 10 systems (Mem0, Letta/MemGPT, Zep/Graphiti, A-MEM, Cognee, MemMachine, LangMem, Claude memory tool, ChatGPT memory, OpenMemory MCP). Covers the four-type memory taxonomy (episodic / semantic / procedural / profile), three-stage pipeline shape (extract → consolidate → retrieve), storage substrates (vector / graph / JSON / files), retrieval mechanics (tool-call vs pre-call RAG vs full-context injection), portability formats (Letta.af, JSON Agents PAM, JSONL), privacy patterns, and the LoCoMo / LongMemEval benchmarks.docs/plan/agentkeys-memory-design.md— AgentKeys-specific design for evolvingcrates/agentkeys-worker-memoryfrom today's blob-storage primitive (memory_put/memory_get) into a structured-memory service. Key invariants:/v1/memory/searchreturns top-K snippets only.Storage: one S3 object per JSONL line (
bots/<actor>/memory/episodic/<YYYY-MM-DD>/<ulid>.enc) — atomic per-key PUT + cheap HEAD-for-dedup + clean K3 rotation. Brute-force cosine over a packed-binary index file on S3 is the v0 default (~50ms for 100K vectors at 1536 dim); vector DB is a deferred operator-elected cache layer.Prerequisite (M-1): envelope v3 lands in
agentkeys-worker-credsas a separate PR before any memory-worker code change. Widens AAD to(operator_omni, actor_omni, service, k3_epoch)and adds an explicit K3 epoch byte to the envelope header.Plan has been through
/plan-eng-review— 18 findings folded back in, 8 new test files spec'd, 4 critical failure modes covered.2. Reorganize
docs/to the canonical layoutMatches the layout enforced by the
agentkeys-docsskill:Moves (29 total):
Cross-link rewrites (80+):
Zero reorg-caused broken intra-repo links remain. (25 pre-existing broken refs to external content like `~/Projects/lifeKnowledge/` are flagged as out-of-scope TODOs.)
Test plan
Notes for reviewers