Code of the West Agent Architecture — How an agent remembers, learns, and grows
agent_end. Consumed on next session_start. The bridge between sessions. Contains key topics, temporal markers, and an Open Threads section — regex-extracted commitments, TODOs, and investigations from conversation + scan of active project manifests (up to 7 threads).
before_agent_start:
cognitive-dynamics.jsonl. Research substrate behind the linked paper on agent latent-state dynamics.
| Mem0 | MemPalace | Wiki-Memory | COTW | |
|---|---|---|---|---|
| Storage | Extracted facts | Verbatim + structure | Compiled wiki | Hybrid: archive + vectors + knowledge + identity |
| What decides to remember | AI extraction | Nothing (store all) | Ingest pipeline | Multi-layer: raw archive + selective indexes + metabolic flagging + human-gated crystallization |
| Retrieval | Vector + graph | Metadata filtering | Wiki lookup | 4-way RRF: semantic + keyword + temporal + graph |
| Identity | None | None | None | 9-layer hierarchy, stateless reconstruction |
| Autonomous processing | None | None | None | SEAL: metabolism → contemplation (3-pass/20h) → crystallization (3-gate + human review) |
| Thread scoping | user_id / agent_id | Wings / rooms | Wiki pages | Infinite threads: persistent project scopes with 80% RRF boost, LLM warm start, consolidation |
| Hallucination prevention | None | Verbatim storage | None | Source-anchoring guardrails + truth table + proper noun detection |
| Growth tracking | None | None | None | Standing dimensions (Courage/Word/Brand) with overnight synthesis |
| Cost | $19-249/mo | Local (no cloud) | Local | Local (no cloud costs) |