Levain LabsLevain Labs
ApiAgent memories

List Memories

List saved memories for the workspace.

List saved memories for the workspace.

Memories are scoped to a workspace and optionally to one agent. Without an agent_id filter, returns every memory in the workspace. With agent_id, returns memories that apply to that agent — its own memories plus workspace-wide ones (unless include_workspace_scope=false). Use scope to narrow further (scope=workspace returns only the shared rows). Deleted memories are excluded. Procedural rules are managed via the dedicated procedural endpoints and excluded from this list.

GET
/api/v1/agent-memories

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

agent_id?|

Filter to one agent's memories only.

include_workspace_scope?Include Workspace Scope

When listing for a specific agent, also include workspace-wide memories (the agent inherits these). Ignored when agent_id is omitted.

Defaulttrue
scope?|

Filter by scope. 'workspace' returns only memories shared across every agent in the workspace. 'agent' returns only agent-scoped memories. Omit to return both.

limit?Limit

Maximum number of memories to return. Newest first.

Default200
Range1 <= value <= 500

Header Parameters

X-API-Key?string|null

Response Body

application/json

application/json

curl -X GET "https://api.levainlabs.com/api/v1/agent-memories"
[
  {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",
    "kind": "semantic",
    "content": "string",
    "tags": [
      "string"
    ],
    "author": "agent",
    "source_session_id": "312bde73-ab6c-4229-8af2-a9c9ab28d2bf",
    "source_run_id": "51116a97-0041-4601-85fc-eb599c2885fb",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}