Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/deploy/authenticated-sessions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<Note>
No backend, and anyone may talk to the agent? A [public
agent](/agents/deploy/public-agents) lets the SDK create sessions with just an
`agentId`: no token involved, gated by an origin allowlist and rate limits.

Check warning on line 21 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L21

Did you really mean 'allowlist'?
</Note>

## Create a token on your backend
Expand Down Expand Up @@ -115,7 +115,7 @@

<Note>
`overrides`, `dynamic_variables`, `tool_events`, `timezone`, and
`world_context` belong in your backend's creation request. The SDK forwards

Check warning on line 118 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L118

Did you really mean 'backend's'?
these options (and its `language` shorthand for `overrides.language`) only in
[public agent](/agents/deploy/public-agents) mode.
</Note>
Expand All @@ -125,12 +125,12 @@
| Field | Type | Description |
| ------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `agent_id` | string, required | The agent to talk to. It must have a [published version](/agents/deploy/versions-publishing). |
| `name` | string, optional | Display name for this session in the console's Conversations list, up to 128 characters. Omit it to show the session's start time instead. API-key requests only: keyless (public) creation rejects it with `400`. |

Check warning on line 128 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L128

Did you really mean 'keyless'?
| `overrides` | object, optional | Replace parts of the published configuration for this session. See [Overrides](#overrides). |
| `dynamic_variables` | object, optional | Up to 50 entries of string, number, or boolean values, substituted into `{{placeholders}}`. See [Dynamic variables](/agents/build/dynamic-variables). |
| `tool_events` | boolean, optional | Stream tool lifecycle events (`toolCallStarted` / `toolCallCompleted` / `toolCallFailed`) to the client. Default `true`; set `false` to keep tool inputs and outputs off the client. |
| `end_user_id` | string, optional | Your identifier for the end user, up to 256 characters. Stored on the session and echoed in [webhook](/agents/monitor/webhooks) payloads and [custom LLM](/agents/build/custom-llm) requests. |
| `end_user_id` | string, optional | Your identifier for the end user, up to 256 characters. Stored on the session, returned on [session queries](/agents/monitor/conversation-history) where you can also filter by it, and echoed in [webhook](/agents/monitor/webhooks) payloads and [custom LLM](/agents/build/custom-llm) requests. |
| `metadata` | object, optional | Your own key-value namespace. Stored and returned verbatim on session queries and webhooks, never read or interpreted by the platform. |

Check warning on line 133 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L133

Did you really mean 'namespace'?
| `llm_extra_body` | object, optional | JSON object (at most 16 KB) forwarded verbatim to your [custom LLM](/agents/build/custom-llm) endpoint on every request as `fishaudio_extra_body`, for example the chat or thread the user is in. Not stored or returned on session reads; ignored when the agent uses a platform model. |
| `record_audio` | boolean, optional | Whether to record this session's audio. Overrides the agent's [recording setting](/agents/monitor/conversation-history#what-gets-stored) for this session only; omit it to use the agent's configuration. |
| `timezone` | string, optional | IANA timezone (like `Asia/Tokyo`) for the agent's sense of local time. Invalid names are rejected with `422`. See [Time & timezone](/agents/build/time-timezone). |
Expand Down Expand Up @@ -158,7 +158,7 @@
"agent_id": "YOUR_AGENT_ID",
"overrides": {
"first_message": "Welcome back, {{name}}, picking up where we left off.",
"voice_id": "802e3bc2b27e49c2995d23ef70e6ac89",

Check warning on line 161 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L161

Did you really mean 'voice_id'?
"language": "ja"
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@

| Status | Meaning |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `400` | A keyless (public-agent) request sent an override [public sessions don't accept](#overrides), or a `name`. |

Check warning on line 226 in agents/deploy/authenticated-sessions.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/deploy/authenticated-sessions.mdx#L226

Did you really mean 'keyless'?
| `401` | Invalid API key. A request with no `Authorization` header at all is treated as a public-agent request instead. |
| `402` | Quota exceeded. |
| `403` | Public-agent request rejected: the agent is not public, or the page's `Origin` is not on the allow-list. |
Expand Down
6 changes: 4 additions & 2 deletions agents/monitor/conversation-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
icon: "clock-rotate-left"
---

Every production session your agents handle (from the API, the console, [public agents](/agents/deploy/public-agents), or [phone calls](/agents/telephony/inbound-calls)) is queryable over REST: a lightweight list for browsing, a merged timeline of messages and tool activity per session, and per-speaker recordings when the agent [records audio](#what-gets-stored). You can query a session while the call is still in progress.

Check warning on line 7 in agents/monitor/conversation-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/monitor/conversation-history.mdx#L7

Did you really mean 'queryable'?

This is a server-side API: authenticate with your API key. The client SDKs deliberately expose no history interface; fetch history from your backend and pass it to your frontend as needed.

Check warning on line 9 in agents/monitor/conversation-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/monitor/conversation-history.mdx#L9

Did you really mean 'SDKs'?

## What gets stored

The session record (status, timing, caller attribution, name, and `metadata`) and the conversation transcript are always kept for production sessions. Audio recording is a per-agent choice, on by default: set `conversation.record_audio` in the console under your agent's **Settings** or in the `conversation` section of the [config API](/agents/build/configuration#configure-through-the-api), with a per-session override on the [session request](/agents/deploy/authenticated-sessions). Recording off means there is no audio to download.
The session record (status, timing, caller attribution, name, `end_user_id`, and `metadata`) and the conversation transcript are always kept for production sessions. Audio recording is a per-agent choice, on by default: set `conversation.record_audio` in the console under your agent's **Settings** or in the `conversation` section of the [config API](/agents/build/configuration#configure-through-the-api), with a per-session override on the [session request](/agents/deploy/authenticated-sessions). Recording off means there is no audio to download.

The setting doesn't affect the live call: transcript events still stream to connected clients in real time.

Expand Down Expand Up @@ -53,6 +53,7 @@
"agent_id": "…",
"agent_name": "Support agent",
"name": "Order #4821 follow-up",
"end_user_id": "user_42",
"status": "completed",
"end_reason": "user_hangup",
"source": "phone",
Expand All @@ -65,12 +66,12 @@
"metadata": { "crm_ticket": "T-4821" }
}
],
"has_more": true,

Check warning on line 69 in agents/monitor/conversation-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/monitor/conversation-history.mdx#L69

Did you really mean 'has_more'?
"next_cursor": "…"

Check warning on line 70 in agents/monitor/conversation-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/monitor/conversation-history.mdx#L70

Did you really mean 'next_cursor'?
}
```

`caller_number` and `dialed_number` are set for phone sessions only (E.164) and are `null` for web sessions. `sip_call_id` is the SIP `Call-ID` of the call's INVITE. It is `null` on web sessions and on outbound calls that were never answered. See [Match calls with your SIP records](/agents/telephony/byo-sip#match-calls-with-your-sip-records). `name` is the display name you passed when creating the session (`null` when omitted), and `metadata` echoes back whatever you attached when creating the session.
`caller_number` and `dialed_number` are set for phone sessions only (E.164) and are `null` for web sessions. `sip_call_id` is the SIP `Call-ID` of the call's INVITE. It is `null` on web sessions and on outbound calls that were never answered. See [Match calls with your SIP records](/agents/telephony/byo-sip#match-calls-with-your-sip-records). `name` is the display name you passed when creating the session (`null` when omitted), `end_user_id` is the end-user identifier you passed (`null` when omitted), and `metadata` echoes back whatever you attached when creating the session.

### Status and end reason

Expand Down Expand Up @@ -103,6 +104,7 @@
| `end_reason` | One or more of the `end_reason` values above, comma-separated |
| `caller_number` | Exact match on the caller's E.164 number; a bare number gets `+` prepended automatically |
| `sip_call_id` | Exact match on the SIP `Call-ID` of the call's INVITE, for looking up the session behind a carrier CDR entry |
| `end_user_id` | Exact, case-sensitive match on the `end_user_id` you set when [creating the session](/agents/deploy/authenticated-sessions), for listing one customer's sessions |
| `created_after` / `created_before` | ISO 8601 timestamps |

<Note>
Expand Down Expand Up @@ -192,7 +194,7 @@

Details worth knowing:

- **Role vocabulary**: the history API's `assistant` is the same speaker the [SDK's live events](/agents/deploy/web-sdk) call `agent`.

Check warning on line 197 in agents/monitor/conversation-history.mdx

View check run for this annotation

Mintlify / Mintlify Validation (hanabiaiinc) - vale-spellcheck

agents/monitor/conversation-history.mdx#L197

Did you really mean 'API's'?
- **Order**: items are sorted by `created_at` ascending; a `tool_result`'s timestamp is its completion time, so long-running tools appear where they actually finished, with messages in between. Items sharing a timestamp order `message`, then `tool_call`, then `tool_result`.
- **`tool_source`**: where the tool ran, one of `client`, `webhook`, `builtin` (platform tools such as call transfer and hang-up), `mcp` (tools from a connected MCP server), `background` (work the agent delegated to a background task), or `unknown` (calls recorded before source attribution). Treat it as an open set. See [Tools](/agents/build/tools).
- **Payloads**: `input` and `output` are JSON strings, symmetric with the live SDK events, so one parser covers both. `output` and `error` are stored up to 256 KB; beyond that the text is cut and `output_truncated` is `true`.
Expand Down
Loading