Memory
How AgentForce agents remember conversations and what carries between threads.
Every AgentForce agent has memory, but it's scoped to threads. A single thread carries forward — every message in it stays in context. Switching to a new thread starts the agent fresh, except for a small slice of long-term context the agent keeps across threads.
Thread memory
A thread is one conversation. Inside a thread, the agent remembers:
- Every user message and every agent reply
- Every file attachment and its content
- Every tool call the agent made and its results
This is what lets you have multi-turn conversations without re-explaining context. "Try a more formal tone" makes sense as a follow-up because the previous message is still in scope.
Thread memory is unbounded — you don't have to start a new thread to keep the same one going. Some users have threads that span weeks of intermittent use.
Long-term memory (working memory)
Each agent has a small working-memory layer that persists across threads. This is where the agent stores stable facts about you that are useful regardless of which conversation you're in:
- Your name and role
- Your communication preferences
- Recurring projects and stakeholders
- Anything you've explicitly told the agent to remember
Working memory is per-user, per-agent. The Sales agent's memory of you is separate from the Content agent's memory of you. This matches how you'd brief a real teammate — different roles need different context.
The agent updates working memory based on signal from your conversations. You don't have to manage it manually.
What stays in a thread vs. what graduates to working memory
The agent decides this. As a rough heuristic:
- Stays in the thread: specific decisions made in this conversation, exact wording you gave, file content
- Graduates to working memory: stable preferences ("I always write in second person"), recurring people ("Maya is our head of design"), durable role context ("we're a B2B SaaS targeting mid-market")
If something important hasn't graduated, you can tell the agent directly: "Remember that we're targeting mid-market, not enterprise." The agent will write it into working memory.
Resetting
Two ways to start fresh:
- New thread — click + New conversation. Working memory still carries over; only the thread is fresh.
- Clear working memory — there's no UI for this today. If you really need a hard reset, contact support.
For most situations, a new thread is enough.
Cross-agent isolation
The agents don't share memory with each other. Telling the Sales agent that you're targeting mid-market doesn't show up in the Research agent's working memory. This is intentional — different agents have different views of you.
If you want context shared, copy-paste between threads, or set the same context with each agent the first time you use it.
Storage
Thread and working memory are stored in Mastra's memory layer (Postgres). They're scoped to your workspace and your user; no other user — even in the same workspace — can read your private agent threads.
For a deeper look at how memory works across Opisense, see Knowledge and Memory.