The Prompt field on an agent is the text that makes tool calls happen. On a call it is appended to the voice model and to the text model. The router prompt is appended only to the text model. Tool schemas are not copied into this field.
If this prompt never says when to hand work over, the voice model keeps talking and no tool is called. If this prompt contains the parameters JSON, the voice model treats the schema as something to say.
Who reads which text
| Text | Who reads it | What to write |
|---|---|---|
| Agent prompt | Voice model and text model | When the voice model must delegate, and what it must not invent after a result comes back. |
| Router prompt | Text model only | Which of the offered tools to call, in what order, and when to call none. |
| Tool description | Text model, on that function | When this one tool is the right one. |
| Parameters JSON | Text model, as the schema | How to fill each argument. See Tool parameters. |
| Route prompt | Voice model and text model, this call only | Who is calling and the tone for this call. Do not repeat the whole agent prompt here. |
The voice model does not choose the tool name. It decides that the backend should work. The text model then sees the tool list already filtered by the agent and the call right, plus the router prompt, and returns one function call. The text model runs when the voice model delegates, and again after a tool result.
What to write
Four short parts are enough.
- Role. Who the agent is, and what it must not do. One or two sentences.
- When to delegate. Caller situations, in the caller’s words. Not a copy of the parameters object.
- When not to delegate. The greeting, small talk, and any sentence the agent must say itself before a tool, such as an emergency line.
- After a result. Say what the tool returned. Do not invent a value that was not in the result. Do not call the same search again for the same question.
A required order belongs here only as a sentence the voice model can follow (“find a time before you book”). The matching order for the text model belongs in the router prompt (“call search_slots before book_slot”).
Which tokens are filled
In the agent Prompt, and in the route prompt, only three tokens are replaced, and only if you type them. Any other token, including {{AGENT_NAME}}, stays as the characters you wrote. The same three are not filled in the tool-router prompt, the tool description, Parameters JSON, or the operator prompt. The text model still receives each tool as a function. You do not have to paste {{ENABLED_TOOLS}} for that.
| Token | Agent prompt and route prompt | Greeting | Built-in voice prompt | Router, tool text, operator prompt |
|---|---|---|---|---|
| {{ENABLED_TOOLS}} | Yes, if you type it | Yes, for this call | Yes, for this call | Left as written |
| {{CALLER_NAME}} | Yes, if you type it | Yes, for this call | Yes, for this call | Left as written |
| {{GREETING}} | Yes, if you type it. Tokens inside that greeting are not filled again | Do not write this inside the greeting | The greeting text is inserted here | Left as written |
| {{AGENT_NAME}} | Left as written | Yes | Yes, from the Voice page | Left as written |
| {{ORGANIZATION_NAME}} | Left as written | Yes | Yes, from the Voice page | Left as written |
| {{AGENT_LANGUAGE}} | Left as written | Yes | Yes, from the Voice page | Left as written |
| {{AGENT_LOCALE}} | Left as written | Yes | Yes | Left as written |
| {{OUT_OF_SCOPE_MESSAGE}} | Left as written | Yes | Yes, from program config. There is no admin field for it | Left as written |
| Token | Becomes |
|---|---|
| {{ENABLED_TOOLS}} | Comma-separated names that remain after the agent checkboxes and the call right. end_call is included. |
| {{CALLER_NAME}} | user from the route reply. If the route sent no name, the word is volajúci. |
| {{GREETING}} | The greeting stored in the program settings. |
| {{AGENT_NAME}} | The agent name from the Voice page. |
| {{ORGANIZATION_NAME}} | The organization name from the Voice page. |
| {{AGENT_LANGUAGE}} | The spoken language name, for example Slovak. |
| {{AGENT_LOCALE}} | The locale code, for example sk-SK. |
The name and the organization from the Voice page are filled into the built-in voice prompt, and into the greeting when that greeting contains the token. They are not inserted into the Prompt field under Agents.
The greeting is inserted into the built-in voice prompt, and the tokens in the table above are replaced there. If you write {{GREETING}} in the agent prompt, the program pastes that greeting as it is stored. A token inside it, such as {{AGENT_NAME}}, is not replaced a second time.
An outbound call also fills {{CALLEE_NAME}}, {{FROM_NAME}}, {{MESSAGE}}, and {{BRIEFING}} in the built-in outbound prompt. Those are not fields you edit.
Example
Agent prompt:
You are the desk. You book times. You do not invent a time or a price. Delegate when the caller wants a free time, wants a booking, or is finished and wants to hang up. Do not delegate the greeting or small talk. After a tool returns, say only what it returned. If the line was busy, say that and offer another try. Do not promise a transfer the tool did not start. Find a time before you book. One short farewell, then the call ends.
Router prompt for the same agent. Edit it on tool-router-builtin, or on the router this agent uses:
Pick one offered tool, or none. search_slots before book_slot. If nothing in the list matches, call no tool. end_call only after the goodbye, and it is last.
The tool description for search_slots says to call it before offering a time. The parameters description for day says the format is YYYY-MM-DD. Those sentences do not go in the agent prompt again.
What does not belong here
- The parameters object, property names as a schema, or required.
- The endpoint URL, a token, or a SIP URI.
- The extension to transfer to. The tool result sends do and phone. See Tools.
- A test that the caller must say the tool id. The voice model delegates on the situation. The text model matches the tool description.
- Instructions for a different agent. One prompt is this agent only.
When tools still do not run
- The route reply did not name this agent, so the voice session never started.
- The tool is not checked on the agent, or the call right is not on that tool. The text model never sees it. The agent prompt cannot override that.
- The prompt tells the voice model to answer from itself (“just tell them the times”). It will not delegate.
- The parameters JSON is invalid, so a delegation is dropped before the endpoint is called. See Tool parameters.