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

# Get the observed profile of an agent

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

What the agent's production traces show it to be: its system prompts, tools with call and error counts, models, and turn and conversation counts over the last 14 days. Production traces are those whose `deployment.environment.name` (or `deployment.environment`) is `production` or `prod`, in any case. A new version is recorded when the prompts, tools, tool schemas or models change; counts update the latest version. Pass `version` to read an earlier one.

Reference: https://docs.runtype.com/api-reference/runtype-api/agents/get-the-observed-profile-of-an-agent

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

- `version` (string, optional) — A version number; defaults to the latest

## Response

### 200

The profile, or the reason there is none yet

- `agentId` (string, required)
- `profile` (AgentObservedProfileVersion, required)
- `reason` (string, required, nullable) — Why there is no profile; null when there is one
- `status` (enum, required) — `no_production_traces` until a production trace of this agent has been read
  - Allowed values: `ready`, `no_production_traces`

## Errors

### 400 Bad Request Error

Invalid agent id or version

- `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

### AgentObservedProfileVersion

- `agentId` (string, required)
- `conversationCount` (integer, required)
- `createdAt` (string, required) — When this version was first observed
- `facts` (AgentObservedProfileFacts, required)
- `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, …).

### AgentObservedProfileFacts

- `contentCaptured` (boolean, required) — False when the agent does not capture content: prompt hashes and counts only
- `conversationCount` (integer, required) — Distinct conversations among them; a run with no conversation id counts as one
- `factsVersion` (integer, required) — How these facts were read; a version read a newer way can name the same prompt by a different hash
- `models` (list of AgentObservedProfileFactsModelsItems, required) — Models called in the window, most called first
- `prompts` (list of AgentObservedProfileFactsPromptsItems, required) — Distinct system prompts, most frequent first
- `tools` (list of AgentObservedProfileFactsToolsItems, required) — Tools offered or called in production, by name
- `truncated` (AgentObservedProfileFactsTruncated, required) — Which lists reached their limit; a truncated list keeps the most frequent entries
- `turnCount` (integer, required) — Production runs read in the window
- `contentWithheldByApp` (boolean, optional) — True when the app declares that it keeps conversation content out of its traces and none arrived: prompt text, tool inputs and outputs and a copy of the agent are not available
- `toolEvidence` (AgentObservedProfileFactsToolEvidence, optional) — What the window’s traces show of tool use; absent when not read for this version

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

### AgentObservedProfileFactsModelsItems

- `callCount` (integer, required)
- `model` (string, required) — The model as the request named it
- `provider` (string, required, nullable)

### AgentObservedProfileFactsPromptsItems

- `chars` (integer, required, nullable) — Characters in the whole prompt; null when unknown
- `hash` (string, required) — Hash of the prompt content; equal hashes are the same prompt
- `runCount` (integer, required) — Production runs in the window whose first model call carried this prompt
- `samples` (list of AgentObservedProfileFactsPromptsItemsSamplesItems, required) — Excerpts of the prompt text; empty when the agent does not capture content
- `source` (enum, required) — Whether the prompt was read from the context manifest, or from the system instructions or system messages of the first model call
  - Allowed values: `context_manifest`, `system_instructions`
- `versionDefining` (boolean, required) — Whether the prompt appears in enough runs to be part of what defines the version

### AgentObservedProfileFactsToolsItems

- `callCount` (integer, required) — Calls seen in production since the tool was first seen
- `errorCount` (integer, required) — Calls that failed, over the same period
- `errorRate` (double, required, nullable) — Failed calls over calls; null when never called
- `lastSeenAt` (string, required)
- `name` (string, required)
- `schemaHash` (string, required, nullable) — Hash of the latest input schema seen; null when none was seen
- `schemaOmitted` (boolean, required) — The schema was too large to store; its hash is still recorded

### AgentObservedProfileFactsTruncated

Which lists reached their limit; a truncated list keeps the most frequent entries

- `models` (boolean, required)
- `prompts` (boolean, required)
- `runs` (boolean, required)
- `tools` (boolean, required)

### AgentObservedProfileFactsToolEvidence

What the window’s traces show of tool use; absent when not read for this version

- `calledTools` (list of string, required) — Tools the window’s production traces show called, whether or not they were recorded
- `calledToolsTruncated` (boolean, required) — More tools were called than are listed
- `definitions` (boolean, required) — Tool definitions offered in the window were recorded for the agent

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

### AgentObservedProfileFactsPromptsItemsSamplesItems

- `text` (string, required)
- `truncated` (boolean, required)
- `form` (enum, optional) — `text` when the excerpt is the prompt text; absent when it is the value as it was sent
  - Allowed values: `text`

## Examples

**Response**

```json
{
  "agentId": "string",
  "profile": {
    "agentId": "string",
    "conversationCount": 1,
    "createdAt": "string",
    "facts": {
      "contentCaptured": true,
      "conversationCount": 1,
      "factsVersion": 1,
      "models": [
        {
          "callCount": 1,
          "model": "string",
          "provider": "string"
        }
      ],
      "prompts": [
        {
          "chars": 1,
          "hash": "string",
          "runCount": 1,
          "samples": [
            {
              "text": "string",
              "truncated": true,
              "form": "text"
            }
          ],
          "source": "context_manifest",
          "versionDefining": true
        }
      ],
      "tools": [
        {
          "callCount": 1,
          "errorCount": 1,
          "errorRate": 1.1,
          "lastSeenAt": "string",
          "name": "string",
          "schemaHash": "string",
          "schemaOmitted": true
        }
      ],
      "truncated": {
        "models": true,
        "prompts": true,
        "runs": true,
        "tools": true
      },
      "turnCount": 1,
      "contentWithheldByApp": true,
      "toolEvidence": {
        "calledTools": [
          "string"
        ],
        "calledToolsTruncated": true,
        "definitions": true
      }
    },
    "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"
  },
  "reason": "string",
  "status": "ready"
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/agents/agentId/profile';
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"

	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")

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")
  .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', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.runtype.com/v1/agents/agentId/profile");
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")! 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()
```