# API reference

Use this reference to look up Ampersand endpoints, parameters, and responses.
For a working example, start with the [quickstart](index.html.md). If you are moving
an OpenAI integration, check [OpenAI compatibility](GUIDES.html.md#openai-compatibility).

## Authentication and requests {#requests}

Use `https://ampersand.humansand.ai/v1` as the base URL.
Include `Authorization: Bearer <your-key>`. All endpoints except the
[model endpoints](#models) also require `OpenAI-Beta: agents=v1`.
JSON requests use `Content-Type: application/json`.
Your API key determines which tenant you can access. You cannot select another
tenant through headers or message metadata.

The hosted request-body limit is 16 MiB. Deployment or tenant settings can impose
smaller input limits. See [input limits](GUIDES.html.md#input-limits) for token and
encoded-size limits. The API rejects unknown request fields. Strings in
the body, path, and query cannot contain the null character, U+0000.

To create a session, supply nonempty `input`, `environment={"type":"none"}`, and
either `agent_id` or `agent.model`. If you supply both, fields in `agent` override
the saved agent's settings for the new session.

Use `ampersand-v0.1` or [`ampersand-tutor-v0.1`](index.html.md#tutor-model) for `model`
when creating an agent or `agent.model` when creating a session with inline agent
settings. Check `/models` for availability; the tutor's supported features differ.

## Endpoints {#endpoints}

Append these paths to `https://ampersand.humansand.ai/v1`.
Successful JSON requests return `200`.
Submitting events returns `202` with an empty body. Streams use
`text/event-stream`. Follow the type links for request and response fields.

| Method | Path | Request body | Success response |
| --- | --- | --- | --- |
| GET | `/models` | None | [ModelList](#schema-modellist) |
| GET | `/models/{model}` | None | [ModelResource](#schema-modelresource) |
| POST | `/agents` | [AgentCreate](#schema-agentcreate) | [AgentResource](#schema-agentresource) |
| GET | `/agents` | None | [AgentPage](#schema-resourcepage_agentresource_) |
| GET | `/agents/{agent_id}` | None | [AgentResource](#schema-agentresource) |
| POST | `/agents/{agent_id}` | [AgentUpdate](#schema-agentupdate) | [AgentResource](#schema-agentresource) |
| DELETE | `/agents/{agent_id}` | None | `{"id":"…","object":"agent.deleted","deleted":true}` |
| POST | `/agents/sessions` | [SessionCreate](#schema-sessioncreate) | [SessionResource](#schema-sessionresource), or [SSE](#server-events) with `stream=true` |
| GET | `/agents/sessions` | None | [SessionPage](#schema-resourcepage_sessionresource_) |
| GET | `/agents/sessions/{session_id}` | None | [SessionResource](#schema-sessionresource) |
| POST | `/agents/sessions/{session_id}` | [SessionUpdate](#schema-sessionupdate) | [SessionResource](#schema-sessionresource) |
| DELETE | `/agents/sessions/{session_id}` | None | `{"id":"…","object":"agent.session.deleted","deleted":true}` |
| POST | `/agents/sessions/{session_id}/events` | [EventsCreate](#schema-eventscreate) | `202`, empty body |
| GET | `/agents/sessions/{session_id}/events` | None | SSE [server events](#server-events) |
| GET | `/agents/sessions/{session_id}/items` | None | [ItemPage](#schema-resourcepage_annotated_union_messageitem__functioncallitem__functionresultitem___fieldinfo_annotation_nonetype__required_true__discriminator__type____) of [MessageItem](#schema-messageitem), [FunctionCallItem](#schema-functioncallitem), or [FunctionResultItem](#schema-functionresultitem) |
| GET | `/agents/sessions/{session_id}/turns` | None | [TurnPage](#schema-resourcepage_turnresource_) |
| GET | `/agents/sessions/{session_id}/turns/{turn_id}` | None | [TurnResource](#schema-turnresource) |
| GET | `/agents/sessions/{session_id}/context` | None | [SessionContext](#schema-sessioncontext) |

Account statement routes require an API key linked to an account. The same
authentication and request rate limits apply.

| Method | Path | Request body | Success response |
| --- | --- | --- | --- |
| GET | `/account/balance` | None | [AccountBalance](#schema-accountbalance) |
| GET | `/account/usage` | None; `start` and `end` query parameters | [AccountUsage](#schema-accountusage) |

You can send 1–256 events in one request. Include the original `turn_id` and
`call_id` with each tool result. To cancel work, send an event containing only
`type="agent.session.input.cancel"`.

Event POSTs accept `Idempotency-Key`: repeating the same body and key creates no
new work, while reusing the key with a different body returns `409`. Agent and
session creation reject this header.

You can update a session's metadata and `agent.reasoning.effort`. An effort update
applies to new turns. An active turn keeps its effort through steering, tool waits,
and recovery. Omitted effort is unchanged; null effort resets the model default.
Null `agent` or `reasoning` objects are rejected. Other session agent settings
cannot be updated. Updating or deleting the saved agent does not change existing sessions.
Deleting a session stops its work and frees a slot under the session limit.
The deleted session is no longer available through the API.

## Models {#models}

`GET /models` lists the model IDs available to your tenant, sorted by ID.
The response contains `object="list"` and `data`. It returns the full list in
one response and does not use pagination.

`GET /models/{model}` returns one model. Use the full model ID in the path,
including any `/` characters. An unknown model, or one unavailable to your
tenant, returns `404`.

Each model has `id`, `object="model"`, `created=0`, and `owned_by`.
The `created` value is always zero because model IDs are aliases with no fixed
creation date. Neither endpoint accepts query parameters or requires the
`OpenAI-Beta` header. Both require your API key.

## Pagination {#pagination}

When listing agents, sessions, items, or turns, use `limit` to set the page size
and `order` to choose the direction. `limit` accepts 1–100 and defaults to 20.
`order` accepts `asc` or `desc` and defaults to `desc`. To get the next page, pass
the last returned ID as `after` and keep the same order.

You can also filter sessions with `agent_id`. An unknown cursor or unsupported
query parameter returns `400`.

Each page contains `object="list"`, `data`, `first_id`, `last_id`, and `has_more`.
Keep requesting pages while `has_more` is true. An empty page has null first and
last IDs.

SSE streams do not use pagination. They accept no query parameters and reject
`Last-Event-ID`.

## Read context usage {#context}

`GET /agents/sessions/{session_id}/context` returns
`{"object":"agent.session.context","session_id":"sess_…","input_tokens":4291}`.
`input_tokens` is the measured input usage of the latest completed model reply.
It is null if no reply has completed or that reply has no usage measurement. The
API does not return an older count in its place. Input and tool results added
since that reply are not included yet.

This count differs from turn usage, which adds up model calls, and from the
saved-history limit, which is measured in bytes.

This endpoint accepts no query parameters. You receive `404` for a deleted
session or one owned by another tenant. See the [client example](GUIDES.html.md#context).

## Account statements {#account-statements}

`GET /account/balance` returns promotional credit, purchased credit, unsettled
usage, and available credit. Amounts are integer microdollars: 1,000,000 equals
one US dollar. Available credit already accounts for unsettled usage. This
endpoint accepts no query parameters.

`GET /account/usage?start=YYYY-MM-DD&end=YYYY-MM-DD` returns settled Agents API
usage for the account that owns your key. Supply both dates in UTC; the results
include both the start and end date. Token quantities are grouped by day, key,
model, and meter. Spend and billed requests are grouped by day and key.

Recent usage may appear in `unsettled_micro` before it appears in a usage
statement. Each statement can cover 1–92 days and up to 10,000 quantity rows.
Exceeding either limit returns `400`. This endpoint has no cursor pagination and
rejects query fields other than `start` and `end`.

API keys without a linked account receive `404`. If account statements are not
available for your key, contact Ampersand. If statements are
temporarily unavailable or too many reads are in progress, you may
receive `503` with `Retry-After`.

## Validation and defaults {#validation}

Agent and session metadata can contain up to 16 string pairs. Keys can be up to
64 characters and values up to 512 characters. Input message metadata is a
separate JSON object, limited to 8 KiB. Its reserved keys have specific types:
you can omit them, but cannot set them to null. See [message details](GUIDES.html.md#messages).

When you create an agent, omitted options use these defaults: no tools, disabled
multi-agent mode, null reasoning effort, text output with medium verbosity,
service tier `auto`, and `compaction=auto`. Silent completion defaults to `true`
for `ampersand-v0.1`; the tutor defaults it to `false` and rejects explicit `true`.
Setting these options to null at creation also uses their defaults.

`ampersand-v0.1` supports `reasoning.effort="low"`, `"medium"`, `"high"`, and
`"max"`. The tutor supports `"low"`, `"high"`, and `"max"`. Both models default
to `high`, which is the recommended setting.
Saved agents keep omitted/null effort as null. A new session captures its model's
default when the inherited or overridden effort is null. This lets saved agents
change models without carrying an effort the client did not select. Explicit
efforts are inherited and must be supported by the selected model.
Existing sessions with null effort follow the model's current endpoint defaults.
A release can change those defaults; the current Ampersand default output limit
is 16,384 tokens, including for these sessions.
The Ampersand presets use low with up to 8,192 generated tokens per model call,
medium or high with up to 16,384, or max with up to 32,768.
These limits include reasoning and the answer;
they do not limit the complete session or promise that each call uses the full limit.
Effort support is model-specific; unsupported selections return `400`.
`multi_agent` turns on [multi-agent mode](#multi-agent); it does not change how effort is set.
`reasoning.summary` must remain null. See [reasoning settings](GUIDES.html.md#reasoning-effort).

When you update an agent, omitted fields keep their current values.
`instructions=null` clears the instructions, while nullable settings reset to
their defaults. `model=null` is rejected. Ampersand options are updated one field
at a time; see [agent settings](GUIDES.html.md#agent-settings). Responses omit
`compaction` when its value is the default, `auto`.

Give each tool a unique name and an object JSON Schema. The supported dialects
are draft 4, 6, 7, 2019-09, and 2020-12 (the default). Each schema can be up to
32 KiB, with at most 128 KiB across all tools and 32 levels of nesting. References
must resolve within the schema. The API rejects invalid references and reference
cycles that never reach a property. It also rejects schemas that would apply
more than 1,024 subschemas to a single value through references and schema
keywords. It does not fetch external schemas.

Ampersand checks function arguments before asking your application to run a tool,
but this check has limits:

- It skips `pattern` and `patternProperties`, plus `additionalProperties` and
  `unevaluatedProperties` checks that depend on pattern matching.
- It skips `not`, `oneOf`, `if`, and `contains` with `maxContains` when their
  subschemas depend on these skipped checks.
- It rejects arguments nested more than 64 JSON levels. A call can pass unchecked
  if validation exceeds 100,000 keyword evaluations.

The model receives the full schema. Your handler must check arguments and
permissions before running the function.

If a model reserves special control tokens, tool definitions cannot contain
those tokens. Ampersand escapes them in instructions, message text, metadata,
and tool results before sending that text to the model. Saved API resources
keep the original text.

When input moderation is enabled, Ampersand rejects flagged content before
saving it. It also rejects image input. If moderation cannot complete its check, the
request returns `503`.

## Multi-agent mode {#multi-agent}

Multi-agent mode lets one session work as a team: a main agent that can bring
in subagents of itself on its task. It is off by default. Set it with
`agent.multi_agent` when you create an agent or a session, or in a session's
inline `agent` override:

```json
{
  "agent": {
    "model": "ampersand-v0.1",
    "instructions": "Fix bugs in the checked-out repository.",
    "tools": [{"type": "function", "name": "run_command", "parameters": {"type": "object"}}],
    "reasoning": {"effort": "high"},
    "multi_agent": {"enabled": true, "max_concurrent_subagents": 3}
  },
  "environment": {"type": "none"},
  "input": "The parser test fails on empty lines. Fix it and run the tests."
}
```

| Field | Values | Default |
| --- | --- | --- |
| `multi_agent.enabled` | `true` or `false` | `false` |
| `multi_agent.max_concurrent_subagents` | 1 to 7 when enabled; `null` when disabled | 3 when enabled |

Reasoning effort is set exactly as for a single session, and every subagent
runs at that effort. Effort values the model does not support return `400`
whether multi-agent mode is on or off. `ampersand-tutor-v0.1` rejects
multi-agent mode with `400`.

With multi-agent mode enabled, internal team tools normally use `start_group` and
`send_message`. After the service enables collision fallback, a customer function with either
name makes that session use `internal_team_start_group` and `internal_team_send_message` for
internal coordination. The customer functions keep their supplied names. Sessions without a
conflict keep the original tool names and prompts.

Customer tools that also occupy a selected fallback name return `400` on agent create/update
and session create, including saved-agent overrides. Before collision fallback is enabled,
customer `start_group` or `send_message` functions also return `400` in multi-agent mode.
Single-agent sessions are unaffected. Internal function-call items in the main session's item
list and event stream expose the session's host tool names; they are not included in
`required_actions`. Existing sessions retain the names saved with their prompts.

The session behaves like any other:

| | With multi-agent mode on |
| --- | --- |
| `required_actions` | Function calls from the main agent and every subagent. Answer each on this session with its `turn_id` and `call_id`. |
| `status` | `requires_action` while any call waits for you, `in_progress` while any agent works, `idle` when every agent is done. |
| Items and turns | The main agent's conversation. Its final reply is the answer. |
| `usage` | Includes every agent. |
| Cancel and delete | Stop or delete every agent. |

Guidelines:

- Use multi-agent mode for long, multi-step tasks where parallel work and
  cross-checking pay off, such as fixing bugs in a repository. Keep it off for
  questions, chat, and short tasks.
- Start with the default of 3 subagents. More subagents add parallel work, but
  also more duplicated effort.
- Calls from several agents can be pending at once and share one environment
  (for example, one checkout), so make your tools safe to run concurrently.
- Wait for `agent.session.idle`, not for one turn to complete: the main agent's
  turn can end while subagents still work.
- Every agent's model calls count toward your usage.

See [multi-agent mode](GUIDES.html.md#multi-agent) for client code.

## Server events {#server-events}

Each SSE event has an `event_id` and a JSON payload. Session events include the
session's state, and turn events include the turn's state. Item and text events
include session, turn, and item IDs. The field reference below describes each payload.

| Family | Event types |
| --- | --- |
| Session | `agent.session.created`, `.in_progress`, `.requires_action`, `.idle`, `.failed` |
| Turn | `agent.session.turn.created`, `.in_progress`, `.completed`, `.failed`, `.cancelled` |
| Item | `agent.session.turn.item.added`, `.done` |
| Text content part | `agent.session.turn.content_part.added`, `.done` |
| Text | `agent.session.turn.output_text.delta`, `.done` |
| Error | `error` |

Text deltas are available when the provider supports streaming. When the done
event arrives, replace the text shown so far with its full text. Only completed
items become part of model history. Tool call IDs can repeat across turns, so
identify a call by its session, turn, and call IDs together. See
[recovery](GUIDES.html.md#recovery) for handling disconnects.

Session status is `idle`, `in_progress`, `requires_action`, or `failed`.
Turn status is `queued`, `in_progress`, `waiting`, `completed`, `failed`, or
`cancelled`. Check the turn's status even when the session is idle.

`waiting` means the turn is paused for tool results. Send a result for every
entry in `required_actions`; the turn resumes when none remain.

Usage is null when it is unknown. Token totals can change as more usage is recorded.

Webhooks send signed notifications to your HTTP endpoint. When webhook
management is enabled, [register an endpoint in the developer console](GUIDES.html.md#register-webhook),
select its events, and save its one-time signing secret. New endpoints are
disabled until you enable them after receiver setup. Endpoint management is
available through the console; it is not a public API or OpenAI client operation.

Notifications use the envelope `{id, object, created_at, type, data}` and support
session `created`, `in_progress`, `action_required`, `idle`, and `failed`. See
[webhook notifications](GUIDES.html.md#webhooks) for settings, recovery, and signature
verification, and [WebhookEvent](#schema-webhookevent) for payload fields.

## Errors and limits {#errors}

HTTP errors use `{"error":{"message":"…","type":"…","param":null,"code":null}}`.
Check `code` for a more specific cause when it is present. SSE `error` events also
contain an error object. The OpenAI client can raise `APIError` when it reads one.

| HTTP status | Meaning | What to do |
| --- | --- | --- |
| 400 | Invalid fields, unsupported features, saved-data limits, or content-policy rejection | Correct the request. At the session limit, delete a session or request a higher limit. For other storage limits, contact Ampersand. |
| 401 | Invalid or missing credential | Check the key. |
| 402 | Insufficient credit | Add credit. If an earlier request may have succeeded, check saved state before retrying. |
| 403 | Access denied | Check account eligibility and permissions. |
| 404 | Resource not found for your tenant | Check the ID and the tenant associated with your key. |
| 408 | The first 16 KiB of an events request did not arrive within 10 seconds, or a large upload did not finish within 30 seconds after crossing 16 KiB | Check the client connection. |
| 409 | A retry key or message ID conflicts with saved input, or the session is changing state | Read saved state and compare it with the request you are sending. |
| 413 | Request exceeds the configured body limit (hosted default: 16 MiB) | Reduce the request. |
| 429 | Request rate, work rate, or temporary capacity limit | Follow `Retry-After`; preserve the event request key and body. |
| 503 | The service or a required dependency is temporarily unavailable | Follow `Retry-After` when present, then check saved state. |

An unexpected server failure can return `500`. If you cannot tell whether a
write succeeded, check saved state before retrying it.

A turn that cannot finish has status `failed` and an `error` with `code` and
`message`. The message "Model output did not match the required response format"
means Ampersand could not use the model's output after its retries, for example
a call to a function the agent does not declare. Check whether your instructions
ask for actions as markup instead of [function tools](GUIDES.html.md#chat-actions).

Rate limits can apply to both your key and your tenant. A request can count
toward the limit before its body is validated, its resource is found, or its
idempotency key is checked. Retries can therefore count toward the limit too.
Rate-limit responses may include `retry-after-ms` as well as `Retry-After`.

Session deletion and events requests containing only cancellations use a separate
control budget; the cancellation body must be no larger than 16 KiB. Saved-data
limits return `400` without `Retry-After`. Waiting and retrying the same request
will not free stored data.

## Field reference {#fields}

These tables list the request and response fields. You can also download the
[JSON Schema definitions](api-schemas.json) and select the relevant entry in
`$defs` to validate a payload. The validation rules and service limits above
still apply.

An optional field can be omitted. If no default is listed, do not assume
the value will be null; the API may calculate it. See
[validation and defaults](#validation) for create and update behavior, and
[agent settings](GUIDES.html.md#agent-settings) for older saved sessions.

### AccountBalance {#schema-accountbalance}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"account.balance"` | Optional | Schema default: `"account.balance"`. |
| `account_id` | string | Required | — |
| `promotional_micro` | integer | Required | — |
| `purchased_micro` | integer | Required | — |
| `unsettled_micro` | integer | Required | — |
| `available_micro` | integer | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "account.balance",
      "default": "account.balance",
      "title": "Object",
      "type": "string"
    },
    "account_id": {
      "title": "Account Id",
      "type": "string"
    },
    "promotional_micro": {
      "title": "Promotional Micro",
      "type": "integer"
    },
    "purchased_micro": {
      "title": "Purchased Micro",
      "type": "integer"
    },
    "unsettled_micro": {
      "title": "Unsettled Micro",
      "type": "integer"
    },
    "available_micro": {
      "title": "Available Micro",
      "type": "integer"
    }
  },
  "required": [
    "account_id",
    "promotional_micro",
    "purchased_micro",
    "unsettled_micro",
    "available_micro"
  ],
  "title": "AccountBalance",
  "type": "object"
}
```

</details>

### AccountUsage {#schema-accountusage}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"account.usage"` | Optional | Schema default: `"account.usage"`. |
| `account_id` | string | Required | — |
| `start` | string | Required | `format=date`. |
| `end` | string | Required | `format=date`. |
| `quantities` | List of [UsageQuantity](#schema-usagequantity) | Required | — |
| `spend` | List of [UsageSpend](#schema-usagespend) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "account.usage",
      "default": "account.usage",
      "title": "Object",
      "type": "string"
    },
    "account_id": {
      "title": "Account Id",
      "type": "string"
    },
    "start": {
      "format": "date",
      "title": "Start",
      "type": "string"
    },
    "end": {
      "format": "date",
      "title": "End",
      "type": "string"
    },
    "quantities": {
      "items": {
        "$ref": "#/$defs/UsageQuantity"
      },
      "title": "Quantities",
      "type": "array"
    },
    "spend": {
      "items": {
        "$ref": "#/$defs/UsageSpend"
      },
      "title": "Spend",
      "type": "array"
    }
  },
  "required": [
    "account_id",
    "start",
    "end",
    "quantities",
    "spend"
  ],
  "title": "AccountUsage",
  "type": "object"
}
```

</details>

### AgentCreate {#schema-agentcreate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `model` | string | Required | `minLength=1`. |
| `instructions` | string or null | Optional | Schema default: `null`. |
| `tools` | List of [FunctionTool](#schema-functiontool) | Optional | — |
| `multi_agent` | [MultiAgentDisabled](#schema-multiagentdisabled) or [MultiAgentEnabled](#schema-multiagentenabled) | Optional | — |
| `reasoning` | [DefaultReasoning](#schema-defaultreasoning) | Optional | — |
| `text` | [DefaultText](#schema-defaulttext) | Optional | — |
| `service_tier` | `"auto"` | Optional | Schema default: `"auto"`. |
| `ampersand` | [AmpersandOptions](#schema-ampersandoptions) | Optional | Optional Ampersand behavior; not part of the upstream OpenAI contract. |
| `name` | string or null | Optional | Schema default: `null`. |
| `metadata` | object | Optional | `maxProperties=16`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "model": {
      "minLength": 1,
      "title": "Model",
      "type": "string"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Instructions"
    },
    "tools": {
      "items": {
        "$ref": "#/$defs/FunctionTool"
      },
      "title": "Tools",
      "type": "array"
    },
    "multi_agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/MultiAgentDisabled"
        },
        {
          "$ref": "#/$defs/MultiAgentEnabled"
        }
      ],
      "title": "Multi Agent"
    },
    "reasoning": {
      "$ref": "#/$defs/DefaultReasoning"
    },
    "text": {
      "$ref": "#/$defs/DefaultText"
    },
    "service_tier": {
      "const": "auto",
      "default": "auto",
      "title": "Service Tier",
      "type": "string"
    },
    "ampersand": {
      "$ref": "#/$defs/AmpersandOptions",
      "description": "Optional Ampersand behavior; not part of the upstream OpenAI contract."
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "metadata": {
      "additionalProperties": {
        "maxLength": 512,
        "type": "string"
      },
      "maxProperties": 16,
      "propertyNames": {
        "maxLength": 64
      },
      "title": "Metadata",
      "type": "object"
    }
  },
  "required": [
    "model"
  ],
  "title": "AgentCreate",
  "type": "object"
}
```

</details>

### AgentOverrides {#schema-agentoverrides}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `model` | string or null | Optional | Schema default: `null`. |
| `instructions` | string or null | Optional | Schema default: `null`. |
| `tools` | List of [FunctionTool](#schema-functiontool) or null | Optional | Schema default: `null`. |
| `multi_agent` | [MultiAgentDisabled](#schema-multiagentdisabled) or [MultiAgentEnabled](#schema-multiagentenabled) or null | Optional | Schema default: `null`. |
| `reasoning` | [DefaultReasoning](#schema-defaultreasoning) or null | Optional | Schema default: `null`. |
| `text` | [DefaultText](#schema-defaulttext) or null | Optional | Schema default: `null`. |
| `service_tier` | `"auto"` or null | Optional | Schema default: `null`. |
| `ampersand` | [AmpersandOptions](#schema-ampersandoptions) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "model": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Model"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Instructions"
    },
    "tools": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FunctionTool"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tools"
    },
    "multi_agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/MultiAgentDisabled"
        },
        {
          "$ref": "#/$defs/MultiAgentEnabled"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Multi Agent"
    },
    "reasoning": {
      "anyOf": [
        {
          "$ref": "#/$defs/DefaultReasoning"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "text": {
      "anyOf": [
        {
          "$ref": "#/$defs/DefaultText"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "service_tier": {
      "anyOf": [
        {
          "const": "auto",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Service Tier"
    },
    "ampersand": {
      "anyOf": [
        {
          "$ref": "#/$defs/AmpersandOptions"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "title": "AgentOverrides",
  "type": "object"
}
```

</details>

### AgentResource {#schema-agentresource}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `model` | string | Required | `minLength=1`. |
| `instructions` | string or null | Optional | Schema default: `null`. |
| `tools` | List of [FunctionTool](#schema-functiontool) | Optional | — |
| `multi_agent` | [MultiAgentDisabled](#schema-multiagentdisabled) or [MultiAgentEnabled](#schema-multiagentenabled) | Optional | — |
| `reasoning` | [DefaultReasoning](#schema-defaultreasoning) | Optional | — |
| `text` | [DefaultText](#schema-defaulttext) | Optional | — |
| `service_tier` | `"auto"` | Optional | Schema default: `"auto"`. |
| `ampersand` | [AmpersandOptions](#schema-ampersandoptions) | Optional | Captured behavior; an absent value in an older snapshot means false. |
| `name` | string or null | Optional | Schema default: `null`. |
| `metadata` | object | Optional | `maxProperties=16`. |
| `id` | string | Required | — |
| `object` | `"agent"` | Optional | Schema default: `"agent"`. |
| `created_at` | integer | Required | — |
| `updated_at` | integer | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "model": {
      "minLength": 1,
      "title": "Model",
      "type": "string"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Instructions"
    },
    "tools": {
      "items": {
        "$ref": "#/$defs/FunctionTool"
      },
      "title": "Tools",
      "type": "array"
    },
    "multi_agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/MultiAgentDisabled"
        },
        {
          "$ref": "#/$defs/MultiAgentEnabled"
        }
      ],
      "title": "Multi Agent"
    },
    "reasoning": {
      "$ref": "#/$defs/DefaultReasoning"
    },
    "text": {
      "$ref": "#/$defs/DefaultText"
    },
    "service_tier": {
      "const": "auto",
      "default": "auto",
      "title": "Service Tier",
      "type": "string"
    },
    "ampersand": {
      "$ref": "#/$defs/AmpersandOptions",
      "description": "Captured behavior; an absent value in an older snapshot means false."
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "metadata": {
      "additionalProperties": {
        "maxLength": 512,
        "type": "string"
      },
      "maxProperties": 16,
      "propertyNames": {
        "maxLength": 64
      },
      "title": "Metadata",
      "type": "object"
    },
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "agent",
      "default": "agent",
      "title": "Object",
      "type": "string"
    },
    "created_at": {
      "title": "Created At",
      "type": "integer"
    },
    "updated_at": {
      "title": "Updated At",
      "type": "integer"
    }
  },
  "required": [
    "model",
    "id",
    "created_at",
    "updated_at"
  ],
  "title": "AgentResource",
  "type": "object"
}
```

</details>

### AgentUpdate {#schema-agentupdate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `model` | string or null | Optional | Schema default: `null`. |
| `instructions` | string or null | Optional | Schema default: `null`. |
| `tools` | List of [FunctionTool](#schema-functiontool) or null | Optional | Schema default: `null`. |
| `multi_agent` | [MultiAgentDisabled](#schema-multiagentdisabled) or [MultiAgentEnabled](#schema-multiagentenabled) or null | Optional | Schema default: `null`. |
| `reasoning` | [DefaultReasoning](#schema-defaultreasoning) or null | Optional | Schema default: `null`. |
| `text` | [DefaultText](#schema-defaulttext) or null | Optional | Schema default: `null`. |
| `service_tier` | `"auto"` or null | Optional | Schema default: `null`. |
| `ampersand` | [AmpersandOptions](#schema-ampersandoptions) or null | Optional | Schema default: `null`. |
| `name` | string or null | Optional | Schema default: `null`. |
| `metadata` | object or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "model": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Model"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Instructions"
    },
    "tools": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FunctionTool"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Tools"
    },
    "multi_agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/MultiAgentDisabled"
        },
        {
          "$ref": "#/$defs/MultiAgentEnabled"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Multi Agent"
    },
    "reasoning": {
      "anyOf": [
        {
          "$ref": "#/$defs/DefaultReasoning"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "text": {
      "anyOf": [
        {
          "$ref": "#/$defs/DefaultText"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "service_tier": {
      "anyOf": [
        {
          "const": "auto",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Service Tier"
    },
    "ampersand": {
      "anyOf": [
        {
          "$ref": "#/$defs/AmpersandOptions"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "maxLength": 512,
            "type": "string"
          },
          "maxProperties": 16,
          "propertyNames": {
            "maxLength": 64
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    }
  },
  "title": "AgentUpdate",
  "type": "object"
}
```

</details>

### AmpersandOptions {#schema-ampersandoptions}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `compaction` | `"auto"`, `"disabled"` | Optional | Use configured server compaction, or disable it for this agent. Schema default: `"auto"`. |
| `allow_silent_completion` | boolean | Optional | Allow a successful empty response to finish without an assistant message. Schema default: `true`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "compaction": {
      "default": "auto",
      "description": "Use configured server compaction, or disable it for this agent.",
      "enum": [
        "auto",
        "disabled"
      ],
      "title": "Compaction",
      "type": "string"
    },
    "allow_silent_completion": {
      "default": true,
      "description": "Allow a successful empty response to finish without an assistant message.",
      "title": "Allow Silent Completion",
      "type": "boolean"
    }
  },
  "title": "AmpersandOptions",
  "type": "object"
}
```

</details>

### CancelInput {#schema-cancelinput}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.input.cancel"` | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.input.cancel",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "title": "CancelInput",
  "type": "object"
}
```

</details>

### ContentPartEvent {#schema-contentpartevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.content_part.added"`, `"agent.session.turn.content_part.done"` | Required | — |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `output_index` | integer | Required | — |
| `item_id` | string | Required | — |
| `content_index` | integer | Required | — |
| `part` | [OutputText](#schema-outputtext) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "enum": [
        "agent.session.turn.content_part.added",
        "agent.session.turn.content_part.done"
      ],
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "output_index": {
      "title": "Output Index",
      "type": "integer"
    },
    "item_id": {
      "title": "Item Id",
      "type": "string"
    },
    "content_index": {
      "title": "Content Index",
      "type": "integer"
    },
    "part": {
      "$ref": "#/$defs/OutputText"
    }
  },
  "required": [
    "type",
    "event_id",
    "session_id",
    "turn_id",
    "output_index",
    "item_id",
    "content_index",
    "part"
  ],
  "title": "ContentPartEvent",
  "type": "object"
}
```

</details>

### DefaultReasoning {#schema-defaultreasoning}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `effort` | `"low"`, `"medium"`, `"high"`, `"max"` or null | Optional | Schema default: `null`. |
| `summary` | null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "effort": {
      "anyOf": [
        {
          "enum": [
            "low",
            "medium",
            "high",
            "max"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Effort"
    },
    "summary": {
      "default": null,
      "title": "Summary",
      "type": "null"
    }
  },
  "title": "DefaultReasoning",
  "type": "object"
}
```

</details>

### DefaultText {#schema-defaulttext}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `format` | [TextFormat](#schema-textformat) | Optional | — |
| `verbosity` | `"medium"` | Optional | Schema default: `"medium"`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "format": {
      "$ref": "#/$defs/TextFormat"
    },
    "verbosity": {
      "const": "medium",
      "default": "medium",
      "title": "Verbosity",
      "type": "string"
    }
  },
  "title": "DefaultText",
  "type": "object"
}
```

</details>

### ErrorEvent {#schema-errorevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"error"` | Optional | Schema default: `"error"`. |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `error` | [SessionError](#schema-sessionerror) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "error",
      "default": "error",
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "error": {
      "$ref": "#/$defs/SessionError"
    }
  },
  "required": [
    "event_id",
    "session_id",
    "error"
  ],
  "title": "ErrorEvent",
  "type": "object"
}
```

</details>

### EventMetadata {#schema-eventmetadata}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string or null | Optional | Schema default: `null`. |
| `source` | string or null | Optional | Schema default: `null`. |
| `channel` | string or null | Optional | Schema default: `null`. |
| `sender` | string or null | Optional | Schema default: `null`. |
| `timestamp` | number or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": {
    "$ref": "#/$defs/JsonValue"
  },
  "properties": {
    "id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Id"
    },
    "source": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source"
    },
    "channel": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Channel"
    },
    "sender": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sender"
    },
    "timestamp": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Timestamp"
    }
  },
  "title": "EventMetadata",
  "type": "object"
}
```

</details>

### EventsCreate {#schema-eventscreate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `events` | List of [MessageInput](#schema-messageinput) or [CancelInput](#schema-cancelinput) or [ToolResultInput](#schema-toolresultinput) | Required | `minItems=1`. `maxItems=256`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "events": {
      "items": {
        "discriminator": {
          "mapping": {
            "agent.session.input.cancel": "#/$defs/CancelInput",
            "agent.session.input.message": "#/$defs/MessageInput",
            "agent.session.input.tool_result": "#/$defs/ToolResultInput"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/MessageInput"
          },
          {
            "$ref": "#/$defs/CancelInput"
          },
          {
            "$ref": "#/$defs/ToolResultInput"
          }
        ]
      },
      "maxItems": 256,
      "minItems": 1,
      "title": "Events",
      "type": "array"
    }
  },
  "required": [
    "events"
  ],
  "title": "EventsCreate",
  "type": "object"
}
```

</details>

### FunctionCallItem {#schema-functioncallitem}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `type` | `"function_call"` | Optional | Schema default: `"function_call"`. |
| `turn_id` | string | Required | — |
| `call_id` | string | Required | — |
| `name` | string | Required | — |
| `arguments` | object | Required | — |
| `status` | `"in_progress"`, `"completed"`, `"failed"`, `"incomplete"` | Optional | Schema default: `"in_progress"`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "type": {
      "const": "function_call",
      "default": "function_call",
      "title": "Type",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "call_id": {
      "title": "Call Id",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "arguments": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Arguments",
      "type": "object"
    },
    "status": {
      "default": "in_progress",
      "enum": [
        "in_progress",
        "completed",
        "failed",
        "incomplete"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "required": [
    "id",
    "turn_id",
    "call_id",
    "name",
    "arguments"
  ],
  "title": "FunctionCallItem",
  "type": "object"
}
```

</details>

### FunctionResultItem {#schema-functionresultitem}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `type` | `"function_call_output"` | Optional | Schema default: `"function_call_output"`. |
| `turn_id` | string | Required | — |
| `call_id` | string | Required | — |
| `output` | string or List of [InputText](#schema-inputtext) or [InputImage](#schema-inputimage) or null | Optional | Schema default: `null`. |
| `error` | string or null | Optional | Schema default: `null`. |
| `status` | `"completed"`, `"failed"` | Required | — |
| `metadata` | [EventMetadata](#schema-eventmetadata) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "type": {
      "const": "function_call_output",
      "default": "function_call_output",
      "title": "Type",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "call_id": {
      "title": "Call Id",
      "type": "string"
    },
    "output": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "discriminator": {
              "mapping": {
                "input_image": "#/$defs/InputImage",
                "input_text": "#/$defs/InputText"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/InputText"
              },
              {
                "$ref": "#/$defs/InputImage"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Output"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "status": {
      "enum": [
        "completed",
        "failed"
      ],
      "title": "Status",
      "type": "string"
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/EventMetadata"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id",
    "turn_id",
    "call_id",
    "status"
  ],
  "title": "FunctionResultItem",
  "type": "object"
}
```

</details>

### FunctionTool {#schema-functiontool}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"function"` | Optional | Schema default: `"function"`. |
| `name` | string | Required | `minLength=1`. `maxLength=96`. `pattern=^[a-zA-Z0-9_-]+$`. |
| `description` | string | Optional | Schema default: `""`. |
| `parameters` | object | Required | — |
| `defer_loading` | `false` | Optional | Schema default: `false`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "function",
      "default": "function",
      "title": "Type",
      "type": "string"
    },
    "name": {
      "maxLength": 96,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "title": "Name",
      "type": "string"
    },
    "description": {
      "default": "",
      "title": "Description",
      "type": "string"
    },
    "parameters": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Parameters",
      "type": "object"
    },
    "defer_loading": {
      "const": false,
      "default": false,
      "title": "Defer Loading",
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "parameters"
  ],
  "title": "FunctionTool",
  "type": "object"
}
```

</details>

### InputImage {#schema-inputimage}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"input_image"` | Optional | Schema default: `"input_image"`. |
| `image_url` | string | Required | `minLength=1`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "input_image",
      "default": "input_image",
      "title": "Type",
      "type": "string"
    },
    "image_url": {
      "minLength": 1,
      "title": "Image Url",
      "type": "string"
    }
  },
  "required": [
    "image_url"
  ],
  "title": "InputImage",
  "type": "object"
}
```

</details>

### InputMessage {#schema-inputmessage}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `role` | `"user"` | Required | — |
| `content` | List of [InputText](#schema-inputtext) or [InputImage](#schema-inputimage) | Required | `minItems=1`. |
| `type` | `"message"` | Optional | Schema default: `"message"`. |
| `metadata` | [EventMetadata](#schema-eventmetadata) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "role": {
      "const": "user",
      "title": "Role",
      "type": "string"
    },
    "content": {
      "items": {
        "discriminator": {
          "mapping": {
            "input_image": "#/$defs/InputImage",
            "input_text": "#/$defs/InputText"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/InputText"
          },
          {
            "$ref": "#/$defs/InputImage"
          }
        ]
      },
      "minItems": 1,
      "title": "Content",
      "type": "array"
    },
    "type": {
      "const": "message",
      "default": "message",
      "title": "Type",
      "type": "string"
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/EventMetadata"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "role",
    "content"
  ],
  "title": "InputMessage",
  "type": "object"
}
```

</details>

### InputText {#schema-inputtext}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"input_text"` | Optional | Schema default: `"input_text"`. |
| `text` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "input_text",
      "default": "input_text",
      "title": "Type",
      "type": "string"
    },
    "text": {
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "text"
  ],
  "title": "InputText",
  "type": "object"
}
```

</details>

### InputTokenDetails {#schema-inputtokendetails}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `cached_tokens` | integer | Required | `minimum=0`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "cached_tokens": {
      "minimum": 0,
      "title": "Cached Tokens",
      "type": "integer"
    }
  },
  "required": [
    "cached_tokens"
  ],
  "title": "InputTokenDetails",
  "type": "object"
}
```

</details>

### ItemAddedEvent {#schema-itemaddedevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.item.added"` | Optional | Schema default: `"agent.session.turn.item.added"`. |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `output_index` | integer or null | Optional | Schema default: `null`. |
| `item` | [MessageItem](#schema-messageitem) or [FunctionCallItem](#schema-functioncallitem) or [FunctionResultItem](#schema-functionresultitem) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.turn.item.added",
      "default": "agent.session.turn.item.added",
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "output_index": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Output Index"
    },
    "item": {
      "discriminator": {
        "mapping": {
          "function_call": "#/$defs/FunctionCallItem",
          "function_call_output": "#/$defs/FunctionResultItem",
          "message": "#/$defs/MessageItem"
        },
        "propertyName": "type"
      },
      "oneOf": [
        {
          "$ref": "#/$defs/MessageItem"
        },
        {
          "$ref": "#/$defs/FunctionCallItem"
        },
        {
          "$ref": "#/$defs/FunctionResultItem"
        }
      ],
      "title": "Item"
    }
  },
  "required": [
    "event_id",
    "session_id",
    "turn_id",
    "item"
  ],
  "title": "ItemAddedEvent",
  "type": "object"
}
```

</details>

### ItemDoneEvent {#schema-itemdoneevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.item.done"` | Optional | Schema default: `"agent.session.turn.item.done"`. |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `output_index` | integer | Required | — |
| `item` | [MessageItem](#schema-messageitem) or [FunctionCallItem](#schema-functioncallitem) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.turn.item.done",
      "default": "agent.session.turn.item.done",
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "output_index": {
      "title": "Output Index",
      "type": "integer"
    },
    "item": {
      "anyOf": [
        {
          "$ref": "#/$defs/MessageItem"
        },
        {
          "$ref": "#/$defs/FunctionCallItem"
        }
      ],
      "title": "Item"
    }
  },
  "required": [
    "event_id",
    "session_id",
    "turn_id",
    "output_index",
    "item"
  ],
  "title": "ItemDoneEvent",
  "type": "object"
}
```

</details>

### JsonValue {#schema-jsonvalue}

<details>
<summary>JSON Schema</summary>

```json
{}
```

</details>

### MessageInput {#schema-messageinput}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.input.message"` | Required | — |
| `input` | List of [InputMessage](#schema-inputmessage) | Required | `minItems=1`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.input.message",
      "title": "Type",
      "type": "string"
    },
    "input": {
      "items": {
        "$ref": "#/$defs/InputMessage"
      },
      "minItems": 1,
      "title": "Input",
      "type": "array"
    }
  },
  "required": [
    "type",
    "input"
  ],
  "title": "MessageInput",
  "type": "object"
}
```

</details>

### MessageItem {#schema-messageitem}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `type` | `"message"` | Optional | Schema default: `"message"`. |
| `turn_id` | string | Required | — |
| `role` | `"user"`, `"assistant"` | Required | — |
| `content` | List of [InputText](#schema-inputtext) or [InputImage](#schema-inputimage) or [OutputText](#schema-outputtext) | Required | — |
| `phase` | `"commentary"`, `"final_answer"` or null | Optional | Schema default: `null`. |
| `status` | `"in_progress"`, `"completed"`, `"incomplete"` | Optional | Schema default: `"completed"`. |
| `metadata` | [EventMetadata](#schema-eventmetadata) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "type": {
      "const": "message",
      "default": "message",
      "title": "Type",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "role": {
      "enum": [
        "user",
        "assistant"
      ],
      "title": "Role",
      "type": "string"
    },
    "content": {
      "items": {
        "anyOf": [
          {
            "discriminator": {
              "mapping": {
                "input_image": "#/$defs/InputImage",
                "input_text": "#/$defs/InputText"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/InputText"
              },
              {
                "$ref": "#/$defs/InputImage"
              }
            ]
          },
          {
            "$ref": "#/$defs/OutputText"
          }
        ]
      },
      "title": "Content",
      "type": "array"
    },
    "phase": {
      "anyOf": [
        {
          "enum": [
            "commentary",
            "final_answer"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Phase"
    },
    "status": {
      "default": "completed",
      "enum": [
        "in_progress",
        "completed",
        "incomplete"
      ],
      "title": "Status",
      "type": "string"
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/EventMetadata"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id",
    "turn_id",
    "role",
    "content"
  ],
  "title": "MessageItem",
  "type": "object"
}
```

</details>

### Meter {#schema-meter}

<details>
<summary>JSON Schema</summary>

```json
{
  "enum": [
    "input_tokens",
    "cached_input_tokens",
    "output_tokens"
  ],
  "title": "Meter",
  "type": "string"
}
```

</details>

### ModelList {#schema-modellist}

The models list is one unpaged page, as in the upstream API.

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"list"` | Optional | Schema default: `"list"`. |
| `data` | List of [ModelResource](#schema-modelresource) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "description": "The models list is one unpaged page, as in the upstream API.",
  "properties": {
    "object": {
      "const": "list",
      "default": "list",
      "title": "Object",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/ModelResource"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "data"
  ],
  "title": "ModelList",
  "type": "object"
}
```

</details>

### ModelResource {#schema-modelresource}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `object` | `"model"` | Optional | Schema default: `"model"`. |
| `created` | `0` | Optional | Schema default: `0`. |
| `owned_by` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "model",
      "default": "model",
      "title": "Object",
      "type": "string"
    },
    "created": {
      "const": 0,
      "default": 0,
      "title": "Created",
      "type": "integer"
    },
    "owned_by": {
      "title": "Owned By",
      "type": "string"
    }
  },
  "required": [
    "id",
    "owned_by"
  ],
  "title": "ModelResource",
  "type": "object"
}
```

</details>

### MultiAgentDisabled {#schema-multiagentdisabled}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `enabled` | `false` | Optional | Schema default: `false`. |
| `max_concurrent_subagents` | null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "enabled": {
      "const": false,
      "default": false,
      "title": "Enabled",
      "type": "boolean"
    },
    "max_concurrent_subagents": {
      "default": null,
      "title": "Max Concurrent Subagents",
      "type": "null"
    }
  },
  "title": "MultiAgentDisabled",
  "type": "object"
}
```

</details>

### MultiAgentEnabled {#schema-multiagentenabled}

Multi-agent mode: the session works as one agent that can bring in subagents of itself.

The main agent decides when to start up to `max_concurrent_subagents` subagents on its task;
they share its model, instructions, tools and reasoning effort. Clients see one session: every
agent's function calls arrive in its `required_actions`, and it is idle once all are done.

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `enabled` | `true` | Required | — |
| `max_concurrent_subagents` | integer | Optional | The most subagents the main agent may run at once next to itself. Schema default: `3`. `minimum=1`. `maximum=7`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "description": "Multi-agent mode: the session works as one agent that can bring in subagents of itself.\n\nThe main agent decides when to start up to `max_concurrent_subagents` subagents on its task;\nthey share its model, instructions, tools and reasoning effort. Clients see one session: every\nagent's function calls arrive in its `required_actions`, and it is idle once all are done.",
  "properties": {
    "enabled": {
      "const": true,
      "title": "Enabled",
      "type": "boolean"
    },
    "max_concurrent_subagents": {
      "default": 3,
      "description": "The most subagents the main agent may run at once next to itself.",
      "maximum": 7,
      "minimum": 1,
      "title": "Max Concurrent Subagents",
      "type": "integer"
    }
  },
  "required": [
    "enabled"
  ],
  "title": "MultiAgentEnabled",
  "type": "object"
}
```

</details>

### NoEnvironment {#schema-noenvironment}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"none"` | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "none",
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "title": "NoEnvironment",
  "type": "object"
}
```

</details>

### OutputText {#schema-outputtext}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"output_text"` | Optional | Schema default: `"output_text"`. |
| `text` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "output_text",
      "default": "output_text",
      "title": "Type",
      "type": "string"
    },
    "text": {
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "text"
  ],
  "title": "OutputText",
  "type": "object"
}
```

</details>

### OutputTextDeltaEvent {#schema-outputtextdeltaevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.output_text.delta"` | Optional | Schema default: `"agent.session.turn.output_text.delta"`. |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `output_index` | integer | Required | — |
| `item_id` | string | Required | — |
| `content_index` | integer | Required | — |
| `delta` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.turn.output_text.delta",
      "default": "agent.session.turn.output_text.delta",
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "output_index": {
      "title": "Output Index",
      "type": "integer"
    },
    "item_id": {
      "title": "Item Id",
      "type": "string"
    },
    "content_index": {
      "title": "Content Index",
      "type": "integer"
    },
    "delta": {
      "title": "Delta",
      "type": "string"
    }
  },
  "required": [
    "event_id",
    "session_id",
    "turn_id",
    "output_index",
    "item_id",
    "content_index",
    "delta"
  ],
  "title": "OutputTextDeltaEvent",
  "type": "object"
}
```

</details>

### OutputTextEvent {#schema-outputtextevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.output_text.done"` | Optional | Schema default: `"agent.session.turn.output_text.done"`. |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `output_index` | integer | Required | — |
| `item_id` | string | Required | — |
| `content_index` | integer | Required | — |
| `text` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.turn.output_text.done",
      "default": "agent.session.turn.output_text.done",
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "output_index": {
      "title": "Output Index",
      "type": "integer"
    },
    "item_id": {
      "title": "Item Id",
      "type": "string"
    },
    "content_index": {
      "title": "Content Index",
      "type": "integer"
    },
    "text": {
      "title": "Text",
      "type": "string"
    }
  },
  "required": [
    "event_id",
    "session_id",
    "turn_id",
    "output_index",
    "item_id",
    "content_index",
    "text"
  ],
  "title": "OutputTextEvent",
  "type": "object"
}
```

</details>

### OutputTokenDetails {#schema-outputtokendetails}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `reasoning_tokens` | integer | Required | `minimum=0`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "reasoning_tokens": {
      "minimum": 0,
      "title": "Reasoning Tokens",
      "type": "integer"
    }
  },
  "required": [
    "reasoning_tokens"
  ],
  "title": "OutputTokenDetails",
  "type": "object"
}
```

</details>

### PageQuery {#schema-pagequery}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `after` | string or null | Optional | Schema default: `null`. |
| `limit` | integer | Optional | Schema default: `20`. `minimum=1`. `maximum=100`. |
| `order` | [SortOrder](#schema-sortorder) | Optional | Schema default: `"desc"`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "after": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "After"
    },
    "limit": {
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "title": "Limit",
      "type": "integer"
    },
    "order": {
      "$ref": "#/$defs/SortOrder",
      "default": "desc"
    }
  },
  "title": "PageQuery",
  "type": "object"
}
```

</details>

### AgentPage {#schema-resourcepage_agentresource_}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"list"` | Optional | Schema default: `"list"`. |
| `data` | List of [AgentResource](#schema-agentresource) | Required | — |
| `first_id` | string or null | Required | — |
| `last_id` | string or null | Required | — |
| `has_more` | boolean | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "list",
      "default": "list",
      "title": "Object",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/AgentResource"
      },
      "title": "Data",
      "type": "array"
    },
    "first_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Id"
    },
    "last_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Id"
    },
    "has_more": {
      "title": "Has More",
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "first_id",
    "last_id",
    "has_more"
  ],
  "title": "ResourcePage[AgentResource]",
  "type": "object"
}
```

</details>

### ItemPage {#schema-resourcepage_annotated_union_messageitem__functioncallitem__functionresultitem___fieldinfo_annotation_nonetype__required_true__discriminator__type____}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"list"` | Optional | Schema default: `"list"`. |
| `data` | List of [MessageItem](#schema-messageitem) or [FunctionCallItem](#schema-functioncallitem) or [FunctionResultItem](#schema-functionresultitem) | Required | — |
| `first_id` | string or null | Required | — |
| `last_id` | string or null | Required | — |
| `has_more` | boolean | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "list",
      "default": "list",
      "title": "Object",
      "type": "string"
    },
    "data": {
      "items": {
        "discriminator": {
          "mapping": {
            "function_call": "#/$defs/FunctionCallItem",
            "function_call_output": "#/$defs/FunctionResultItem",
            "message": "#/$defs/MessageItem"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/MessageItem"
          },
          {
            "$ref": "#/$defs/FunctionCallItem"
          },
          {
            "$ref": "#/$defs/FunctionResultItem"
          }
        ]
      },
      "title": "Data",
      "type": "array"
    },
    "first_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Id"
    },
    "last_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Id"
    },
    "has_more": {
      "title": "Has More",
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "first_id",
    "last_id",
    "has_more"
  ],
  "title": "ResourcePage[Annotated[Union[MessageItem, FunctionCallItem, FunctionResultItem], FieldInfo(annotation=NoneType, required=True, discriminator='type')]]",
  "type": "object"
}
```

</details>

### SessionPage {#schema-resourcepage_sessionresource_}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"list"` | Optional | Schema default: `"list"`. |
| `data` | List of [SessionResource](#schema-sessionresource) | Required | — |
| `first_id` | string or null | Required | — |
| `last_id` | string or null | Required | — |
| `has_more` | boolean | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "list",
      "default": "list",
      "title": "Object",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/SessionResource"
      },
      "title": "Data",
      "type": "array"
    },
    "first_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Id"
    },
    "last_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Id"
    },
    "has_more": {
      "title": "Has More",
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "first_id",
    "last_id",
    "has_more"
  ],
  "title": "ResourcePage[SessionResource]",
  "type": "object"
}
```

</details>

### TurnPage {#schema-resourcepage_turnresource_}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"list"` | Optional | Schema default: `"list"`. |
| `data` | List of [TurnResource](#schema-turnresource) | Required | — |
| `first_id` | string or null | Required | — |
| `last_id` | string or null | Required | — |
| `has_more` | boolean | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "list",
      "default": "list",
      "title": "Object",
      "type": "string"
    },
    "data": {
      "items": {
        "$ref": "#/$defs/TurnResource"
      },
      "title": "Data",
      "type": "array"
    },
    "first_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "First Id"
    },
    "last_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Id"
    },
    "has_more": {
      "title": "Has More",
      "type": "boolean"
    }
  },
  "required": [
    "data",
    "first_id",
    "last_id",
    "has_more"
  ],
  "title": "ResourcePage[TurnResource]",
  "type": "object"
}
```

</details>

### SessionAgent {#schema-sessionagent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `model` | string | Required | `minLength=1`. |
| `instructions` | string or null | Optional | Schema default: `null`. |
| `tools` | List of [FunctionTool](#schema-functiontool) | Optional | — |
| `multi_agent` | [MultiAgentDisabled](#schema-multiagentdisabled) or [MultiAgentEnabled](#schema-multiagentenabled) | Optional | — |
| `reasoning` | [DefaultReasoning](#schema-defaultreasoning) | Optional | — |
| `text` | [DefaultText](#schema-defaulttext) | Optional | — |
| `service_tier` | `"auto"` | Optional | Schema default: `"auto"`. |
| `ampersand` | [AmpersandOptions](#schema-ampersandoptions) | Optional | Captured behavior; an absent value in an older snapshot means false. |
| `name` | string or null | Optional | Schema default: `null`. |
| `id` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "model": {
      "minLength": 1,
      "title": "Model",
      "type": "string"
    },
    "instructions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Instructions"
    },
    "tools": {
      "items": {
        "$ref": "#/$defs/FunctionTool"
      },
      "title": "Tools",
      "type": "array"
    },
    "multi_agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/MultiAgentDisabled"
        },
        {
          "$ref": "#/$defs/MultiAgentEnabled"
        }
      ],
      "title": "Multi Agent"
    },
    "reasoning": {
      "$ref": "#/$defs/DefaultReasoning"
    },
    "text": {
      "$ref": "#/$defs/DefaultText"
    },
    "service_tier": {
      "const": "auto",
      "default": "auto",
      "title": "Service Tier",
      "type": "string"
    },
    "ampersand": {
      "$ref": "#/$defs/AmpersandOptions",
      "description": "Captured behavior; an absent value in an older snapshot means false."
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "id": {
      "title": "Id",
      "type": "string"
    }
  },
  "required": [
    "model",
    "id"
  ],
  "title": "SessionAgent",
  "type": "object"
}
```

</details>

### SessionAgentUpdate {#schema-sessionagentupdate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `reasoning` | [SessionReasoningUpdate](#schema-sessionreasoningupdate) | Optional | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "reasoning": {
      "$ref": "#/$defs/SessionReasoningUpdate"
    }
  },
  "title": "SessionAgentUpdate",
  "type": "object"
}
```

</details>

### SessionContext {#schema-sessioncontext}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `object` | `"agent.session.context"` | Optional | Schema default: `"agent.session.context"`. |
| `session_id` | string | Required | — |
| `input_tokens` | integer or null | Required | Input tokens of the latest completed reply; null when it has no usage. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "object": {
      "const": "agent.session.context",
      "default": "agent.session.context",
      "title": "Object",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "input_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "Input tokens of the latest completed reply; null when it has no usage.",
      "title": "Input Tokens"
    }
  },
  "required": [
    "session_id",
    "input_tokens"
  ],
  "title": "SessionContext",
  "type": "object"
}
```

</details>

### SessionCreate {#schema-sessioncreate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `environment` | [NoEnvironment](#schema-noenvironment) | Required | — |
| `agent` | [AgentOverrides](#schema-agentoverrides) or null | Optional | Schema default: `null`. |
| `agent_id` | string or null | Optional | Schema default: `null`. |
| `input` | string or List of [InputMessage](#schema-inputmessage) | Required | — |
| `metadata` | object or null | Optional | Schema default: `null`. |
| `vault_ids` | List of string or null | Optional | Schema default: `null`. |
| `stream` | boolean | Optional | Schema default: `false`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "environment": {
      "$ref": "#/$defs/NoEnvironment"
    },
    "agent": {
      "anyOf": [
        {
          "$ref": "#/$defs/AgentOverrides"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "agent_id": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Agent Id"
    },
    "input": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "$ref": "#/$defs/InputMessage"
          },
          "type": "array"
        }
      ],
      "title": "Input"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "maxLength": 512,
            "type": "string"
          },
          "maxProperties": 16,
          "propertyNames": {
            "maxLength": 64
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    },
    "vault_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "maxItems": 0,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Vault Ids"
    },
    "stream": {
      "default": false,
      "title": "Stream",
      "type": "boolean"
    }
  },
  "required": [
    "environment",
    "input"
  ],
  "title": "SessionCreate",
  "type": "object"
}
```

</details>

### SessionError {#schema-sessionerror}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | string | Optional | Schema default: `"server_error"`. |
| `code` | string or null | Optional | Schema default: `null`. |
| `message` | string | Required | — |
| `param` | string or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "default": "server_error",
      "title": "Type",
      "type": "string"
    },
    "code": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Code"
    },
    "message": {
      "title": "Message",
      "type": "string"
    },
    "param": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Param"
    }
  },
  "required": [
    "message"
  ],
  "title": "SessionError",
  "type": "object"
}
```

