Agent Memory & Context
Memory gives your agents the ability to remember information — both within a single conversation and across multiple interactions. A support agent that remembers a caller’s name, a booking agent that recalls past appointments, or a sales agent that builds on previous conversations all rely on memory.How Memory Works
thinnestAI provides two types of memory:- Session Memory — Conversation history within a single call or chat session
- Agentic Memory — Long-term memory that persists across sessions, managed by the agent itself
Session Memory (Conversation History)
Session memory is automatic. Every message in a conversation — from both the user and the agent — is tracked and included as context for the agent’s next response. This means your agent always knows what was said earlier in the current conversation.How It Works
When a user says something, thinnestAI sends the full conversation history to the AI model along with the new message. The model sees everything that was said and responds in context. For example, in a phone call:Session Persistence
By default, each phone call or chat session is a separate conversation. When the session ends, the conversation history is saved and can be reviewed in Call Logs, but a new call starts fresh. You can configure session persistence to link conversations:- Per Phone Number — If the same phone number calls again, the agent has access to the previous conversation history.
- Per User — If the caller is identified (via phone number lookup or authentication), conversations are linked across all sessions.
- Time Window — Only recall conversations from the last N days.
Configuring Session Persistence
In the dashboard, go to Agent Settings > Memory:| Setting | Options | Description |
|---|---|---|
| Session Mode | isolated, persistent | Whether sessions are independent or linked |
| Lookup By | phone_number, user_id, email | How to identify returning users |
| History Window | 1-90 days | How far back to include past conversations |
| Max History Messages | 10-100 | Maximum number of past messages to include as context |
Agentic Memory
Agentic memory is a more advanced feature where the agent decides what to remember on its own. Instead of just replaying conversation history, the agent extracts and stores key facts, preferences, and context that it deems important.How It Works
When agentic memory is enabled, the agent has access to aremember tool. During conversations, it can choose to save information it considers important:
What Gets Remembered
The agent uses its judgment to decide what’s worth remembering. Typically:- User preferences — Communication preferences, scheduling preferences, product preferences
- Key facts — Name, account details, past issues
- Context — Ongoing issues, recent interactions, follow-up items
- Relationships — “This is John’s assistant calling about his account”
Enabling Agentic Memory
In the dashboard, toggle Agentic Memory on in your agent’s Memory settings. Via the API:Reviewing Stored Memories
You can view and manage what your agent has remembered:- Go to Agent > Memory in the dashboard.
- Browse stored memories organized by user/phone number.
- Delete or edit individual memories if needed.
Memory and Token Usage
Memory adds context to each request, which increases token usage. Here’s how to manage it:Session History
More history means more tokens per request. If you’re on a budget:- Reduce
max_history_messagesto 10-20 - Shorten
history_window_days - Use a model with a large context window (like Gemini) if you need long history
Agentic Memory
Stored memories are typically short summaries, so they add minimal token overhead. However, an agent with hundreds of memories for a single user will use more tokens.Recommendations
| Use Case | Session Mode | Agentic Memory | History Messages |
|---|---|---|---|
| One-off support calls | isolated | Off | N/A |
| Repeat customer support | persistent | On | 20-30 |
| Appointment booking | persistent | On | 10-20 |
| Sales / lead qualification | persistent | On | 30-50 |
| Surveys | isolated | Off | N/A |
Clearing Memory
Clear Session History
Clear Agentic Memories
Best Practices
- Start with session memory only. Enable agentic memory once your agent’s core behavior is solid.
- Review stored memories regularly. Make sure the agent is remembering useful things, not noise.
- Set appropriate history limits. Too much context can confuse the model and slow responses.
- Use persistent sessions for repeat callers. It dramatically improves the caller experience when the agent remembers them.
- Guide memory in your prompt. You can tell the agent what to remember:

