> ## Documentation Index
> Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agent Versions

Use this API to fetch the version history for a custom agent. A new version is automatically created on every behavioral update via [Update Agent Version](/api-reference/rest-apis/v2/agents/version/update). Versions are ordered descending (newest first) and contain the full behavioral snapshot at that point in time.

# Endpoint

`POST https://api.velt.dev/v2/agents/versions/list`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="agentId" type="string" required>
      Min 1 char. Agent ID.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### List versions for an agent

```JSON theme={null}
{
  "data": {
    "agentId": "abc123def456"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Versions listed successfully",
    "data": {
      "versions": [
        {
          "id": "3",
          "version": 3,
          "createdAt": 1711900000000,
          "name": "Brand Consistency Checker",
          "description": "Validates brand colors, logos, and typography across pages",
          "instructions": "Check headings use 'Inter' font. Verify #1A73E8 on all CTAs and links. Check footer uses 'Inter' for body text.",
          "contextGathering": {
            "strategies": ["web-page-text", "web-page-screenshot", "web-page-html"]
          },
          "execution": {
            "executionStrategy": "ai",
            "responseDescriptions": {
              "title": "Short name for the brand inconsistency",
              "severity": "One of: critical, high, medium, low, info"
            }
          },
          "postProcess": {
            "guardrails": { "enabled": true },
            "matchAndMerge": { "enabled": true }
          }
        },
        {
          "id": "2",
          "version": 2,
          "createdAt": 1711800000000,
          "name": "Brand Consistency Checker",
          "description": "Validates brand colors and typography",
          "instructions": "Check headings use 'Inter' font. Verify #1A73E8 on all CTAs and links.",
          "contextGathering": { "strategies": ["web-page-text", "web-page-screenshot"] },
          "execution": { "executionStrategy": "ai" },
          "postProcess": { "guardrails": { "enabled": true } }
        },
        {
          "id": "1",
          "version": 1,
          "createdAt": 1711700000000,
          "name": "Brand Consistency Checker",
          "instructions": "Check headings use Inter font...",
          "contextGathering": { "strategies": ["web-page-text"] }
        }
      ]
    }
  }
}
```

| Field           | Type      | Description                                     |
| --------------- | --------- | ----------------------------------------------- |
| `data.versions` | object\[] | Version snapshots ordered descending by version |

Each entry contains the full behavioral snapshot of the agent at that version.

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "NOT_FOUND"
  }
}
```

**Errors:** `NOT_FOUND` (agent or store database not found).

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Versions listed successfully",
      "data": {
        "versions": []
      }
    }
  }
  ```
</ResponseExample>