</details>

### SessionEvent {#schema-sessionevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.created"`, `"agent.session.in_progress"`, `"agent.session.requires_action"`, `"agent.session.idle"`, `"agent.session.failed"` | Required | — |
| `event_id` | string | Required | — |
| `session` | [SessionResource](#schema-sessionresource) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "enum": [
        "agent.session.created",
        "agent.session.in_progress",
        "agent.session.requires_action",
        "agent.session.idle",
        "agent.session.failed"
      ],
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session": {
      "$ref": "#/$defs/SessionResource"
    }
  },
  "required": [
    "type",
    "event_id",
    "session"
  ],
  "title": "SessionEvent",
  "type": "object"
}
```

</details>

### SessionReasoningUpdate {#schema-sessionreasoningupdate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `effort` | `"low"`, `"medium"`, `"high"`, `"max"` or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "effort": {
      "anyOf": [
        {
          "enum": [
            "low",
            "medium",
            "high",
            "max"
          ],
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Effort"
    }
  },
  "title": "SessionReasoningUpdate",
  "type": "object"
}
```

</details>

### SessionResource {#schema-sessionresource}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `object` | `"agent.session"` | Optional | Schema default: `"agent.session"`. |
| `agent` | [SessionAgent](#schema-sessionagent) | Required | — |
| `environment` | [NoEnvironment](#schema-noenvironment) | Optional | — |
| `created_at` | integer | Required | — |
| `last_active_at` | integer | Required | — |
| `metadata` | object | Optional | `maxProperties=16`. |
| `vault_ids` | List of string | Optional | — |
| `status` | `"idle"`, `"in_progress"`, `"requires_action"`, `"failed"` | Required | — |
| `error` | string or null | Optional | Schema default: `null`. |
| `required_actions` | List of [FunctionRequiredAction](#schema-ampersand_harness__contracts__resources__requiredaction) | Optional | — |
| `usage` | [TokenUsage](#schema-tokenusage) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "agent.session",
      "default": "agent.session",
      "title": "Object",
      "type": "string"
    },
    "agent": {
      "$ref": "#/$defs/SessionAgent"
    },
    "environment": {
      "$ref": "#/$defs/NoEnvironment"
    },
    "created_at": {
      "title": "Created At",
      "type": "integer"
    },
    "last_active_at": {
      "title": "Last Active At",
      "type": "integer"
    },
    "metadata": {
      "additionalProperties": {
        "maxLength": 512,
        "type": "string"
      },
      "maxProperties": 16,
      "propertyNames": {
        "maxLength": 64
      },
      "title": "Metadata",
      "type": "object"
    },
    "vault_ids": {
      "items": {
        "type": "string"
      },
      "title": "Vault Ids",
      "type": "array"
    },
    "status": {
      "enum": [
        "idle",
        "in_progress",
        "requires_action",
        "failed"
      ],
      "title": "Status",
      "type": "string"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "required_actions": {
      "items": {
        "$ref": "#/$defs/ampersand_harness__contracts__resources__RequiredAction"
      },
      "title": "Required Actions",
      "type": "array"
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/TokenUsage"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id",
    "agent",
    "created_at",
    "last_active_at",
    "status"
  ],
  "title": "SessionResource",
  "type": "object"
}
```

</details>

### SessionUpdate {#schema-sessionupdate}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `agent` | [SessionAgentUpdate](#schema-sessionagentupdate) | Optional | — |
| `metadata` | object or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "agent": {
      "$ref": "#/$defs/SessionAgentUpdate"
    },
    "metadata": {
      "anyOf": [
        {
          "additionalProperties": {
            "maxLength": 512,
            "type": "string"
          },
          "maxProperties": 16,
          "propertyNames": {
            "maxLength": 64
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Metadata"
    }
  },
  "title": "SessionUpdate",
  "type": "object"
}
```

</details>

### SortOrder {#schema-sortorder}

<details>
<summary>JSON Schema</summary>

```json
{
  "enum": [
    "asc",
    "desc"
  ],
  "title": "SortOrder",
  "type": "string"
}
```

</details>

### TextFormat {#schema-textformat}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"text"` | Optional | Schema default: `"text"`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "text",
      "default": "text",
      "title": "Type",
      "type": "string"
    }
  },
  "title": "TextFormat",
  "type": "object"
}
```

</details>

### TokenUsage {#schema-tokenusage}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `input_tokens` | integer | Required | `minimum=0`. |
| `input_tokens_details` | [InputTokenDetails](#schema-inputtokendetails) | Required | — |
| `output_tokens` | integer | Required | `minimum=0`. |
| `output_tokens_details` | [OutputTokenDetails](#schema-outputtokendetails) | Required | — |
| `total_tokens` | integer | Required | `minimum=0`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "input_tokens": {
      "minimum": 0,
      "title": "Input Tokens",
      "type": "integer"
    },
    "input_tokens_details": {
      "$ref": "#/$defs/InputTokenDetails"
    },
    "output_tokens": {
      "minimum": 0,
      "title": "Output Tokens",
      "type": "integer"
    },
    "output_tokens_details": {
      "$ref": "#/$defs/OutputTokenDetails"
    },
    "total_tokens": {
      "minimum": 0,
      "title": "Total Tokens",
      "type": "integer"
    }
  },
  "required": [
    "input_tokens",
    "input_tokens_details",
    "output_tokens",
    "output_tokens_details",
    "total_tokens"
  ],
  "title": "TokenUsage",
  "type": "object"
}
```

