Skip to content
agentics.you

Docs

Memory REST API reference

The memory REST API lets your own code add, list, search and delete memories over HTTPS. Every route below is under https://agentics.you/v1/. The reference on this page is generated from the OpenAPI 3.1 description at /developers/openapi.yaml, so the two always agree. Agents in MCP clients use the MCP server instead.

Authentication

Send an org API key as a bearer token. A workspace admin creates one in the console under API keys. It starts ak_ and is shown once.

bash
export AGENTICS_API_KEY="ak_..."
curl https://agentics.you/v1/memories \
  -H "Authorization: Bearer $AGENTICS_API_KEY"

A key reaches only the namespaces it is bound to. A new key is bound to your workspace's default namespace, so it works on its first call. A signed-in workspace admin can change a key's namespaces with PUT /v1/keys/{key_id}/namespaces, under Keys below. A key created with the memory.read or memory.write scope is narrowed further: reads need either, writes need memory.write. The console's own pages use the signed-in session instead of a key. A virtual key (vk_) and an agent key (agk_mcp_) are not accepted here. See Scoping.

Conventions

  • Bodies are JSON, and every field is snake_case.
  • A list answers { "data": [...], "next_cursor": "..." }. Pass next_cursor back as cursor until it is null.
  • An error answers { "error": { "code": "...", "message": "...", "details": {...} } }. Match on code. Every code, its status and what to do is on Errors and limits.
  • A write is a receipt. A memory's receipt_id and the receipt_id of a delete can be checked like any other receipt. See Receipts.
  • The webhook routes under Webhooks also need an x-agentics-agent header naming the agent that owns the webhook. When a matching memory is admitted, written over REST or with MCP, the webhook gets a signed POST.
  • Search is POST /v1/memories/search: meaning and keyword fused into one score, with each hit's receipt and why it ranked. GET /v1/memories?q= is a plain full-text filter on the list, newest first.

Add a memory, then find it

bash
curl https://agentics.you/v1/memories \
  -H "Authorization: Bearer $AGENTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"Billing runs on Neon. Decided 2026-10-01.","metadata":{"team":"billing"}}'

curl "https://agentics.you/v1/ingest/$JOB_ID" \
  -H "Authorization: Bearer $AGENTICS_API_KEY"

curl https://agentics.you/v1/memories/search \
  -H "Authorization: Bearer $AGENTICS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"which database runs billing?"}'

The add answers 202 with job_id and memory_id. The memory is searchable once its job reaches done. Each hit has score, why and the receipt_hash of its write.

Memories

List and search memories

GET /v1/memories

Ready memories, newest first. q is a full-text search (web search syntax: quoted phrases, OR, and -word). Use cursor for paging; page is also accepted, up to offset 10000.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
qquerystring
namespace_idquerystringOne namespace id, or several separated by commas.
user_idquerystring
agent_idquerystring
app_idquerystring
run_idquerystring
include_playgroundqueryboolean, default false
limitqueryinteger, 1 to 100, default 25
cursorquerystring
pagequeryinteger1-based. Not with cursor.
sortqueryone of: newest
StatusMeaningBody
200A page of memoriesMemoryList
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Add a memory

POST /v1/memories

Stores the memory as pending and queues a job that makes it ready. Poll GET /v1/ingest/{job_id}. The same content in the same namespace returns the existing memory with duplicate true and status 200. The write is a receipt. Emails, phone numbers, card and IBAN numbers, keys and tokens in content and metadata are stored as [redacted]; a workspace set to refuse them answers 400 content_rejected. The workspace's write rules apply: Pause all answers 423 tenant_paused, and a rule that asks the owner answers 409 approval_required with details.approval_id; retry with approval_id once it is approved.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

Body fieldTypeNotes
contentstringrequiredAt most 1048576 bytes of UTF-8.
namespacestringA namespace id or name. Defaults to the workspace's default namespace.
metadataobjectAt most 65536 bytes as JSON.
sourcestring or null
playgroundbooleanMarks a test memory. Lists leave it out unless include_playground is true.
approval_idstringThe Needs-you approval from a 409 approval_required. Send it on the retry once a person approved the write.
StatusMeaningBody
200Already stored in this namespaceMemoryAccepted
202Accepted and queuedMemoryAccepted
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
402Free is at its monthly actions (plan_action_limit) or its stored memories (plan_memory_limit). Nothing was written.PlanLimit
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
413content_too_large or metadata_too_large (details.limit_bytes says the limit), or body_too_large when the whole request body is over 8 MiB.MemoryError
423tenant_paused: the workspace owner paused every agent (Pause all). Nothing was written. Only the owner can resume.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503receipt_unavailable: the write could not be recorded as a receipt. meter_unavailable: the plan meter could not be read. approval_unavailable: a write rule needs the owner's approval and the request could not be filed. Nothing was written. Retry; meter_unavailable sends Retry-After.MemoryError

