Copenhagen AI
CPH.AI
Approach
Capabilities
Insights
Research Institute
Copenhagen AI
COPENHAGEN AI
ENGINEERING EXCELLENCECREATIVE RENAISSANCEHYPER OPTIMIZATION

We function as the strategic bridge between sovereign infrastructure and autonomous intelligence. Bridging the gap between frontier breakthroughs and systematic industrial execution.

The AI Suite

  • Runestone
  • Bedrock
  • Ledger
  • Vector
  • Aegis
  • Prism

Institute

  • Academic Partnerships
  • Open Source
  • Research Blog

Careers

  • Open Roles
  • The Residency
  • Interviewing
  • Culture
Global Offices
© 2026 Kæraa Group. All Rights Reserved.
Terms of Service|Privacy Policy|Responsible Disclosure|Accessibility Statement
Back to Intelligence Stream
Memory ArchitectureLangGraphVector Stores

Agentic Memory: Beyond the Stateless Loop

Architecting persistent episodic memory for long-horizon autonomous agents.

Eng. Team Lead MAY 22, 2026 15 MIN READ

The Thesis: The Goldfish Problem

Every LLM in production today is a goldfish. It wakes up with no memory of the previous conversation. Every API call is a clean slate. For single-turn chatbots, this is fine. For autonomous agents operating over hours or days, it is a fatal flaw.

We built a Tiered Memory Architecture that gives agents persistent, structured recall—inspired by human cognitive science, implemented in vector math.

Episodic Memory
What happened (raw logs)
Semantic Memory
What it means (embeddings)
Procedural Memory
How to act (policies)
Working Memory
Current context (tokens)
Tiered Recall: Hot → Cold

The Four Memory Tiers

Human memory is not monolithic. We have episodic (what happened), semantic (what it means), procedural (how to act), and working (what I am doing right now) memory. We mirror this hierarchy:

1. Episodic Memory (Raw Logs)

Every observation, tool call, and output is logged as an immutable event with a timestamp. This is the agent's "diary." Stored in a time-series database (ClickHouse) and embedded into a vector store (Qdrant) for semantic search.

2. Semantic Memory (Distilled Knowledge)

A background process runs every N turns, summarizing raw episodic logs into compressed "lessons learned." This is where the agent learns that "API endpoint X rate-limits at 100 req/min." It is the agent's long-term understanding.

3. Procedural Memory (Action Policies)

Successful action sequences are cached as reusable "playbooks." If an agent successfully debugged a Kubernetes pod crash, it stores the sequence: kubectl describe → check events → identify OOMKill → increase memory limit. Next time, it skips the exploration phase.

4. Working Memory (Context Window)

The LLM's context window is the "RAM." It holds the current task, the last few interactions, and relevant memories retrieved from the lower tiers. We keep this lean—under 4K tokens—using a retrieval-augmented approach.

The Retrieval Equation

When the agent faces a new situation, it must decide what to recall. We compute a Relevance Score R for each memory as a weighted combination of semantic similarity and temporal recency:

R(m) = α · cos(equery, em) + β · e-Δt / τ

Where α weights semantic relevance (is this memory about the same topic?) and β weights recency (did this happen recently?). The time constant τ controls the "forgetting curve." We tune these per agent persona.

The Continuity Payoff

In our production deployment, agents with tiered memory completed long-horizon tasks 3.2x faster than stateless agents. More importantly, they exhibited emergent behavior: they began to anticipate.

An agent monitoring a trading system, after observing the same pre-market pattern for three consecutive days, proactively pre-warmed its analysis pipeline on day four—before the human operator even asked. This is not magic. It is memory. And it is the difference between a tool and an employee.

Subscribe to The Transmission

Get these engineering field notes delivered directly to your inbox. Signal only.