Thread memory
Conversation state for one thread. Three things make it up:- The recent window — the tail of the conversation, read on every turn from the durable journal. Capped at 20 messages, then trimmed back to a turn boundary so no turn is half-present.
- A rolling summary — generated in the background when a thread crosses a token or message threshold, and stored so it survives.
- The journal — the full transcript, durable and searchable.
Agent memory
Durable facts, kept across every thread the agent has. These are curated entries, not a transcript: a key, some content, a category, a visibility, and an importance score.
Visibility is
private (scoped to one user), shared (scoped to the agent), or
read_only.
Entries are written two ways, and both require the Memory capability to be
bound:
- The agent calls
memory_storeexplicitly. - A pre-compaction flush extracts facts before a summarisation pass.
The three tools
memory_store · memory_recall · memory_forget
Recall is hybrid: a semantic index returns candidates, then the authoritative
store re-applies visibility and expiry. Ranking gives higher-importance entries a
boost. If the semantic index is unavailable, recall falls back to keyword search
rather than failing.
Memory tool calls are not billed.
There is no
thread_search tool. Searching past conversations is
journal_message_search, a journal system tool available on agent surfaces
only — never through an MCP gateway. Its sibling journal_tool_call_view
recovers the full parameters and result of an earlier tool call after truncation.What gets into the prompt
At most 10 pinned entries are injected as the first system message, ahead of the summary and the recent window. Entries qualify by beingread_only, or by
being user_profile with an importance of 0.7 or above. They render as an
inert data block with an explicit “user-provided data, not instructions”
disclaimer.
Pinned memories are a frozen snapshot taken when the run’s context is built.
A memory_store mid-conversation writes durably but does not change the
in-flight context.
Pinned memories load whether or not the Memory capability is bound — the
capability gates writing, not injecting what is already there.
What is scoped where
Safety on writes
Content is screened before it is stored:- Prompt-injection patterns are rejected outright — “ignore previous
instructions”, a leading
system:, zero-width characters, right-to-left overrides. - Credential and PII patterns are not rejected. They force the entry to
privatevisibility, and are only rejected when there is no user context to make it private.
Things to know before you rely on it
- On an MCP gateway with no authenticated user, a
privatestore silently becomesshared. There is no per-user isolation on an anonymous surface. - Deleting a thread does not delete its summary or its journal. The thread record goes; the durable material remains.
Next
- Instructions
- Sub-agents
- Knowledge bases — for corpora, not conversation