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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique name for the schema (e.g., UserProfile). |
description | string | Yes | Description of what this schema represents (used by the LLM). |
cardinality | string | Yes | single (one per user/agent) or multiple (many instances). |
schema | string | Yes | JSON 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
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of the schema. |
Response
{
"success": true,
"schema": { ... }
}Update Schema
Update an existing schema’s description or structure.
Endpoint: PATCH /schemas/[name]
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
description | string | No | New description. |
schema | string | No | New JSON Schema string. |
cardinality | string | No | New 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