Skip to Content
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). scope=person returns your own memories instead: those every agent acting for you reads, in any workspace, plus the ones agents suggested and you have not kept yet (pending). 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. 'person' returns your own memories, which live outside any workspace (needs a signed-in user; agent_id is ignored). Omit to return workspace and agent memories.

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",
    "scope": "agent",
    "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",
    "pending": false,
    "source_workspace_id": "0bec99f5-fe9f-476a-a47b-d925ed169238",
    "source_workspace_name": "string",
    "source_agent_id": "d9ad10f6-6845-4542-89b9-c3395e83005a",
    "source_agent_name": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
]