Search memories

POST /v1/memories/search

Ranks ready memories by meaning and by keyword, fused into one score, across the namespaces the caller can read. The REST form of the MCP recall and get_context tools. Each hit carries its write receipt_hash, a score from 0 to 1, and why it ranked. When the dense arm cannot run, mode is keyword and degraded names the reason; nothing falls back silently. Each search writes one memory.recall receipt; if that receipt cannot be written, no hits are returned (503 recall_receipt_unavailable). A key narrowed with scopes needs memory.read or memory.write.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

Body fieldTypeNotes
querystring, 1 to 2000required
namespace_idsstring (uuid) list, 1 to 100Defaults to every namespace the caller can read.
agent_idstringOnly memories this agent wrote.
kinteger, 1 to 50, default 8How many hits.
token_budgetinteger, 200 to 32000, default 4000Bounds the reply. The best hit always comes back, cut to fit.
filtersobject
StatusMeaningBody
200Ranked hitsMemorySearchResult
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503recall_receipt_unavailable: the search could not be recorded as a memory.recall receipt, so no hits were returned. Wait Retry-After seconds and retry.MemoryError

Delete many memories

POST /v1/memories/bulk-delete

Without approval_receipt_id, a person is asked in Needs you and the call answers 409 approval_required with details.approval_id. Once approved, repeat it with approval_receipt_id for exactly the same ids. Each delete is a receipt.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

Body fieldTypeNotes
idsstring (uuid) list, 1 to 1000required
approval_receipt_idstring
StatusMeaningBody
200DeletedJSON object
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503receipt_unavailable: the write could not be recorded as a receipt. meter_unavailable: the plan meter could not be read. approval_unavailable: a write rule needs the owner's approval and the request could not be filed. Nothing was written. Retry; meter_unavailable sends Retry-After.MemoryError

Get a memory

GET /v1/memories/{memory_id}

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
memory_idpathstring (uuid)required
StatusMeaningBody
200The memory, with its full contentMemory
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Delete a memory

DELETE /v1/memories/{memory_id}

The delete is a receipt. The write receipt keeps its hash.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
memory_idpathstring (uuid)required
StatusMeaningBody
200DeletedMemoryDeleted
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503receipt_unavailable: the write could not be recorded as a receipt. meter_unavailable: the plan meter could not be read. approval_unavailable: a write rule needs the owner's approval and the request could not be filed. Nothing was written. Retry; meter_unavailable sends Retry-After.MemoryError

Export memories

GET /v1/memories/export

Every memory in the namespaces the caller can read, ready ones and pending ones, a page at a time in the agentics-memories/1 format. A page stops at about 8 MiB of content and metadata. Follow next_cursor until it is null. Needs an owner or admin session (403 admin_required), or a key not narrowed to memory.read or memory.write (403 insufficient_scope).

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
cursorquerystring
limitqueryinteger
StatusMeaningBody
200One page of the exportMemoryExport
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Ingest

Get an ingest job

GET /v1/ingest/{job_id}

Poll until terminal is true, waiting poll_after_ms between calls.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
job_idpathstring (uuid)required
StatusMeaningBody
200The jobIngestJob
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Retry an ingest job

POST /v1/ingest/{job_id}/retry

Only a failed or stalled job, or one with no progress for 15 minutes. Otherwise 409 job_not_retryable.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
job_idpathstring (uuid)required
StatusMeaningBody
202Queued againIngestJob
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

List ingest jobs

GET /v1/ingest

The caller's jobs, newest first, each with its source and label. Filter by stage with a comma-separated list.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
stagequerystringComma-separated stages. An unknown stage answers invalid_stage.
cursorquerystring
limitqueryinteger
StatusMeaningBody
200A page of jobsJSON object
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Import text, a file or a URL

POST /v1/ingest

One entry point for a text paste, a file (PDF and text types; PDF text is extracted, and a PDF with no text layer is refused) or a URL (fetched server side: http or https only, no credentials, no private, loopback or link-local hosts, 10 seconds, 5 MB). Each becomes a POST /v1/memories, with the same job, pipeline and write receipt. Extracted text over 1 MiB is refused with content_too_large, never cut.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

