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

## Hold a function call until the user's turn is confirmed

The agent begins building a reply before speech-to-text confirms the user has finished speaking. Agent audio is held until that confirmation, but function calls have always dispatched as soon as the LLM emitted them. For a function with an irreversible side effect, such as ending a call or booking an appointment, that meant the action could run for a turn the user then continued.

### `defer_until_eot`

Add `defer_until_eot: true` to any function in `agent.think.functions` to hold it until the turn is confirmed. If the user keeps speaking and the turn resumes, the call is discarded before it does anything.

```json
{
  "name": "end_call",
  "description": "End the conversation and close the connection",
  "parameters": { "type": "object", "properties": {} },
  "defer_until_eot": true
}
```

The default is `false`, so existing agents are unchanged. Deferring one function does not delay the others: a function that did not opt in still dispatches immediately, even with a deferred call ahead of it in the same turn.

`defer_until_eot` applies to every listen provider, not only Flux.

### `FunctionCallCancelled`

Clients now receive an explicit signal when a client-side function call they were sent is cancelled because the user started speaking again, either inside the speculative window (the turn resumed) or after the turn was confirmed (barge-in). Only calls the client already received are announced.

```json
{
  "type": "FunctionCallCancelled",
  "functions": [{ "id": "fc_12345678-90ab-cdef-1234-567890abcdef", "name": "book_appointment" }]
}
```

Stop work on that `id` and send no `FunctionCallResponse` for it.

For details, see [Speculative Replies & Turn Confirmation](/docs/voice-agent-speculative-replies), [Function Call Cancelled](/docs/voice-agent-function-call-cancelled), and [Configure the Voice Agent](/docs/configure-voice-agent).