# AI reply

> The AI answers out loud, word by word, so the caller hears it sooner. Best for normal chat.

Source: https://voxio.in/docs/steps-ai-reply · voxioagent 2.0.0 · Index: https://voxio.in/docs/llms.txt

Type: `llm-streaming`.

## What it does

1. Builds the AI's instructions from the [prompt template](https://voxio.in/docs/steps-ai-settings.md#prompt-templates), your `system_prompt`, and the shape of the reply.
2. Adds this turn's input (each name in `input_variables` with its value) to the step's memory (`history_key`).
3. Streams the reply. The pipeline speaks `speak` as the words arrive, ends the call after speaking if the reply sets `hangup`, and uses `interruption_type` if the reply includes one.
4. Saves the exchange to memory. The reply's fields are **not** saved to the call's state.

> **Warning**
>
> Because nothing it returns is saved to state, a Branch can't act on an AI reply. Use [AI decision](https://voxio.in/docs/steps-ai-decision.md) when the next step depends on what the AI decided.

## Settings

Everything goes in the step's `parameters`. In the editor, click the step to open its settings.

- `system_prompt` (string): In the editor: **Instructions**. Tell the agent who it is, what to do and how to talk. Default: `""`.
- `model` (string): In the editor: **Model**. Which AI writes the reply. The provider comes with it. Default: `"openai/gpt-oss-120b"`.
- `llm_return_type` ({ name: { type, description } }): In the editor: **What it decides** (More tab). Things the AI fills in every turn. The spoken reply is what the caller hears; the rest goes to your webhook.
- `interruption_type` (string): In the editor: **If the caller interrupts**. What happens when the caller talks over the agent. Default: `"full"`.
- `input_variables` ({ name: { type, description } }): In the editor: **What it reads** (More tab). Information from earlier steps the AI can use.
- `history_key` (string): In the editor: **Shared memory** (More tab). Steps with the same name here remember the same conversation. Default: `"conversation_history"`.
- `summariser` (boolean): In the editor: **Summarise long calls** (More tab). Keeps long conversations quick by summarising older turns.
- `stream_timeout` (number (seconds)): In the editor: **Give up after** (More tab). When two AI replies race, drop this one if it takes longer than this.
- `interruption_type` (string): What happens if the caller talks while this is being said. See [Interruptions](https://voxio.in/docs/turn-taking-interruptions.md). Default `"full"`.
- `interruption_metadata` (object): Numbers for the timed and length-based interruption types: `duration` (seconds), `length` (words), `ignore-words`.
- `interruption_type_key` (string): Read the interruption type from this value in the state instead, so an earlier step can decide it.
- `interruption_metadata_key` (string): The same, for the interruption numbers.
- `prompt_template` (string): Built-in instructions to start from. See [Prompt templates](https://voxio.in/docs/steps-ai-settings.md#prompt-templates). Default `"base_llm"`.
- `summariser_config` (object): Tune `summariser`. See [Memory](https://voxio.in/docs/steps-ai-settings.md#memory).

## Examples

### A chatty receptionist

The usual conversational step:

```json
{
  "type": "llm-streaming",
  "parameters": {
    "system_prompt": "You are the receptionist at Sunrise Dental. Be warm and brief.",
    "service": "groq",
    "model": "openai/gpt-oss-120b",
    "input_variables": {
      "user_input": {
        "type": "str",
        "description": "What the caller said."
      }
    },
    "llm_return_type": {
      "speak": {
        "type": "str",
        "description": "What to say."
      },
      "hangup": {
        "type": "bool",
        "description": "True to end the call."
      }
    },
    "history_key": "conversation_history"
  },
  "next": "ask_for_input"
}
```

## Next steps

- [Steps](https://voxio.in/docs/steps.md): all the other steps.
- [Patterns](https://voxio.in/docs/workflows-patterns.md): see it in a full workflow.
