Memory Architecture: Three Horizons, One Production Agent
OpenClaw Academy · Part 2, Issue 11
Context Studios runs “Timmy,” a production OpenClaw agent that orchestrates more than 20 MCP tools across a team’s workflows. Their engineering blog documents something that most agent tutorials don’t acknowledge: conversations feel continuous even though every session is technically fresh. This continuity doesn’t happen by accident. It requires a deliberately designed three-tier memory architecture.
Most OpenClaw deployments have only one tier — session memory, which is automatic — and wonder why the agent seems to forget things. The answer: the agent does forget things, because episodic and semantic memory don’t exist unless you build them.
The three memory horizons
Session memory is the conversation you’re currently in. Everything said in this session is available within it. When the session ends, it is written to a session file and no longer in active context. No design required. Every OpenClaw deployment has this automatically.
Episodic memory is the last seven days. What did you work on yesterday? What decisions did you make on Tuesday? What was the outcome of the task you started on Monday? Session memory captures what happened within one conversation. Episodic memory captures what happened across conversations over the week.
Episodic memory requires explicit design: a daily summary process that creates a dated memory file, and a skill that reads the last two days of those files at session start. Without this, every Monday morning the agent treats the previous week as if it never happened.
Semantic memory is accumulated knowledge — patterns the agent has learned about you, your preferences, your projects, your working style — built up over months. It lives in MEMORY.md and grows through deliberate curation. Unlike episodic memory (which captures events), semantic memory captures conclusions: “Prefers bullet summaries over prose,” “Production database is read-only for the agent,” “PR reviews should always tag @alice.”
The three horizons serve different purposes and require different infrastructure. An agent with only session memory is useful for individual tasks. An agent with all three horizons is a genuine personal operating system.
The Active Memory plugin changes the retrieval model
The default memory model in OpenClaw: load all relevant memory files at session start, up to a configured token limit. Every session starts by reading MEMORY.md and recent session files — regardless of whether any of that content is relevant to today’s task.
At small scale this is fine. At six months of operation, MEMORY.md can be 500+ lines. Loading it all on every turn costs 5,000+ tokens before the task even starts. The Active Memory plugin (introduced 2026.4.10) solves this with retrieval-augmented generation: instead of loading all memory, it computes embedding similarity between the current message and memory fragments, loading only the relevant ones.
The practical difference: a 500-line MEMORY.md with Active Memory loads 200–400 tokens of relevant fragments per turn instead of 5,000+ tokens of the entire file. At Anthropic Sonnet rates, this saves approximately $0.04/turn — which across 50 turns per day is $2/day, or $730/year. For a production agent that runs for months, this is not a cosmetic optimisation.
Three things to carry forward: 1. Session memory is automatic. Episodic and semantic memory require deliberate design. 2. Without episodic memory, the agent forgets everything that happened in previous sessions. 3. Active Memory plugin (2026.4.10+) retrieves relevant fragments instead of loading all memory — significant cost savings at scale.
Issue 12 drops Thursday — complete three-tier memory implementation: daily-summary.sh, session-recall skill, semantic curation skill, and the Active Memory plugin configuration. The vault asset is the exact setup used on a six-month production deployment.



