Overview

The /api/memory surface gives agents durable memory primitives: documents, events, entities, edges, semantic query, and session-scoped key/value storage. It proxies to the memory service when available and falls back to local SQLite-backed storage when it is not. Session memory powers the model-facing memory tool, letting an agent read and write values keyed by session.

Base URL

Authentication

All endpoints require a valid bearer token in the Authorization header. See Authentication for details.

Endpoints

Health

Example response

Documents

List documents

Example response

Create a document

Request body

Example request

Example response

Events

List events

Example response

Create an event

Request body

Query memory

Proxies the query to the memory agent when available; otherwise returns a keyword-search stub.

Request body

Example response

Edges

Example response

Entities

List entities

Create an entity

Request body

Example response

Memory stats

Example response

Session memory

Session memory stores JSON values keyed by (user_id, session_id, key). It is the backing store for the agent memory tool.

Read a key

Example response

List keys

Write a key

Request body

Delete a key

Example response

Error codes