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).
candidateOnly; only verified claims reach the trusted prompt context.observe (record only), diagnostic (record + report), enforce (verified eligible for live injection). Mode transitions are operator-gated.att_... id, kind, filename, MIME type, size, SHA-256, source path, source status, text excerpt, observation excerptbefore_agent_start:
scaffold_proposal receipts with evidence, expected effect, verification, and rollback metadata.
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 |
| Provenance | None | Verbatim retains source by default | None | Every claim source-addressable; candidate vs. verified two-lane boundary; verified-only injection gate |
| Attachments | Provider/application dependent | Stored as artifacts in local project context | Imported into wiki pages | Receipt-backed images/docs with source path, SHA-256, turn linkage, bounded excerpts, and explicit re-verification gaps |
| Builder harness | Memory API only | Memory architecture only | Knowledge base workflow | PRDs, deep research loops, code receipts, proposal-only evolution, and continuity-aware handoffs |
| Research platform | Product analytics separate from memory | Experiment logs outside the memory map | Research notes in the knowledge base | Exchange trace spine, Harness Refiner scoring, retention tiers, cognitive diagnostics, redacted bundles, and future-training manifests |
| Runtime mutation control | None | None | None | Operator-gated apply / rollback workflow; protected fields unreachable from agent tool surface |
| Growth tracking | None | None | None | Standing dimensions (Courage/Word/Brand) with overnight synthesis |
| Cost | Hosted / paid tiers | Local runtime | Local | Free local continuity substrate; model costs depend on the selected GPT 5.5/provider route |