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

# How a turn executes

> What happens when your agent replies — how answers are delivered per channel, the limits you can set on time, tool use, tokens, and spend, and the model and effort controls you configure.

Every reply your agent produces is one **turn**. Whether the request came from
a web chat, a WhatsApp message, a schedule firing, or an external agent over
A2A, your agent behaves the same way: it works through the request, uses any
tools it needs, and returns an answer — always within the limits you've set.
This page covers what you can expect from a turn and the controls you have over
it.

## Delivery per channel

Answers are delivered in one of two ways depending on the channel:

| Surface                                                        | Delivery                                                                   |
| -------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Owner preview and dashboard chat                               | Streamed live as the answer is written                                     |
| Subscriber web chat and widgets (including anonymous visitors) | Streamed live                                                              |
| [A2A](/a2a) external agents                                    | Returned when the turn completes                                           |
| OpenAI-compatible API                                          | Streamed when the request sets `stream: true`; otherwise returned complete |
| Instant-messaging channels (Telegram, WhatsApp, …)             | Sent as a complete message                                                 |
| Inbound email auto-reply                                       | Sent as a complete reply                                                   |
| [Schedules](/sidebar-menu/schedules)                           | Delivered complete, within the run's limits                                |
| Webhook triggers, feed monitors, MCP events                    | Delivered complete                                                         |

Every channel produces the same answer under the same controls — a streamed
reply and a delivered-complete reply are the same turn, just delivered
differently.

## Limits you can set

No turn runs without bounds. Your agent stops and returns what it has when any
of these limits is reached, and [Monitoring](/sidebar-menu/monitoring) records
which one stopped it.

| Limit                 | Where you set it                                                        | Default                        |
| --------------------- | ----------------------------------------------------------------------- | ------------------------------ |
| Maximum response time | [Purpose → Response Limits](/sidebar-menu/purpose)                      | 2 minutes (settable 5 s – 1 h) |
| Maximum tool loops    | [Purpose → Response Limits](/sidebar-menu/purpose)                      | 10                             |
| Credit budget         | Per-run on [Schedules](/sidebar-menu/schedules); your balance otherwise | Your account balance           |

<Note>
  Even if you never touch Response Limits, your agent is never unbounded: the
  default 2-minute response time and 10 tool loops apply until you choose your
  own values.
</Note>

Spend is checked as a turn runs. If the account balance (for subscriber
traffic, the lower of the owner's and the subscriber's balances) or a per-run
credit budget is used up, the turn stops and closes with a visible notice, and
only the credits actually used are charged.

## Model routing, effort, and fallback

**Choosing the model.** Your agent runs on the model you configure on the
[Purpose page](/sidebar-menu/purpose). Anthropic models run on the platform;
you can also point your agent at OpenAI, DeepSeek, Gemini's OpenAI-compatible
endpoint, OpenRouter, or your own endpoint, using your own key.

**Effort presets.** The [Agent Effort Level](/sidebar-menu/purpose) is your
per-turn quality/cost dial. Higher levels let the agent think more, write
longer answers, and draw on more retrieved knowledge and memory — at higher
cost. Lower levels are faster and cheaper. Pick the level that fits your use
case.

**Fallback chain.** You can configure an ordered list of backup
provider/model entries on the [Purpose page](/sidebar-menu/purpose). If the
primary model can't be reached before it starts answering, your agent
automatically tries the next entry, so a single provider outage doesn't fail
the turn. Once an answer has started, it finishes on whichever model is
serving it, and billing and logs follow the model that actually answered.

## Model Controls

The **Model Controls** card on the [Purpose page](/sidebar-menu/purpose) gives
you request-level knobs. Each autosaves on change:

| Control                     | Effect                                                                                                                     |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Temperature / Top-p / Top-k | Sampling controls — the closest you can get to consistent outputs. Setting a low temperature makes answers more repeatable |
| Max output tokens           | A ceiling on how long each answer step can be                                                                              |
| Thinking                    | Force extended thinking on or off for capable models                                                                       |
| Tool choice                 | Let the model choose tools freely, require a tool, or allow none                                                           |
| Disable parallel tool use   | Restrict the agent to one tool call at a time                                                                              |
| Service tier                | Choose the provider service tier                                                                                           |

<Warning>
  Sampling controls and extended thinking can't both apply at once. Setting a
  temperature, top-p, or top-k value turns extended thinking off for that turn.
</Warning>

## After the answer

Once the answer is done, a few things finish before the turn is fully
complete:

1. **Quality scoring.** If you've enabled the judge, the answer is scored and,
   when it falls short, regenerated — see
   [Evaluation and quality](/runtime/evaluation).
2. **Goal checks.** The turn is checked against your
   [Success Criteria](/sidebar-menu/goals).
3. **Hooks.** Your `post_query` hook fires with the response and usage
   ([Hooks](/sidebar-menu/hooks)).
4. **Billing and logging.** The cost — with a per-component breakdown — lands
   in the [Activity log](/sidebar-menu/activity).
