Memory is what separates a useful agent from a frustrating one. Without it, every message is a blank slate. The agent forgets what you said 30 seconds ago. With the right memory configuration, your agent maintains conversation context, learns user preferences, and builds organizational knowledge over time. Xpander gives you three types of memory, each serving a different purpose. Configure them in the Memory tab of the Agent Studio.Documentation Index
Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
Use this file to discover all available pages before exploring further.

- Session Storage: conversation history within a thread
- User Memories: personal facts about each user that persist across all conversations
- Agent Memories: global knowledge that applies to all users
Session Storage
Session storage is short-term memory. It keeps the conversation history within a single thread so the agent remembers what was said earlier in the same conversation. Every conversation thread has its own history. As long as messages are in the same thread, the agent sees the full history up to the configured limit. Starting a new thread means a clean slate. The agent won’t remember what was said in a previous conversation. Multiple users can share the same thread (e.g., a support ticket where Alice opens the conversation and Bob follows up). Both see the same conversation history, but the thread is still self-contained. Nothing carries over to other threads. Each session storage is associated with one thread. Every session connects a user and the agent, and gets its own isolated storage right beside it.| Setting | What it does | Recommendation |
|---|---|---|
| No. of history runs | How many past exchanges the agent can see. 1 run = 1 user message + 1 agent response. | 3–5 for most use cases. 10 if conversations are long and context-heavy. |
User Memories
User memories store personal facts about individual users that persist across all conversations. When Alice tells your agent “I prefer metric units” in Thread 1, the agent remembers that when she starts Thread 2, Thread 3, or any future conversation. User memories are scoped touser_id. They follow the user, not the thread.
Each user’s memories are completely isolated. Alice’s preferences never leak into Bob’s conversations, even when they interact with the same agent. This makes user memories safe for multi-tenant environments where personalization matters but privacy is critical.
User memory is associated with the user, not with any session or agent. Every session connects a user and the agent, but the memory sits right beside the user and follows them across all sessions.
| Setting | What it does |
|---|---|
| Enable User Memories | Turns the feature on or off. |
| Agentic managed | When enabled, the agent decides what to remember automatically. When disabled, memories must be created manually via the update_user_memory tool (actions: add, update, delete, clear). |
Agent Memories
Agent memories are shared knowledge that affects all users. Think of them as organizational facts the agent learns over time: “Our support hours are 9-5 EST,” or “The most common billing issue is duplicate charges.” Unlike user memories, agent memories are scoped only toagent_id. Any memory created here becomes part of every conversation for every user. When Alice’s interaction teaches the agent that “the billing API was updated last week,” Bob and every other user will see that knowledge in their next conversation.
This is useful for building shared organizational knowledge, but it means a single user’s interaction can change behavior for everyone.
Agent memory is associated with the agent itself. Every session connects a user and the agent, and the memory sits right beside the agent, shared across every session.
| Setting | What it does |
|---|---|
| Enable Agent Memories | Turns the feature on or off. |
| Agentic managed | When enabled, the agent creates and updates memories automatically based on interactions. They are managed via the create_or_update_cultural_knowledge tool. |
Agentic vs. Manual Memory
You have two choices for how memories get created and maintained.| Agentic Managed | Manual | |
|---|---|---|
| How memories are created | Agent decides what to save automatically | You (or your team) create memories manually |
| Maintenance | Self-updating, less work for you | Full control, more maintenance |
| Best for | Internal tools, single-tenant use cases, rapid iteration | Production systems, compliance environments, multi-tenant deployments |
| Risk | Agent may save inaccurate or unwanted information | Slower to learn, requires ongoing attention |
Memory Optimization
These settings help you manage token usage and performance for tool-heavy agents. They appear in the Memory tab in the order listed below.Max Tool Calls from History
Limits how many past tool call results are included when loading conversation history. Set to 0 (disabled) for most cases. Only enable if you’re consistently hitting token limits.Session Summaries
Automatically summarizes long conversations into a compact summary for future reference. This does not affect the agent’s context window. It’s metadata for monitoring and observability dashboards.Tool Calls Compression
When your agent makes many tool calls in a single conversation, the raw outputs pile up in context and eat through tokens. Tool calls compression condenses verbose outputs after a threshold number of calls.| Setting | What it does | Default |
|---|---|---|
| Enable compression | Turns on automatic compression of tool outputs. | Off |
| Threshold | Number of tool calls before compression kicks in. After N tool calls, summaries replace prior verbose results to keep context within limits. | 3 |
| Compression instructions | Optional guidance on what to keep vs. drop when compressing. Keep exact numbers, dates, entities, URLs, causal links; remove boilerplate and repetition. | - |
Memory Optimization Strategy
Controls how the agent manages its context window during long executions. This is especially useful for agents that handle extended conversations or make many tool calls in a single session.| Mode | What it does |
|---|---|
| Disabled | No optimization. The full conversation history (up to the configured history runs) is included as-is. This is the default. |
| Summarization | Condenses older messages while preserving key points and tool call results. Reduces token usage while retaining the important context from earlier in the conversation. |
| Context | Retains the initial instructions and the most recent messages, summarizing everything in between. Best for long-running executions where the beginning (task definition) and end (recent progress) matter most. |
Troubleshooting
Agent forgets what I said earlier in the conversation
Agent forgets what I said earlier in the conversation
Make sure you’re passing the same
session_id for all messages in the thread. Increase history runs to 3+.User memories aren't working
User memories aren't working
Verify
user_id is being passed consistently. Check that User Memories is toggled on.Agent is slow or hitting token limits
Agent is slow or hitting token limits
Reduce history runs. Enable tool calls compression. Lower max tool calls from history.
Agent remembered something it shouldn't have
Agent remembered something it shouldn't have
Review and delete the memory. Consider switching from agentic to manual management.
Agent memories affecting the wrong users
Agent memories affecting the wrong users
Agent memories are global. Move user-specific facts to User Memories instead.
Next Steps
AI Models & Intelligence
Model selection, planning mode, and reasoning mode
Knowledge Bases
Give your agent searchable document knowledge
Testing & Chat
Test memory behavior in the built-in chat
Agent Configuration
Full overview of all Agent Studio settings

