> ## 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.

# Get Agent Version

> Retrieve a specific version of an agent

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

Retrieves a single version of the specified agent. Use this to inspect the configuration snapshot for any historical or current version.

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

### Path Parameters

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

<ParamField path="version" type="integer" required>
  Version number to retrieve
</ParamField>

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

### Response

<ResponseField name="data" type="object">
  <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>

<ResponseExample>
  ```json Success (200) theme={null}
  {
    "success": true,
    "data": {
      "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"
    }
  }
  ```
</ResponseExample>