</details>

### ToolResultInput {#schema-toolresultinput}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.input.tool_result"` | Required | — |
| `turn_id` | string | Required | `minLength=1`. |
| `call_id` | string | Required | `minLength=1`. |
| `success` | boolean | Required | — |
| `output` | string or List of [InputText](#schema-inputtext) or [InputImage](#schema-inputimage) or null | Optional | Schema default: `null`. |
| `error` | string or null | Optional | Schema default: `null`. |
| `metadata` | [EventMetadata](#schema-eventmetadata) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "agent.session.input.tool_result",
      "title": "Type",
      "type": "string"
    },
    "turn_id": {
      "minLength": 1,
      "title": "Turn Id",
      "type": "string"
    },
    "call_id": {
      "minLength": 1,
      "title": "Call Id",
      "type": "string"
    },
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "output": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "discriminator": {
              "mapping": {
                "input_image": "#/$defs/InputImage",
                "input_text": "#/$defs/InputText"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/InputText"
              },
              {
                "$ref": "#/$defs/InputImage"
              }
            ]
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Output"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/EventMetadata"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "type",
    "turn_id",
    "call_id",
    "success"
  ],
  "title": "ToolResultInput",
  "type": "object"
}
```

</details>

### TurnError {#schema-turnerror}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `code` | `"server_error"`, `"context_length_exceeded"`, `"session_budget_exceeded"`, `"invalid_request"`, `"insufficient_credit"`, `"access_denied"`, `"billing_request_in_progress"`, `"access_unavailable"` | Required | — |
| `message` | string | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "code": {
      "enum": [
        "server_error",
        "context_length_exceeded",
        "session_budget_exceeded",
        "invalid_request",
        "insufficient_credit",
        "access_denied",
        "billing_request_in_progress",
        "access_unavailable"
      ],
      "title": "Code",
      "type": "string"
    },
    "message": {
      "title": "Message",
      "type": "string"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "title": "TurnError",
  "type": "object"
}
```

