Memories
Overview
Memory is durable Agent-owned text with immutable userId Attribution. Use these endpoints to create, search, inspect, update, or delete Memory; administrative reads never update lastAccessedAt, while Agent memory use affects eviction recency.
Endpoints
POST /v1/agents/:agentId/memories
Creates one text Memory. Memory belongs to the path Agent; userId is immutable Attribution, not access control.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Location | Field | Required | Description |
|---|---|---|---|
| Body | text | yes | Non-empty UTF-8 text, at most 10 KiB. |
| Body | userId | no | Immutable Attribution; defaults to "". |
| Header | Content-Type | yes | application/json. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
201 Created | MemoryResponse | Creates the Memory and may evict the least-recently-accessed row at the 500-per-Agent cap. |
The response includes Location: /v1/agents/:agentId/memories/:memoryId.
Response schema: memoryResponseSchema.
Errors
400 invalid_request; 404 not_found for the Agent. See REST errors.
cURL
curl --request POST "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/memories" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"text":"Prefers concise answers.","userId":"user-42"}'SDK and related guides
SDK: create. See Memory and Add durable Memory.
GET /v1/agents/:agentId/memories
Lists or searches Agent Memory. Memory belongs to the path Agent; userId is immutable Attribution, not access control.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Location | Field | Required | Description |
|---|---|---|---|
| Query | userId | no | Exact Attribution filter. |
| Query | search | no | Non-empty full-text search. |
| Query | cursor | no | Opaque cursor. |
| Query | limit | no | Page size, default 50, maximum 100. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | MemoriesListResponse | Read-only; list and search do not update lastAccessedAt. |
Use nextCursor for the next page.
Response schema: memoriesListResponseSchema.
Errors
400 invalid_request; 404 not_found for the Agent. See REST errors.
cURL
curl --get "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/memories" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--data-urlencode "userId=user-42" \
--data-urlencode "search=concise"SDK and related guides
SDK: list. See Memory and Add durable Memory.
GET /v1/agents/:agentId/memories/:memoryId
Gets one Memory. Memory belongs to the path Agent; userId is immutable Attribution, not access control.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path | memoryId | yes | Memory ID (mem_…). |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | MemoryResponse | Read-only; does not update lastAccessedAt. |
Response schema: memoryResponseSchema.
Errors
404 not_found for an unknown Agent/Memory pair. See REST errors.
cURL
curl "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/memories/mem_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: get. See Memory and Add durable Memory.
PATCH /v1/agents/:agentId/memories/:memoryId
Replaces one Memory's text. Memory belongs to the path Agent; userId is immutable Attribution, not access control.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path | memoryId | yes | Memory ID (mem_…). |
| Location | Field | Required | Description |
|---|---|---|---|
| Body | text | yes | Replacement text, at most 10 KiB. |
| Header | Content-Type | yes | application/json. |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
200 OK | MemoryResponse | Updates text and access time; userId cannot change. |
Response schema: memoryResponseSchema.
Errors
400 invalid_request; 404 not_found. See REST errors.
cURL
curl --request PATCH "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/memories/mem_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY" \
--header "Content-Type: application/json" \
--data '{"text":"Prefers answers under five lines."}'SDK and related guides
SDK: update. See Memory and Add durable Memory.
DELETE /v1/agents/:agentId/memories/:memoryId
Deletes one Memory. Memory belongs to the path Agent; userId is immutable Attribution, not access control.
Request
Requires bearer authentication. The credential selects the Tenant ownership boundary; reads and mutations are restricted to resources owned by that Tenant.
| Location | Field | Required | Description |
|---|---|---|---|
| Header | Authorization | yes | Tenant API key or dashboard Supabase JWT. |
| Path | agentId | yes | Agent ID (ag_…). |
| Path | memoryId | yes | Memory ID (mem_…). |
Response
| Status | Body | Lifecycle effect |
|---|---|---|
204 No Content | Empty | Permanently removes the row. |
Errors
404 not_found. See REST errors.
cURL
curl --request DELETE "$BLAZING_AGENTS_BASE_URL/v1/agents/ag_1234567890ABCDEF/memories/mem_1234567890ABCDEF" \
--header "Authorization: Bearer $BLAZING_AGENTS_API_KEY"SDK and related guides
SDK: delete. See Memory and Add durable Memory.