Agent Memory

Episodes

Episodes API: 2 endpoints under /v1.

Search past episodes

POST /v1/episodes/search

Finds past episodes (consolidated runs) similar to a query. Only episodes the caller is allowed to see are returned. topK defaults to 5 and is clamped to 1 to 50. Requires the read permission.

See also: Consolidation, episodes and procedures.

Request body (EpisodeSearchRequest)

FieldTypeDescription
querystringText describing the task to find similar episodes for.
topKintegerNumber of episodes to return; defaults to 5, clamped to 1 to 50.
workspaceIdstring (uuid)Workspace to search.

Responses

StatusDescription
200A list of matching episodes with goal, summary, outcome, success score and time range.

Example

curl -X POST "$API/v1/episodes/search" \
  -H "Authorization: Bearer $KEY" \
  -H 'Content-Type: application/json' \
  -d '{"topK":10,"workspaceId":"$WS"}'

List recent episodes

GET /v1/episodes/{workspaceId}

Returns the workspace's most recent episodes that the caller is allowed to see. limit defaults to 10 and is clamped to 1 to 100. Requires the read permission.

See also: Consolidation, episodes and procedures.

Parameters

NameInTypeDescription
workspaceId (required)pathstring (uuid)Workspace to act in. A workspace the credential cannot access returns 404.
limitqueryintegerMaximum number of items to return. The default and allowed range depend on the endpoint.

Responses

StatusDescription
200A list of episodes with run ID, agent, goal, summary, outcome, success score and time range.

Example

curl -X GET "$API/v1/episodes/$WS" \
  -H "Authorization: Bearer $KEY"

On this page