</details>

### TurnEvent {#schema-turnevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"agent.session.turn.created"`, `"agent.session.turn.in_progress"`, `"agent.session.turn.completed"`, `"agent.session.turn.failed"`, `"agent.session.turn.cancelled"` | Required | — |
| `event_id` | string | Required | — |
| `session_id` | string | Required | — |
| `turn_id` | string | Required | — |
| `turn` | [TurnResource](#schema-turnresource) | Required | — |
| `usage` | [TokenUsage](#schema-tokenusage) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "enum": [
        "agent.session.turn.created",
        "agent.session.turn.in_progress",
        "agent.session.turn.completed",
        "agent.session.turn.failed",
        "agent.session.turn.cancelled"
      ],
      "title": "Type",
      "type": "string"
    },
    "event_id": {
      "title": "Event Id",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "turn": {
      "$ref": "#/$defs/TurnResource"
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/TokenUsage"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "type",
    "event_id",
    "session_id",
    "turn_id",
    "turn"
  ],
  "title": "TurnEvent",
  "type": "object"
}
```

</details>

### TurnResource {#schema-turnresource}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `object` | `"agent.session.turn"` | Optional | Schema default: `"agent.session.turn"`. |
| `session_id` | string | Required | — |
| `agent_id` | string | Required | — |
| `subagent_id` | null | Optional | Schema default: `null`. |
| `created_at` | integer | Required | — |
| `started_at` | integer or null | Optional | Schema default: `null`. |
| `completed_at` | integer or null | Optional | Schema default: `null`. |
| `status` | `"queued"`, `"in_progress"`, `"waiting"`, `"completed"`, `"failed"`, `"cancelled"` | Required | — |
| `error` | [TurnError](#schema-turnerror) or null | Optional | Schema default: `null`. |
| `usage` | [TokenUsage](#schema-tokenusage) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "agent.session.turn",
      "default": "agent.session.turn",
      "title": "Object",
      "type": "string"
    },
    "session_id": {
      "title": "Session Id",
      "type": "string"
    },
    "agent_id": {
      "title": "Agent Id",
      "type": "string"
    },
    "subagent_id": {
      "default": null,
      "title": "Subagent Id",
      "type": "null"
    },
    "created_at": {
      "title": "Created At",
      "type": "integer"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Started At"
    },
    "completed_at": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Completed At"
    },
    "status": {
      "enum": [
        "queued",
        "in_progress",
        "waiting",
        "completed",
        "failed",
        "cancelled"
      ],
      "title": "Status",
      "type": "string"
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/TurnError"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "usage": {
      "anyOf": [
        {
          "$ref": "#/$defs/TokenUsage"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id",
    "session_id",
    "agent_id",
    "created_at",
    "status"
  ],
  "title": "TurnResource",
  "type": "object"
}
```