Body fieldTypeNotes
kindone of: text, file, urlrequired
contentstringkind text. Up to 1 MiB.
sourcestringkind text. import:file marks a part of a file split in the browser; anything else is import:text.
filenamestringkind file.
content_typestringkind file.
data_base64stringkind file. The file, base64. Up to 5 MB.
urlstring, at most 2048kind url. http or https.
namespacestringThe namespace id or name. The default namespace when left out.
metadataobject
playgroundboolean
StatusMeaningBody
200Already stored in this namespaceMemoryAccepted
202Accepted and queuedMemoryAccepted
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
402Free is at its monthly actions (plan_action_limit) or its stored memories (plan_memory_limit). Nothing was written.PlanLimit
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
413content_too_large or metadata_too_large (details.limit_bytes says the limit), or body_too_large when the whole request body is over 8 MiB.MemoryError
415unsupported_file or unsupported_url: Import reads PDF and text files, and HTML or text pages.MemoryError
422no_text or unreadable_pdf: there is no text to remember. Nothing was written.MemoryError
423tenant_paused: the workspace owner paused every agent (Pause all). Nothing was written. Only the owner can resume.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
502fetch_failed: the URL could not be fetched, answered an error, or redirected too often.MemoryError
503receipt_unavailable: the write could not be recorded as a receipt. meter_unavailable: the plan meter could not be read. approval_unavailable: a write rule needs the owner's approval and the request could not be filed. Nothing was written. Retry; meter_unavailable sends Retry-After.MemoryError

Namespaces

List namespaces

GET /v1/namespaces

A key sees the namespaces it is bound to. A session sees every namespace in the workspace. Ordered by name.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
cursorquerystring
limitqueryinteger, 1 to 1000, default 1000
includequeryone of: statsstats adds memory_count and last_activity_at to each namespace.
StatusMeaningBody
200NamespacesNamespaceList
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Create a namespace

POST /v1/namespaces

A signed-in workspace admin only. A key gets namespace_management_forbidden.

Auth: a signed-in session.

Body fieldTypeNotes
namestring, 1 to 64requiredTrimmed. No control characters. Unique in the workspace.
StatusMeaningBody
201CreatedNamespace
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Get a namespace

GET /v1/namespaces/{namespace_id}

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
namespace_idpathstring (uuid)required
StatusMeaningBody
200The namespaceNamespace
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Rename a namespace

PATCH /v1/namespaces/{namespace_id}

A signed-in workspace admin only.

Auth: a signed-in session.

ParameterInTypeNotes
namespace_idpathstring (uuid)required
Body fieldTypeNotes
namestring, 1 to 64requiredTrimmed. No control characters. Unique in the workspace.
StatusMeaningBody
200RenamedNamespace
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Delete a namespace

DELETE /v1/namespaces/{namespace_id}

A signed-in workspace admin only. The default namespace cannot be deleted (cannot_delete_default_namespace). A namespace that holds memories answers namespace_not_empty unless move_to names another namespace, in the body or the query, to move them to first.

Auth: a signed-in session.

ParameterInTypeNotes
namespace_idpathstring (uuid)required
move_toquerystring
Body fieldTypeNotes
move_tostring
StatusMeaningBody
200DeletedJSON object
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Keys

List a key's namespaces

GET /v1/keys/{key_id}/namespaces

A signed-in person only. API keys get user_session_required.

Auth: a signed-in session.

ParameterInTypeNotes
key_idpathstring (uuid)requiredThe id of an org API key in this workspace.
StatusMeaningBody
200The key's namespacesKeyNamespaces
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Set a key's namespaces

PUT /v1/keys/{key_id}/namespaces

A signed-in workspace admin only. Replaces the whole list. An empty list denies the key everything (key_has_no_namespaces on its next call).

Auth: a signed-in session.

ParameterInTypeNotes
key_idpathstring (uuid)requiredThe id of an org API key in this workspace.
Body fieldTypeNotes
namespace_idsstring list, at most 1000requiredNamespace ids or names.
StatusMeaningBody
200The key's namespaces nowKeyNamespaces
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError

Webhooks

List an agent's memory webhooks

GET /v1/webhooks

The REST form of the MCP list_subscriptions tool. The webhook URL is never returned, only its host. On only while memory tools are on (404 otherwise). 120 requests a minute per client address.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
x-agentics-agentheaderstringrequiredThe agent that owns the webhook, by its agent_identities id or its token.
StatusMeaningBody
200The agent's webhooksJSON object
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503memory_unavailable: the subscription store could not be reached. Nothing was changed. Retry.MemoryError

Create a memory webhook

POST /v1/webhooks

The REST form of the MCP subscribe tool. When a memory that matches the pattern is admitted, whether written over REST or with MCP, agentics.you sends a signed POST (x-agentics-signature) to the URL, retries it, then dead-letters it. Up to 50 per agent and 500 per workspace. A key narrowed with scopes needs memory.write.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
x-agentics-agentheaderstringrequiredThe agent that owns the webhook, by its agent_identities id or its token.
Body fieldTypeNotes
webhook_urlstring (uri), at most 2000requiredA public https URL.
namestring
patternWebhookPatternrequiredWhat a memory must match. At least one field.
StatusMeaningBody
201The new webhookWebhook
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
409The request conflicts with the current state. See error.code.MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503memory_unavailable: the subscription store could not be reached. Nothing was changed. Retry.MemoryError

