List Agent Memories

Beta
GET/v1/ai/memories

This endpoint is idempotent. Learn more

Returns a paginated list of agent memories for the current account, newest first.

Memories whose expires_at has passed are excluded. The q search term matches against a memory's ID, category, content, and the ID of the record it is scoped to.

Permissions requiredValues:agent_memories:read
The role behind your API key or agent must grant every one of these permissions.
cursoroptional string

Opaque cursor token identifying where the page of results starts.

Use the cursor value embedded in a previous response's next_page_url or previous_page_url to fetch the adjacent page. Omit to start from the first page.

limitoptional integer

Maximum number of results to return in a single page.

qoptional string

Free-text search term used to filter results.

Which fields are matched against the term varies by endpoint.

categoryoptional string

Filter to memories with this exact category (e.g. preference, fact).

entity_typeoptional string

Filter to memories scoped to this entity type (e.g. customer, product).

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of agent_memory

Resources in this page.

idstring

Memory ID.

objectstringenumValues:agent_memory

Resource type identifier.

categorystring

The kind of information this memory holds, used to group related memories.

  • preference: how someone likes things done, such as a customer who always wants express shipping.
  • fact: a durable detail worth remembering about the account or one of its records, such as a customer's typical order size.
  • instruction: standing guidance for agents to follow, such as always confirming freight before issuing an order.
contentstring

The information itself, written as plain text for an agent to read.

metadataobjectnullable

Arbitrary metadata as JSON.

Encoded as a JSON value (object, array, string, number, boolean, or null), not a JSON-encoded string.

entityentitynullable

The platform record this memory is about (e.g. a specific customer or product).

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

importancenumber

Relative importance from 0 to 1, used to prioritize which memories the agent recalls.

An agent takes in only a limited number of memories per run, and the highest-importance ones are recalled first.

expires_atstring (date-time)nullable

When this memory stops being used.

Past this time the memory is no longer recalled by agents and is omitted from list results, but it is not deleted and can still be retrieved by ID. A memory with no expiration is used indefinitely.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

200

Successful response for List Agent Memories