</details>

### UsageQuantity {#schema-usagequantity}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `day` | string | Required | `format=date`. |
| `key_id` | string or null | Required | — |
| `model` | string | Required | — |
| `meter` | [Meter](#schema-meter) | Required | — |
| `quantity` | integer | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "day": {
      "format": "date",
      "title": "Day",
      "type": "string"
    },
    "key_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Key Id"
    },
    "model": {
      "title": "Model",
      "type": "string"
    },
    "meter": {
      "$ref": "#/$defs/Meter"
    },
    "quantity": {
      "title": "Quantity",
      "type": "integer"
    }
  },
  "required": [
    "day",
    "key_id",
    "model",
    "meter",
    "quantity"
  ],
  "title": "UsageQuantity",
  "type": "object"
}
```

</details>

### UsageSpend {#schema-usagespend}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `day` | string | Required | `format=date`. |
| `key_id` | string or null | Required | — |
| `spent_micro` | integer | Required | — |
| `requests` | integer | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "day": {
      "format": "date",
      "title": "Day",
      "type": "string"
    },
    "key_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Key Id"
    },
    "spent_micro": {
      "title": "Spent Micro",
      "type": "integer"
    },
    "requests": {
      "title": "Requests",
      "type": "integer"
    }
  },
  "required": [
    "day",
    "key_id",
    "spent_micro",
    "requests"
  ],
  "title": "UsageSpend",
  "type": "object"
}
```

