ReferenceREST API

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.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathagentIdyesAgent ID (ag_…).
LocationFieldRequiredDescription
BodytextyesNon-empty UTF-8 text, at most 10 KiB.
BodyuserIdnoImmutable Attribution; defaults to "".
HeaderContent-Typeyesapplication/json.

Response

StatusBodyLifecycle effect
201 CreatedMemoryResponseCreates 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: 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.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathagentIdyesAgent ID (ag_…).
LocationFieldRequiredDescription
QueryuserIdnoExact Attribution filter.
QuerysearchnoNon-empty full-text search.
QuerycursornoOpaque cursor.
QuerylimitnoPage size, default 50, maximum 100.

Response

StatusBodyLifecycle effect
200 OKMemoriesListResponseRead-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: 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.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathagentIdyesAgent ID (ag_…).
PathmemoryIdyesMemory ID (mem_…).

Response

StatusBodyLifecycle effect
200 OKMemoryResponseRead-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: 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.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathagentIdyesAgent ID (ag_…).
PathmemoryIdyesMemory ID (mem_…).
LocationFieldRequiredDescription
BodytextyesReplacement text, at most 10 KiB.
HeaderContent-Typeyesapplication/json.

Response

StatusBodyLifecycle effect
200 OKMemoryResponseUpdates 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: 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.

LocationFieldRequiredDescription
HeaderAuthorizationyesTenant API key or dashboard Supabase JWT.
PathagentIdyesAgent ID (ag_…).
PathmemoryIdyesMemory ID (mem_…).

Response

StatusBodyLifecycle effect
204 No ContentEmptyPermanently 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: delete. See Memory and Add durable Memory.

On this page