> ## Documentation Index
> Fetch the complete documentation index at: https://docs.masker.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /agents/{id} — retrieve a single agent's config

> Fetch the full configuration, active masking policy, proxy URL, and 24-hour and 7-day usage statistics for a single agent by its ULID.

Returns complete details for a single agent, including the active masking policy, upstream configuration, proxy and webhook URLs, and rolling usage statistics. Use this endpoint to inspect an agent's current configuration or retrieve its proxy URL programmatically.

## Endpoint

```
GET /api/v1/agents/{agent_id}
```

Requires `masker_session` authentication.

## Path parameters

<ParamField path="agent_id" type="string" required>
  The agent's ID in `agt_*` ULID format, e.g. `agt_01HYZ...`.
</ParamField>

## Response fields

<ResponseField name="agent" type="object" required>
  Full agent object.

  <Expandable title="agent object fields" defaultOpen>
    <ResponseField name="id" type="string" required>
      Agent ID in `agt_*` ULID format.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Display name, unique per account.
    </ResponseField>

    <ResponseField name="upstream" type="string" required>
      Upstream LLM provider and model, e.g. `openai:gpt-4o-mini`.
    </ResponseField>

    <ResponseField name="tokenization" type="string" required>
      Active tokenization scheme: `vault-deterministic` or `reversible-aead`.
    </ResponseField>

    <ResponseField name="policy_name" type="string" required>
      Name of the active masking policy.
    </ResponseField>

    <ResponseField name="policy_version" type="number" required>
      Version number of the active policy.
    </ResponseField>

    <ResponseField name="policy_yaml" type="string" required>
      Full YAML text of the active masking policy at the current version.
    </ResponseField>

    <ResponseField name="proxy_url" type="string" required>
      OpenAI-compatible proxy URL for this agent.
    </ResponseField>

    <ResponseField name="webhook_url" type="string" required>
      Vapi assistant-request webhook URL for this agent.
    </ResponseField>

    <ResponseField name="created_at" type="string" required>
      ISO 8601 UTC creation timestamp.
    </ResponseField>

    <ResponseField name="stats" type="object" required>
      Rolling usage statistics for this agent.

      <Expandable title="stats fields">
        <ResponseField name="session_count_24h" type="number">
          Sessions processed in the last 24 hours.
        </ResponseField>

        <ResponseField name="session_count_7d" type="number">
          Sessions processed in the last 7 days.
        </ResponseField>

        <ResponseField name="redaction_count_24h" type="number">
          Total PHI detections redacted in the last 24 hours.
        </ResponseField>

        <ResponseField name="p50_latency_ms" type="number">
          Median added latency in milliseconds over the last 24 hours.
        </ResponseField>

        <ResponseField name="p95_latency_ms" type="number">
          95th-percentile added latency in milliseconds over the last 24 hours.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -H "Cookie: masker_session=ey..." \
    https://masker-voice.fly.dev/api/v1/agents/agt_01HYZ...
  ```
</CodeGroup>

```json Response theme={null}
{
  "agent": {
    "id": "agt_01HYZ...",
    "name": "appointment-bot-prod",
    "upstream": "openai:gpt-4o-mini",
    "tokenization": "vault-deterministic",
    "policy_name": "healthcare-default",
    "policy_version": 1,
    "policy_yaml": "name: healthcare-default\nversion: 1\n...",
    "proxy_url": "https://masker-voice.fly.dev/proxy/agt_01HYZ.../v1/chat/completions",
    "webhook_url": "https://masker-voice.fly.dev/vapi/webhook/agt_01HYZ...",
    "created_at": "2026-04-15T10:22:11Z",
    "stats": {
      "session_count_24h": 247,
      "session_count_7d": 1834,
      "redaction_count_24h": 1289,
      "p50_latency_ms": 412,
      "p95_latency_ms": 891
    }
  }
}
```

## Errors

| Status | Code              | Meaning                                      |
| ------ | ----------------- | -------------------------------------------- |
| `401`  | `unauthenticated` | Missing or invalid `masker_session` cookie   |
| `404`  | `agent_not_found` | No agent with this ID exists in your account |