</details>

### WebhookData {#schema-webhookdata}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `required_action` | [WebhookRequiredAction](#schema-ampersand_harness__webhooks__models__requiredaction) or null | Optional | Schema default: `null`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "required_action": {
      "anyOf": [
        {
          "$ref": "#/$defs/ampersand_harness__webhooks__models__RequiredAction"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "id"
  ],
  "title": "WebhookData",
  "type": "object"
}
```

</details>

### WebhookEvent {#schema-webhookevent}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `id` | string | Required | — |
| `object` | `"event"` | Optional | Schema default: `"event"`. |
| `created_at` | integer | Required | — |
| `type` | [WebhookType](#schema-webhooktype) | Required | — |
| `data` | [WebhookData](#schema-webhookdata) | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "object": {
      "const": "event",
      "default": "event",
      "title": "Object",
      "type": "string"
    },
    "created_at": {
      "title": "Created At",
      "type": "integer"
    },
    "type": {
      "$ref": "#/$defs/WebhookType"
    },
    "data": {
      "$ref": "#/$defs/WebhookData"
    }
  },
  "required": [
    "id",
    "created_at",
    "type",
    "data"
  ],
  "title": "WebhookEvent",
  "type": "object"
}
```

</details>

### WebhookType {#schema-webhooktype}

