Memory

The memory namespace is what the agent remembers about your tenant. It comes in two flavors that serve different recall patterns and get assembled together at the start of every agent run.

Episodic vs semantic

EpisodicSemantic
ShapeConcrete events with timestampsAbstract facts, no time anchor
Example"On 2026-05-30 the user asked to summarize Acme's pipeline""The user prefers brief summaries over verbose ones"
LifetimeBounded by retention (default 90 days)Unbounded — semantic facts persist
SourceAuto-logged from every agent runPromoted from episodic memory by the promotion pipeline
Storageagent_episodes (Postgres)knowledge_graph semantic nodes

The agent doesn't think about the split. It sees one MEMORY block that's been assembled from both sources, ordered by relevance to the current task.

How recall works

For each agent run, the context assembler:

  1. Takes the user's question + the current surface (Today, Inbox, chat, etc.).
  2. Embeds it.
  3. Runs two parallel queries:
    • Episodic: vector similarity over recent agent_episodes, filtered by tenant.
    • Semantic: graph_semantic_search RPC over semantic nodes tagged kind='memory'.
  4. Interleaves the top-N results into one MEMORY block.

You can see the exact assembled MEMORY for any agent run by clicking View context in the run drawer.

The promotion pipeline

Episodic memory is a firehose — it grows linearly with usage. If it never compacted, recall would degrade as the relevant signal got buried under repetition.

The memory promotion pipeline runs nightly and:

  1. Scans recent episodes (default: last 7 days).
  2. Clusters semantically similar episodes (cosine similarity > 0.85).
  3. Asks the orchestrator to extract a single abstracted fact from each cluster (e.g. 100 "user asks for brief summaries" episodes → one "user prefers brief summaries" semantic fact).
  4. Writes the fact to the knowledge graph as a semantic memory node.
  5. Optionally archives the source episodes (configurable retention).

The result: as the platform learns more, MEMORY shifts from "here are 50 recent things that happened" to "here are 8 stable facts about you, plus the 3 most relevant recent events." The agent sees less noise and more signal over time.

What ends up in memory

TypeCaptured?Example
User questions to the agentYes (episodic)"What's our pipeline look like?"
Agent responsesSummarized (episodic)The orchestrator's final synthesis
Tool callsYes (episodic, structured)graph_semantic_search(...) + result count
User preferencesYes (semantic, promoted)"prefers JSON over prose for technical answers"
Business factsNo — those live on the entity, not in memoryDeal stages, contact details

Memory is about how you interact with the agent. Entity facts (deals, contacts, etc.) live on the entities themselves and the agent retrieves them via the knowledge graph.

Resetting memory

Sometimes you want to start clean — for testing, or because the agent latched onto an outdated pattern.

Cloud: Settings → Privacy → Reset agent memory. Soft-deletes episodic + semantic memory for your user. Doesn't touch entity data.

Self-host: Same UI path, plus the ccd memory reset --user <id> CLI for scripted use.

Memory regenerates as you use the platform; there's no permanent loss beyond what was in memory itself.

Multi-tenant safety

Every memory query is strictly tenant-scoped at the database level via RLS. The agent never sees memory from another tenant even in cross-tenant flows like benchmarks — those flows operate on aggregates, not on raw memory rows. See Security model for the RLS contract.

Read next

  • Skills — the other half of "what does the agent bring to a run" — reusable playbooks instead of recalled events.
  • Knowledge graph — where semantic memory actually lives + how its kind='memory' filter intersects with entity nodes.