> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bland.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> Preserve context across conversations by turning on memory for your agent.

## Introduction

Memory lets Bland agents remember people across conversations, including calls, SMS, and other channels, so each interaction feels continuous and personalized. When someone reaches out again, your agent already has context: who they are, what was discussed, and what still needs to happen.

Key capabilities:

> [card] Automatic contacts
>
> Bland creates and links contacts by phone number, email, or external ID with no manual setup.

> [card] Context that sticks
>
> Rolling summaries, structured facts, and open action items are maintained per contact.

> [card] Cross-channel
>
> The same contact is recognized across voice and SMS, with one coherent history.

***

## How it works

1. **Turn on memory** in your agent's Settings tab in [Agent builder](https://docs.bland.ai/agents/agent-builder.md#configure-settings). A new agent starts with memory on.
2. **Bland creates contacts automatically** when someone interacts, matched by phone number, email, or external ID.
3. **For each contact, Bland maintains:**
   * **Facts**: structured key-value information (name, preferences, account details, etc.)
   * **Summary**: a rolling plain-text overview of past conversations, used for agent context
   * **Open items**: action items or follow-ups (e.g. "Follow up on order delay", "Call back Friday")
   * **Entities**: structured objects tracked across conversations, like orders, appointments, or tickets
   * **Recent messages**: a sliding window of the latest exchanges across all channels

Memory belongs to the contact, not to any one conversation. In the memory API, a contact's memory is scoped to a persona or an agent phone number.

***

## Turn on memory for an agent

1. Open your agent in [Agent builder](https://docs.bland.ai/agents/agent-builder.md) and go to the Settings tab.
2. Turn memory on. A new agent opens with memory on, so check it before the agent takes a real call.
3. Define what the agent should remember in the memory schema section that appears below the toggle.
4. Save the agent, then [publish it to production](https://docs.bland.ai/agents/agent-builder.md#publish-and-promote).

Conversations with the agent read and update the contact's facts, summary, open items, and recent messages. Turning memory off later stops further extraction but does not delete what was already written.

> [!NOTE]
>
> The [Enable or Disable Memory](https://docs.bland.ai/api-v1/post/memory-enable.md) endpoint takes a legacy pathway or persona version, not an agent. For agents, use the Settings tab.

***

## Viewing memory in conversations and contacts

To see what one conversation added to a contact's memory, open it in [Conversations](https://docs.bland.ai/agents/conversations.md) and expand the **Memory** section in the right-hand column. It shows only what that conversation contributed.

To see everything the agent remembers about a person, open the **Contacts** tab on Conversations and click the contact. Their profile includes a Memory section. Contacts is organization-wide, even when you open it inside an agent.

Memory is cross-channel: the same contact's context is shared across voice and SMS. Hand-offs between channels, for example a call followed by a follow-up SMS, stay coherent without any extra work on your end.

***

## How memory evolves over time

Here is an example showing a contact and their memory building across two interactions with a support agent.

**First call: contact reaches out about a delayed order**

When the call comes in, Bland matches the phone number to a contact (creating one if it does not exist yet):

```json Contact record theme={null}
{
  "id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "phone_number": "+14155550192",
  "name": "Sarah Chen",
  "org_id": "11111111-2222-3333-4444-555555555555",
  "created_at": "2025-07-22T10:30:00.000Z"
}
```

By the end of the call, the memory record for this contact looks like this:

```json Memory after first call theme={null}
{
  "facts": {
    "name": "Sarah Chen",
    "phone": "+14155550192"
  },
  "summary": "Customer called about order #8821 which was delayed. Promised a follow-up within 24 hours.",
  "entities": [
    {
      "entity_type": "order",
      "entity_id": "order-8821",
      "facts": {
        "order_number": "#8821",
        "status": "delayed",
        "carrier": "UPS"
      },
      "status": "delayed",
      "last_discussed_at": "2025-07-22T10:30:00.000Z",
      "notes": "Customer was promised a follow-up within 24 hours"
    }
  ],
  "open_items": [
    {
      "type": "follow_up",
      "description": "Follow up on order #8821 delay status",
      "created_at": "2025-07-22T10:30:00.000Z",
      "priority": "high",
      "related_to": {
        "entity_type": "order",
        "entity_id": "order-8821"
      }
    }
  ]
}
```

**Follow-up SMS: customer checks in the next day**

Bland recognizes the same contact by phone number. The agent already knows about the order and the open follow-up. After the SMS conversation ends:

```json Memory after follow-up SMS theme={null}
{
  "facts": {
    "name": "Sarah Chen",
    "phone": "+14155550192",
    "preferred_contact": "sms"
  },
  "summary": "Order #8821 shipped and is now in transit. Expected delivery Friday July 25. Customer confirmed via SMS and prefers SMS over calls.",
  "entities": [
    {
      "entity_type": "order",
      "entity_id": "order-8821",
      "facts": {
        "order_number": "#8821",
        "status": "in_transit",
        "carrier": "UPS",
        "expected_delivery": "2025-07-25"
      },
      "status": "in_transit",
      "last_discussed_at": "2025-07-23T09:15:00.000Z",
      "notes": null
    }
  ],
  "open_items": []
}
```

The open item was resolved, the entity's status updated, a new fact was added, and the summary refreshed. On the next interaction, the agent picks up exactly where things left off.

***

## API and programmatic access

For custom flows or reading and writing memory programmatically:

* **[Contacts API](https://docs.bland.ai/api-v1/get/contacts.md)**: list and look up contacts by phone number, email, or external ID.
* **[Get Memory Context](https://docs.bland.ai/api-v1/get/memory-context.md)**: fetch everything the agent sees at the start of a conversation, including summary, facts, recent messages, entities, and open items.
* **[Get Memory Changes](https://docs.bland.ai/api-v1/get/memory-changes.md)**: see what was captured or updated during a specific call or SMS.
* **[Update Facts](https://docs.bland.ai/api-v1/patch/memory-contact-id-facts.md)** / **[Update Summary](https://docs.bland.ai/api-v1/patch/memory-contact-id-summary.md)**: write memory data directly.
* **[Reset Contact Memory](https://docs.bland.ai/api-v1/post/memory-reset.md)**: permanently clear all memory for a contact, scoped to a persona or agent number.
* **[Get Agent Memory Schema](https://docs.bland.ai/api-v2/get/agents-id-memory-schema.md)**: read the entity types an agent tracks per contact.
* **[Infer Agent Memory Schema](https://docs.bland.ai/api-v2/post/agents-id-memory-schema-infer.md)**: generate a suggested memory schema from the agent. To keep it, put it on `settings.memorySchema` and save a version with [Create Agent Version](https://docs.bland.ai/api-v2/post/agents-id-versions.md).

For standard use, you do not need to manage any IDs directly. Turn on memory for your agent and Bland handles the rest.

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.