Skip to Content

Schemas Endpoints

Schemas define the structure of the memories your agents can create. They act as blueprints for the extraction process.

Register Schema

Register a new schema for memory extraction.

Endpoint: POST /schemas

Request Body

FieldTypeRequiredDescription
namestringYesUnique name for the schema (e.g., UserProfile).
descriptionstringYesDescription of what this schema represents (used by the LLM).
cardinalitystringYessingle (one per user/agent) or multiple (many instances).
schemastringYesJSON Schema string defining the data structure.

Example Request

{ "name": "Task", "description": "A task that the user needs to complete", "cardinality": "multiple", "schema": "{\"type\":\"object\",\"properties\":{\"title\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}" }

Response

{ "success": true, "schema": { "name": "Task", "description": "...", "cardinality": "multiple" } }

List Schemas

Retrieve all schemas registered by your account.

Endpoint: GET /schemas

Response

{ "success": true, "schemas": [ { "name": "UserProfile", ... }, { "name": "Task", ... } ] }

Get Schema

Get details of a specific schema.

Endpoint: GET /schemas/[name]

Parameters

ParameterTypeRequiredDescription
namestringYesThe name of the schema.

Response

{ "success": true, "schema": { ... } }

Update Schema

Update an existing schema’s description or structure.

Endpoint: PATCH /schemas/[name]

Request Body

FieldTypeRequiredDescription
descriptionstringNoNew description.
schemastringNoNew JSON Schema string.
cardinalitystringNoNew cardinality (single or multiple).

Example Request

{ "description": "Updated task definition with priority" }

Delete Schema

Delete a schema. This prevents future memories from being created with this schema, but does not delete existing memories.

Endpoint: DELETE /schemas/[name]

Response

{ "success": true, "deleted": 1 }
Last updated on