Memory

AgentsMemory

By default, an agent keeps nothing between runs: every conversation starts completely fresh. The Memory setting changes that: choose Conversation, give it a conversation ID, and the agent saves the conversation under that key. Later runs load history according to the memory mode and the model's context limits.

When durable tool history is enabled for your workspace, that history also includes completed tool calls and their results or errors. The agent can remember what it did, such as looking up an order, even when the run failed before giving its final answer. See the Agent block's memory settings for tool-history and retry behavior.

Uploaded attachments stay linked to the message that included them. Memory stores file references; each later run reads the accessible files again and prepares them for the selected provider. Attachments follow the selected memory window and the source file's storage retention. A replay can include up to 20 attachment references; use a smaller memory window for longer file-heavy conversations. Files omitted by older versions of memory need to be attached again.

What you will learn

Runs start fresh by default

Without memory, a customer who explained everything yesterday has to explain it all again today: the agent has no record that yesterday happened.

One setting and a key

Memory is configured on the Agent block: pick Conversation, choose a conversation ID, and each turn is saved under that key as it happens.

Recall happens before the model runs

On the next run, selected history under the key is loaded into the conversation before the model answers.

Keys are separate threads

Each conversation ID is its own thread, so one agent holds a different conversation with every customer. Sliding-window modes keep the most recent messages or tokens when a thread outgrows the model.

Here is the agent from the video with Memory set on the block:

The same agent, with and without memory

The video runs the same agent twice, side by side: once with no memory and once with the conversation ID. The same follow-up question arrives in both. Without the key, the agent starts from zero and has to ask for everything again; with it, the earlier conversation supplies the context needed to answer the follow-up.

When conversations grow

Memory can also be a sliding window, keeping the most recent messages, or the most recent tokens, while the oldest quietly fall away. The stored transcript keeps every turn; the window controls how much of it rides into the model on each run.

Tool exchanges stay together when history is selected. They do not each count as a message in a message window, but their contents still use input tokens. Large results may appear as previews, and history is not automatically summarized. A token window gives more direct control over recalled context than a message count; neither setting caps the total cost of a run that makes further model or tool calls.

When to use memory

Enable memory when a follow-up needs earlier conversation context, such as a support ticket or sales conversation. Keep classification and extraction stateless when each input contains everything the task needs.

Common Questions

Conversation recalls stored history subject to history-loading and model context limits. Sliding window (messages) selects the most recent messages, and sliding window (tokens) selects recent history against a token budget. Tool-call groups stay together.
Any stable key that identifies the thread: a customer ID, a ticket number, a channel ID. Runs that share the key share the conversation; runs with different keys never see each other's history.
Recalled messages, tool arguments, and tool results use input tokens. Sliding-window modes reduce how much history is recalled, but a message count is not a token limit and a memory window does not cap the total cost of the run.
In your Sim workspace, as a stored transcript per conversation ID. You can inspect it, and the agent reads from it automatically before each run.