Delete a memory webhook

DELETE /v1/webhooks/{webhook_id}

The REST form of the MCP unsubscribe tool. Only the agent that owns the webhook can delete it.

Auth: an API key (Authorization: Bearer ak_…), or a signed-in session.

ParameterInTypeNotes
webhook_idpathstring (uuid)required
x-agentics-agentheaderstringrequiredThe agent that owns the webhook, by its agent_identities id or its token.
StatusMeaningBody
200DeletedJSON object
400The request was malformed. See error.code.MemoryError
401No credential, an expired session, or a key with no workspace (unauthorized, session_expired).MemoryError
403The caller is not allowed (credential_not_supported, csrf, workspace_role_required, read_only, admin_required, key_has_no_namespaces, or a scope code such as namespace_out_of_scope).MemoryError
404Missing, out of the caller's workspace, or the memory API is not on for this workspace (not_found, feature_not_enabled, route_not_found, or the resource's own not_found code).MemoryError
429rate_limited. 300 requests a minute per client address, and per workspace 600 writes and 300 searches a minute. Retry-After says how many seconds to wait.MemoryError
503memory_unavailable: the subscription store could not be reached. Nothing was changed. Retry.MemoryError

Schemas

MemoryIn

FieldTypeNotes
contentstringrequiredAt most 1048576 bytes of UTF-8.
namespacestringA namespace id or name. Defaults to the workspace's default namespace.
metadataobjectAt most 65536 bytes as JSON.
sourcestring or null
playgroundbooleanMarks a test memory. Lists leave it out unless include_playground is true.
approval_idstringThe Needs-you approval from a 409 approval_required. Send it on the retry once a person approved the write.

MemoryAccepted

FieldTypeNotes
job_idstring (uuid)required
memory_idstring (uuid)required
duplicatebooleanrequiredTrue when the same content is already in this namespace. No new job is queued.
stageone of: queued, extracting, chunking, embedding, indexing, done, failedrequired

Memory

FieldTypeNotes
idstring (uuid)required
namespace_idstring (uuid)required
contentstringrequired
content_hashstringrequired
metadataobjectrequired
sourcestring or nullrequired
provenanceProvenancerequiredWho wrote the memory. Set by the server from the caller, never from the request body.
playgroundbooleanrequired
statusone of: pending, ready, failedrequired
receipt_idstring or nullrequiredThe receipt of the write, once it is recorded.
created_atstring (date-time)required
updated_atstring (date-time)required

MemorySummary

FieldTypeNotes
idstring (uuid)required
namespace_idstring (uuid)required
excerptstringrequiredThe first 280 characters of the content, ending in an ellipsis when cut.
content_hashstringrequired
metadataobjectrequiredThe first 20 keys.
metadata_key_countintegerrequired
metadata_truncatedbooleanrequired
sourcestring or nullrequired
provenanceProvenancerequiredWho wrote the memory. Set by the server from the caller, never from the request body.
playgroundbooleanrequired
receipt_idstring or nullrequired
created_atstring (date-time)required
updated_atstring (date-time)required

MemoryList

FieldTypeNotes
dataMemorySummary listrequired
next_cursorstring or nullrequiredPass as cursor for the next page. Null on the last page, and always null with page.

MemoryDeleted

FieldTypeNotes
idstring (uuid)required
deletedtruerequired
receipt_idstringrequired

IngestJob

FieldTypeNotes
job_idstring (uuid)required
memory_idstring (uuid)required
namespace_idstring (uuid)required
stageone of: queued, extracting, chunking, embedding, indexing, done, failedrequired
stage_timestampsobjectrequired
failed_stagestring or nullrequired
failure_reasonstring or nullrequired
attemptsintegerrequired
created_atstring (date-time)required
updated_atstring (date-time)required
stalledbooleanrequiredNot finished more than 4 hours after it was queued.
terminalbooleanrequiredTrue at done or failed.
poll_after_msinteger or nullrequiredHow long to wait before polling again. Null when the job is terminal or stalled.

Namespace

FieldTypeNotes
idstring (uuid)required
namestring, 1 to 64required
is_defaultbooleanrequired
created_atstring (date-time)required
updated_atstring (date-time)required
memory_countintegerOnly with include=stats on the list.
last_activity_atstring or null (date-time)Only with include=stats on the list.

NamespaceList

FieldTypeNotes
dataNamespace listrequired
next_cursorstring or nullrequired

KeyNamespaces

FieldTypeNotes
key_idstringrequired
dataNamespace listrequired

Provenance

FieldTypeNotes
user_idstring or null
agent_idstring or null
app_idstring or null
run_idstring or null

MemoryError

FieldTypeNotes
errorobjectrequired