> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# List observed profile versions

GET https://api.runtype.com/v1/agents/{agentId}/profile/versions

The agent's observed profile versions, newest first and paged by cursor, without their facts. Read one version's facts with `GET /v1/agents/{agentId}/profile?version=`.

Reference: https://docs.runtype.com/api-reference/runtype-api/agents/list-observed-profile-versions

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `agentId` (string, required) — The agent ID

### Query parameters

- `limit` (string, optional) — Versions per page, 1 to 100; default 20
- `cursor` (string, optional) — The `nextCursor` of the previous page

## Response

### 200

One page of versions

- `data` (list of AgentObservedProfileVersionSummary, required)
- `hasMore` (boolean, required) — Older versions follow; pass `nextCursor` as `cursor` to read them
- `nextCursor` (string, required, nullable) — Cursor for the next page; null on the last page

## Errors

### 400 Bad Request Error

Invalid agent id, `limit` or `cursor`

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 401 Unauthorized Error

Authentication required

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 403 Forbidden Error

The API key lacks `AGENTS:READ`, or is an ingest key

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 404 Not Found Error

Agent or version not found, or observed profiles are not available to this account

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 500 Internal Server Error

The profile could not be read

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

## Types

### AgentObservedProfileVersionSummary

- `agentId` (string, required)
- `conversationCount` (integer, required)
- `createdAt` (string, required) — When this version was first observed
- `factsHash` (string, required) — Hash of the prompts, tools with their schemas, and models; counts are not part of it
- `id` (string, required)
- `interpretation` (AgentObservedProfileInterpretation, required) — An inferred reading of these facts; null until one has been started. The profile does not wait for it.
- `refreshedAt` (string, required) — When its counts and window were last updated
- `turnCount` (integer, required)
- `version` (integer, required) — Starts at 1 and increases when the observed behaviour changes
- `windowEnd` (string, required) — Start of the latest production run counted
- `windowStart` (string, required) — Start of the earliest production run counted

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### AgentObservedProfileInterpretation

An inferred reading of these facts; null until one has been started. The profile does not wait for it.

- `basis` (enum, required) — `names_and_counts` when content capture is off and no prompt text was read
  - Allowed values: `prompt_samples_and_names`, `names_and_counts`
- `change` (AgentObservedProfileInterpretationChange, required, nullable) — What changed since the previous version, read from the facts
- `funding` (enum, required) — `customer` when it was charged to the account, which happens whenever the organization can pay; `platform` when Runtype paid for it or no model call was made
  - Allowed values: `platform`, `customer`
- `label` (enum, required) — Always `inferred`: a reading of the facts, not something the agent declared
  - Allowed values: `inferred`
- `model` (string, required, nullable)
- `reason` (string, required, nullable) — Why it failed or was declined; null otherwise. `spend_cap_reached`: the organization is at its spending limit; a later pass tries again once spending is allowed.
- `result` (AgentObservedProfileInterpretationResult, required, nullable) — Present when `status` is `done`
- `status` (enum, required) — `running` while it is being written; `failed` when the last attempt did not finish (it is retried); `declined` when the facts were too thin to describe the agent
  - Allowed values: `running`, `done`, `failed`, `declined`
- `updatedAt` (string, required)

### AgentObservedProfileInterpretationChange

What changed since the previous version, read from the facts

- `comparedWithVersion` (integer, required, nullable) — Null for version 1
- `modelsAdded` (list of string, required)
- `modelsRemoved` (list of string, required)
- `promptsAdded` (list of string, required) — Prompt hashes
- `promptsRemoved` (list of string, required) — Prompt hashes
- `toolsAdded` (list of string, required)
- `toolsChanged` (list of string, required) — Tools whose input schema changed
- `toolsRemoved` (list of string, required)

### AgentObservedProfileInterpretationResult

Present when `status` is `done`

- `changeSummary` (string, required) — What changed since the previous version
- `failureModes` (list of string, required) — How the agent fails or is likely to fail
- `role` (string, required) — What the agent does and for whom
- `userIntents` (list of string, required) — What users come to the agent for

## Examples

**Response**

```json
{
  "data": [
    {
      "agentId": "string",
      "conversationCount": 1,
      "createdAt": "string",
      "factsHash": "string",
      "id": "string",
      "interpretation": {
        "basis": "prompt_samples_and_names",
        "change": {
          "comparedWithVersion": 1,
          "modelsAdded": [
            "string"
          ],
          "modelsRemoved": [
            "string"
          ],
          "promptsAdded": [
            "string"
          ],
          "promptsRemoved": [
            "string"
          ],
          "toolsAdded": [
            "string"
          ],
          "toolsChanged": [
            "string"
          ],
          "toolsRemoved": [
            "string"
          ]
        },
        "funding": "platform",
        "label": "inferred",
        "model": "string",
        "reason": "string",
        "result": {
          "changeSummary": "string",
          "failureModes": [
            "string"
          ],
          "role": "string",
          "userIntents": [
            "string"
          ]
        },
        "status": "running",
        "updatedAt": "string"
      },
      "refreshedAt": "string",
      "turnCount": 1,
      "version": 1,
      "windowEnd": "string",
      "windowStart": "string"
    }
  ],
  "hasMore": true,
  "nextCursor": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/agents/agentId/profile/versions"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/agents/agentId/profile/versions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.runtype.com/v1/agents/agentId/profile/versions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/agents/agentId/profile/versions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.runtype.com/v1/agents/agentId/profile/versions")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.runtype.com/v1/agents/agentId/profile/versions', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/agents/agentId/profile/versions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/agents/agentId/profile/versions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```