> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agents

> Returns a paginated list of agents with optional filtering by custom ID

```
GET /openapi/memorylake/api/v3/agents
```

Returns a paginated list of all agents in your account. You can filter by `custom_id` and control pagination with `page_size` and `continuation_token`.

<Note>
  **Permission required:** `agent:list`
</Note>

### Query Parameters

<ParamField query="page_size" type="integer">
  Number of agents to return per page
</ParamField>

<ParamField query="continuation_token" type="string">
  Token from a previous response to fetch the next page of results
</ParamField>

<ParamField query="custom_id" type="string">
  Filter agents by custom identifier (exact match)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://app.memorylake.ai/openapi/memorylake/api/v3/agents?page_size=20' \
    -H 'Authorization: Bearer sk_xxxxxx'
  ```
</RequestExample>

### Response

<ResponseField name="data" type="object">
  <Expandable title="Paginated agent list">
    <ResponseField name="items" type="array">
      Array of agent objects

      <Expandable title="Agent object">
        <ResponseField name="id" type="string">Unique agent identifier</ResponseField>
        <ResponseField name="name" type="string">Agent name</ResponseField>
        <ResponseField name="description" type="string">Agent description</ResponseField>
        <ResponseField name="metadata" type="object">Arbitrary key-value pairs for storing additional agent information</ResponseField>
        <ResponseField name="version" type="integer">Current active version number</ResponseField>
        <ResponseField name="model" type="string">Model used by the agent (e.g. `gpt-4o`, `claude-sonnet-4-20250514`)</ResponseField>
        <ResponseField name="capabilities" type="array">List of capability identifiers the agent supports</ResponseField>

        <ResponseField name="policies" type="object">
          Execution policies that constrain agent behavior

          <Expandable title="Policies object">
            <ResponseField name="max_turns" type="integer">Maximum number of conversation turns per run</ResponseField>
            <ResponseField name="max_tool_calls" type="integer">Maximum number of tool calls per turn</ResponseField>
            <ResponseField name="allow_tools" type="array">Allowlist of tool names the agent may invoke</ResponseField>
            <ResponseField name="deny_tools" type="array">Denylist of tool names the agent must not invoke</ResponseField>
            <ResponseField name="subagent_timeout" type="integer">Maximum seconds a subagent may run before being cancelled</ResponseField>
            <ResponseField name="subagent_max_concurrency" type="integer">Maximum number of subagents that may run concurrently</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="output" type="object">
          Output configuration for the agent

          <Expandable title="Output object">
            <ResponseField name="mode" type="string">Output mode (e.g. `text`, `json`)</ResponseField>
            <ResponseField name="json_schema" type="object">JSON Schema that the agent's output must conform to when mode is `json`</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="subagents" type="array">
          Subagent definitions attached to this agent

          <Expandable title="Subagent object">
            <ResponseField name="name" type="string">Subagent name</ResponseField>
            <ResponseField name="mode" type="string">Execution mode for the subagent</ResponseField>
            <ResponseField name="context" type="string">Context instructions passed to the subagent</ResponseField>
            <ResponseField name="inherit_tools" type="boolean">Whether the subagent inherits the parent agent's tools</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="skills" type="array">
          Skills attached to this agent

          <Expandable title="Skill reference">
            <ResponseField name="skill_id" type="string">Skill identifier</ResponseField>
            <ResponseField name="skill_version" type="integer">Skill version number</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="custom_id" type="string">Custom identifier for external system integration</ResponseField>
        <ResponseField name="actor_id" type="string">Actor identifier associated with this agent</ResponseField>
        <ResponseField name="latest_version" type="integer">Latest version number available for this agent</ResponseField>
        <ResponseField name="system_prompt" type="string">System prompt used to instruct the agent</ResponseField>
        <ResponseField name="model_settings" type="object">Model-specific settings such as temperature and max tokens</ResponseField>
        <ResponseField name="runtime_bindings" type="object">Runtime binding configuration for tools and data sources</ResponseField>
        <ResponseField name="created_at" type="string">Creation timestamp</ResponseField>
        <ResponseField name="updated_at" type="string">Last update timestamp</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="continuation_token" type="string">Token to retrieve the next page of results. Absent when there are no more pages.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "items": [
        {
          "id": "agt_r8k2m1n3",
          "name": "Support Assistant",
          "description": "Handles customer support inquiries using knowledge base",
          "metadata": {
            "team": "customer-success",
            "tier": "production"
          },
          "version": 3,
          "model": "gpt-4o",
          "capabilities": ["tool_use", "memory_read", "memory_write"],
          "policies": {
            "max_turns": 20,
            "max_tool_calls": 10,
            "allow_tools": ["search_kb", "create_ticket"],
            "deny_tools": [],
            "subagent_timeout": 300,
            "subagent_max_concurrency": 3
          },
          "output": {
            "mode": "text",
            "json_schema": null
          },
          "subagents": [
            {
              "name": "ticket-creator",
              "mode": "delegate",
              "context": "Create support tickets from conversation context",
              "inherit_tools": false
            }
          ],
          "skills": [
            {
              "skill_id": "skl_kb_search",
              "skill_version": 2
            }
          ],
          "custom_id": "support-assistant-v1",
          "actor_id": "act_p4q7w2x9",
          "latest_version": 3,
          "system_prompt": "You are a helpful support assistant...",
          "model_settings": {
            "temperature": 0.7,
            "max_tokens": 4096
          },
          "runtime_bindings": {
            "knowledge_base": "kb_prod_docs"
          },
          "created_at": "2025-03-10T09:00:00Z",
          "updated_at": "2025-04-22T14:30:00Z"
        }
      ],
      "continuation_token": "eyJsYXN0SWQiOiJhZ3RfcjhrMm0xbjMifQ"
    }
  }
  ```
</ResponseExample>
