> ## 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 Agent Versions

> Returns a paginated list of versions for a specific agent

```
GET /openapi/memorylake/api/v3/agents/{id}/versions
```

Returns a paginated list of all versions for the specified agent, ordered by version number. Each version captures a snapshot of the agent's configuration at the time it was created.

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

### Path Parameters

<ParamField path="id" type="string" required>
  Agent identifier
</ParamField>

### Query Parameters

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

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

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

### Response

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

      <Expandable title="Agent version object">
        <ResponseField name="version" type="integer">Version number</ResponseField>
        <ResponseField name="model" type="string">Model used in this version</ResponseField>
        <ResponseField name="capabilities" type="array">List of capability identifiers</ResponseField>

        <ResponseField name="policies" type="object">
          Execution policies for this version

          <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 this version

          <Expandable title="Output object">
            <ResponseField name="mode" type="string">Output mode</ResponseField>
            <ResponseField name="json_schema" type="object">JSON Schema for structured output</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="subagents" type="array">
          Subagent definitions in this version

          <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 in this version

          <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="agent_id" type="string">Parent agent identifier</ResponseField>
        <ResponseField name="system_prompt" type="string">System prompt used in this version</ResponseField>
        <ResponseField name="model_settings" type="object">Model-specific settings for this version</ResponseField>
        <ResponseField name="runtime_bindings" type="object">Runtime binding configuration for this version</ResponseField>
        <ResponseField name="created_at" type="string">Version creation 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": [
        {
          "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
            }
          ],
          "agent_id": "agt_r8k2m1n3",
          "system_prompt": "You are a helpful support assistant. Use the knowledge base to answer questions accurately.",
          "model_settings": {
            "temperature": 0.7,
            "max_tokens": 4096
          },
          "runtime_bindings": {
            "knowledge_base": "kb_prod_docs"
          },
          "created_at": "2025-04-22T14:30:00Z"
        },
        {
          "version": 2,
          "model": "gpt-4o",
          "capabilities": ["tool_use", "memory_read"],
          "policies": {
            "max_turns": 15,
            "max_tool_calls": 8,
            "allow_tools": ["search_kb"],
            "deny_tools": [],
            "subagent_timeout": 300,
            "subagent_max_concurrency": 2
          },
          "output": {
            "mode": "text",
            "json_schema": null
          },
          "subagents": [],
          "skills": [
            {
              "skill_id": "skl_kb_search",
              "skill_version": 1
            }
          ],
          "agent_id": "agt_r8k2m1n3",
          "system_prompt": "You are a helpful support assistant.",
          "model_settings": {
            "temperature": 0.7,
            "max_tokens": 2048
          },
          "runtime_bindings": {
            "knowledge_base": "kb_prod_docs"
          },
          "created_at": "2025-03-25T11:00:00Z"
        }
      ],
      "continuation_token": null
    }
  }
  ```
</ResponseExample>
