REST API
Memories API
Create, read, update, and delete memories via the REST API.
Create a memory
POST /v1/memoriesRequest body
{
"content": "The auth system uses JWT with short-lived access tokens...",
"title": "Auth Architecture",
"category": "core",
"tags": ["auth", "jwt", "security"],
"boundary": "private",
"hint": "architecture documentation for the auth system",
"source": "api"
}| Field | Type | Required | Description |
|---|---|---|---|
content | string | Yes | Memory content (markdown, text, code) |
title | string | No | Title (auto-generated if omitted) |
category | string | No | Category (auto-classified if omitted) |
tags | string[] | No | Tags for filtering |
boundary | string | No | private, team, public (default: private) |
hub_id | string | No | Target hub (default: personal) |
hint | string | No | Hint for classifier |
hub_reason | string | No | Reason for team hub push |
source | string | No | Source identifier |
source_agent | string | No | Agent identity |
project_context | object | No | Repo/project metadata |
Response
{
"data": {
"id": "mem_a1b2c3d4",
"title": "Auth Architecture",
"content": "The auth system uses JWT...",
"category": "core",
"tags": ["auth", "jwt", "security"],
"boundary": "private",
"state": "processing",
"created_at": "2025-01-15T10:30:00Z"
}
}List memories
GET /v1/memoriesQuery parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | number | Max results | 50 |
cursor | string | Pagination cursor | — |
sort | string | newest, oldest, accessed | newest |
category | string | Filter by category | — |
tags | string | Comma-separated tags | — |
boundary | string | Filter by boundary | — |
hub_id | string | Filter by hub | — |
Response
{
"data": {
"memories": [
{
"id": "mem_a1b2c3d4",
"title": "Auth Architecture",
"summary": "JWT-based auth with short-lived tokens...",
"category": "core",
"boundary": "private",
"created_at": "2025-01-15T10:30:00Z"
}
],
"next_cursor": "eyJpZCI6...",
"has_more": true
}
}Get a memory
GET /v1/memories/:idResponse
{
"data": {
"id": "mem_a1b2c3d4",
"title": "Auth Architecture",
"content": "The auth system uses JWT with short-lived access tokens...",
"summary": "JWT-based auth with short-lived tokens...",
"category": "core",
"tags": ["auth", "jwt", "security"],
"boundary": "private",
"state": "active",
"version": 1,
"access_count": 12,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:05Z",
"accessed_at": "2025-01-20T14:22:00Z"
}
}Update a memory
PATCH /v1/memories/:idRequest body
All fields are optional — only include fields you want to update.
{
"title": "Updated Auth Architecture",
"category": "core",
"tags": ["auth", "jwt"],
"boundary": "team"
}Delete a memory
DELETE /v1/memories/:idReturns 204 No Content on success.