<details>
<summary>JSON Schema</summary>

```json
{
  "enum": [
    "agent.session.created",
    "agent.session.action_required",
    "agent.session.in_progress",
    "agent.session.idle",
    "agent.session.failed"
  ],
  "title": "WebhookType",
  "type": "string"
}
```

</details>

### FunctionRequiredAction {#schema-ampersand_harness__contracts__resources__requiredaction}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"function_call"` | Optional | Schema default: `"function_call"`. |
| `turn_id` | string | Required | — |
| `call_id` | string | Required | — |
| `name` | string | Required | — |
| `arguments` | object | Required | — |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "function_call",
      "default": "function_call",
      "title": "Type",
      "type": "string"
    },
    "turn_id": {
      "title": "Turn Id",
      "type": "string"
    },
    "call_id": {
      "title": "Call Id",
      "type": "string"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "arguments": {
      "additionalProperties": {
        "$ref": "#/$defs/JsonValue"
      },
      "title": "Arguments",
      "type": "object"
    }
  },
  "required": [
    "turn_id",
    "call_id",
    "name",
    "arguments"
  ],
  "title": "RequiredAction",
  "type": "object"
}
```

</details>

### WebhookRequiredAction {#schema-ampersand_harness__webhooks__models__requiredaction}

| Field | Type | Presence | Rules |
| --- | --- | --- | --- |
| `type` | `"function_call"` | Optional | Schema default: `"function_call"`. |

<details>
<summary>JSON Schema</summary>

```json
{
  "additionalProperties": false,
  "properties": {
    "type": {
      "const": "function_call",
      "default": "function_call",
      "title": "Type",
      "type": "string"
    }
  },
  "title": "RequiredAction",
  "type": "object"
}
```

</details>
