> ## 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.

# Get Agent Memory Schema

> Read what the agent remembers about each contact between calls.

### Overview

Returns the memory entity schema the agent runs with today: the kinds of things it tracks per contact, such as a booking or an order, and the fields it fills in for each one.

The schema comes from one of two places, and `source` tells you which. When the newest dev version carries `settings.memorySchema`, that is returned and `source` is `settings`. Otherwise the last schema the runtime inferred and cached is returned with `source` set to `cached_version`. An agent with neither returns an empty list and `source` of `null`, which means nothing is known yet rather than that the agent remembers nothing.

To produce a schema for an agent that has none, use [Infer Agent Memory Schema](https://docs.bland.ai/api-v2/post/agents-id-memory-schema-infer.md).

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**agent\_id** `string` *required*

The agent's unique identifier.

### Response

**data.entity\_schemas** `array`

The entity types the agent tracks per contact. Empty when nothing is known yet.

**entity schema object**

**entity\_type** `string`

Name of the entity, for example `trip`, `order`, or `quote`.

**description** `string`

What this entity represents.

**identifier\_field** `string`

The field used to tell one instance from another, for example `confirmation_number`.

**fields** `array`

Field definitions. Each has `name`, `description`, and `type`, plus optional `enum_values`, `required`, `array_item_type`, `array_item_schema`, `type_conversion`, and `conversational_format`.

**status\_field** `string`

Which field tracks the entity's lifecycle. Present only when one is set.

**outcomes** `array`

Possible end states for this entity. Present only when any are set.

**metadata** `object`

Extra context about the entity type. Present only when set.

**data.source** `string | null`

Where the schema came from: `settings` when it is saved on the agent's newest dev version, `cached_version` when it was inferred by the runtime, or `null` when `entity_schemas` is empty.

**errors** `null | array`

`null` on success, or a list of error objects if the request failed.

```json Response theme={null}
{
  "data": {
    "entity_schemas": [
      {
        "entity_type": "appointment",
        "description": "A dental appointment the caller books, moves, or cancels.",
        "identifier_field": "confirmation_number",
        "fields": [
          {
            "name": "confirmation_number",
            "description": "The booking reference given to the caller.",
            "type": "string",
            "required": true
          },
          {
            "name": "starts_at",
            "description": "When the appointment starts.",
            "type": "string",
            "type_conversion": {
              "natural_language_examples": ["tomorrow at 2", "next Tuesday morning"],
              "target_format": "ISO 8601 date-time"
            }
          }
        ],
        "status_field": "state",
        "outcomes": ["booked", "rescheduled", "cancelled"]
      }
    ],
    "source": "settings"
  },
  "errors": null
}
```

```json Nothing Known Yet theme={null}
{
  "data": {
    "entity_schemas": [],
    "source": null
  },
  "errors": null
}
```

```json Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NOT_FOUND",
      "message": "Agent not found"
    }
  ]
}
```

***

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.