Chapter V

Knowledge management

How durable knowledge flows: cards, indexes, handoffs, sync. The goal is “future-me can pick up cold.”

Start here

If you want the full memory operating model this repo uses, read in this order:

  1. memory-token-optimization.md: physical layout, local embeddings, and why the memory index stays tiny
  2. memory-architecture.md: trust hierarchy, stale-claim handling, and the decay loop for cards
  3. ../ai-stack/self-improving-agents.md: memory sweep workflow that promotes recent session history into cards and rules
  4. claude-code-memory-handoffs.md: scheduled ingest path for machine-local handoffs back into canonical memory
  5. ../automation/openclaw-cron-deep-dive.md: cron scheduling patterns for sweeps, ingest jobs, and card-staleness scans

Recipes in this chapter

Bootstrap Files: What Each Agent File Owns

Your agent's personality, safety rails, memory index, and local runbook should not all live in one giant prompt. Split them by job so compaction, cache invalidation, and handoffs stay sane.

Claude Code and Codex Memory Handoffs: A Sync Path Into OpenClaw

If you run Claude Code or Codex locally alongside an OpenClaw gateway, you end up with multiple session memories. This guide describes the shared handoff format and ingester that keep OpenClaw as the…

Updated 2026-05-26

Memory Architecture

Memory in an agent stack is a layered store of point-in-time claims, not live state. Pick the wrong relationship between memory and current reality and your agent will confidently recommend file…

Memory Management & Token Optimization

How to build an AI agent memory system that doesn't eat your context window alive. From raw conversation history to semantic search with local embeddings.

Updated 2026-04-19

Obsidian Sync Without Conflict Roulette

One vault, one sync layer, one place for automation to write. That is how you get bidirectional cloud sync without waking up to three "conflicted copy" files and a broken notes index.

Session JSONL as Memory Source, Not Noise

Transcript logs are an audit trail and a mining seam. Treat them as search-only source material, not something to shovel raw into every prompt.