Agent Memory

Agent Memory helps your agents personalize responses by remembering relevant details from your users' conversations. Use it to reduce how often your users repeat themselves and to help agents give more relevant answers over time.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions. Required add-on licenses vary by agent type.
Note
Note Beginning in April 2026, agent topics are now called subagents. There are no changes to functionality. During this transition, you may see a mix of the new and previous terms in our documentation.

An agent can remember a user's preferences, work context, or details from earlier requests, so the user doesn't repeat the same information in every conversation. Each agent stores memories separately for each user. Memories that one agent creates for a user aren't shared with other agents. However, when a user adds a memory for All Agents, all of that user's agents can use it.

How Agent Memory Works

When a user chats with an agent, Agent Memory identifies relevant information from the conversation and stores it as a memory. In future conversations, the agent uses these memories as context to give more relevant, personalized responses.

Users can also add memories themselves instead of waiting for an agent to learn them from a conversation. For Agentforce Employee agents in Lightning Experience, users can add a memory in the Memory & Preferences panel and choose whether it's for one agent or for All Agents. A memory for one agent applies only to that agent. When a user chooses All Agents, Agent Memory stores the memory once as a user-level memory, and all of that user's agents can use it. See Add a Memory. In a conversation, users can also ask an agent to remember something. See Manage Your Agent's Memories Conversationally.

Memory capture begins after you enable Agent Memory for an agent. For Agentforce Employee agents in Lightning Experience, memory capture begins only after the user opts in. See Manage Agent Access to Your Memories. On other supported surfaces, user opt-in isn't required.

When you disable Agent Memory for an agent, the agent stops using its stored memories, but it keeps the memories it already created.

Conversational memory is on by default for your org. You can turn it off for all agents and users with a single setting. When conversational memory is off, agents stop creating and using memories, even if Agent Memory is enabled for the agent. Agentforce keeps existing memories, and the Memory & Preferences icon disappears from the Agentforce panel. See Turn Off Conversational Memory for Your Org.

Each agent can store up to 50 memories per user. Each user can also store up to 50 user-level memories that all of their agents can use. The limits are separate. When a user reaches a limit, Agent Memory automatically replaces the oldest memory with the new one. Encourage your users to review their stored memories regularly, so they don't lose memories that matter to them.

Agent Memory uses your users' conversation data to personalize responses. That data stays within Salesforce and isn't shared with the large language model (LLM). Inform your users about how Salesforce collects and uses their data. See Trust and Agentforce.

Supported Agent Types and Surfaces

Agent Memory supports Agentforce Employee agents and Agentforce Service agents. These agents must use Agent Script in Agentforce Builder. Legacy agents don't support Agent Memory. How users manage their memories and memory preferences depends on the agent type and surface.

For Agentforce Employee agents in Lightning Experience, users add and manage their memories and memory preferences from the Memory & Preferences panel. On surfaces where the panel isn't available, such as a messaging channel or mobile app, users add and manage their memories and preferences by talking to the agent directly. See Manage Your Agent's Memories Conversationally.

For Agentforce Service agents, users manage their memory preference and stored memories conversationally, after you add the User Memory Management subagent. There's no disclaimer or separate opt-in step on Service agent channels.

When to Use Agent Memory for Agentforce Service Agents

Consider enabling Agent Memory for your Agentforce Service agents when your customers:

  • Return to continue troubleshooting an issue from an earlier conversation, such as following up on a support case.
  • Regularly contact support with the same preferences or context, such as a preferred shipping method or account details.
  • Have a process that spans multiple conversations, such as a multi-step return or dispute that isn't resolved in one interaction.

Personalize Responses with User Profile Information

Agent Memory personalizes responses using information learned from previous conversations. User profile context provides additional information about a user, such as their name, email, locale, or time zone, so the agent can personalize the interaction without requiring the user to provide those details in conversation.

The profile information that's available depends on the type of agent and the user record associated with the interaction. For Agentforce Employee agents, user profile context can include fields such as name, email, company, locale, and time zone. For Agentforce Service agents, the available profile information depends on whether the customer is associated with a User or Contact record. A User record provides the same user profile fields. For a Contact record, profile context includes the contact's name, email, and country. Use profile fields in agent instructions and prompt templates to personalize responses, or reference them as variables to define conditions in Agent Script.

User profile context works independently of Agent Memory. Profile information isn't stored as a memory and doesn't appear in the memories that users view or manage. Enable either feature independently, or use them together to give the agent more context about the user. To enable user profile context, see Enable User Profile in Agent Script.

Conversational Memory Management

Conversational memory management lets users manage the information that Agent Memory remembers about them by talking to the agent. For example, a user can ask the agent to remember something, show or delete a stored memory, or update whether the agent can create and use memories from their conversations.

To support these requests, add the User Memory Management subagent to your agent from the asset library in Agentforce Builder. The subagent includes the Get User Memories, Manage User Memory, Get Agent Memory Preference, and Update Agent Memory Preference actions. The subagent isn’t added automatically, so you must add it for users to manage their memories conversationally.

Examples of utterances classified to the User Memory Management subagent:

  • "Remember that I prefer short meeting summaries."
  • "Show what you remember about me."
  • "What do you know about my last conversation with you?"
  • "Delete what you remember about my shipping preference."
  • "Delete the memory about my last support case."
  • "Is memory enabled for me?"
  • "Turn off memory for this agent."
  • "Turn on memory for this agent."
  • Enable Agent Memory
    Enable Agent Memory at the agent level so the agent can recall relevant details from your users' conversations and personalize future responses. Enabling memory applies to all of your agent's users, and for Agentforce Employee agents in Lightning Experience, each user then individually chooses whether to opt in.
  • Turn Off Conversational Memory for Your Org
    Turn off conversational memory for all AI agents in your org at once, instead of one by one.
  • Enable User Profile
    Enable user profile context in Agent Script so your agent can personalize responses using available profile information about the users it interacts with. The profile information that's available depends on the type of agent and the user record associated with the interaction.
  • Manage Your Agent's Memories
    Manage how your Agentforce agents remember information about you across conversations.