Prompt and tools
Write a system prompt that works on phone calls, pass customer details in as user info, and give a voice agent functions and tools such as ending the call, handing over to a person or sending a WhatsApp message.
The prompt, user info, functions and tools are all set in the voice agent builder under Settings → Workflows & AI Agents → AI Agents.
How do I write a good voice agent prompt?
Write the prompt as a brief to a new team member who is about to make the call. Cover these parts:
| Part | What to write |
|---|---|
| Identity and purpose | Who the agent is, who it represents, and the single goal of the call. Every reply should serve that goal. |
| Guardrails | What the agent must never say or promise, such as discounts it cannot give or dates it cannot guarantee. Give one instruction at a time so rules do not conflict. |
| Intent, not exact words | Tell the agent to respond to what the caller means, not to exact phrases, so it copes with paraphrases. Avoid rigid scripts. |
| Tone and language | How formal to be, how long replies should be (short works best on the phone), and which languages to use. Ask clarifying questions only when needed. |
| Conversation flow | The expected order, for example greeting, confirm identity, explain the reason for the call, handle the answer, close. Let the agent adapt when the caller goes off track. |
| Objections and fallbacks | How to respond to common objections, what to do when the caller is unclear, and when to hand over to a person or end the call. |
| When to use each function | When the agent may end the call, when it should hand over, and when it should send a message. Some functions only run when the prompt allows it. |
Improve the prompt in short cycles:
- Design: write the role, rules, flow and fallbacks.
- Test: run test calls and test chats with realistic answers (Testing).
- Refine: reword, add detail, or remove ambiguity where the agent went wrong.
- Repeat until the agent handles your common cases reliably.
What is user info?
User info is the set of details about the person on the call, such as their name, order number or amount due. Write them in the User Info box in the builder (click Expand for a larger editor), inserting variables such as {customer_name} where the values go. Type { to pick a variable. Robylon adds the filled-in text to the agent’s instructions at the start of each call.
You can also use variables in the first message. The variables used in User Info and in the first message appear in the sample payload under Set Call Triggers via API, inside variables_info. Fill them in when you trigger a call through the API, or map them in a workflow. See Triggering calls.
Which built-in functions can a voice agent use?
Add them under Functions with Add a Function, and pick the type from the list below. Each function has a Name of the tool, and most also have Should we speak during tool call, which sets what the caller hears while the function runs:
- Off: say nothing.
- Contextual: the agent writes a short line itself, following any instructions you add.
- Fixed Message: the agent says your exact text.
| Function | What it does | Settings |
|---|---|---|
| End Call tool | Ends the call once the conversation is finished. The agent only uses it when your prompt says when a call may end, and it says a closing line first. | Speak during tool call |
| Skip turn | Keeps the agent quiet when the caller asks for a moment, for example “give me a second” or “let me check”. The agent waits until the caller speaks again. It is not used for ordinary silence. | None |
| Voicemail detection | Recognises a voicemail greeting (such as “please leave a message”), leaves a short message in the caller’s language, and ends the call. | Speak during tool call |
| Human agent handover tool | Transfers the call to your team. The agent tells the caller it is transferring them, then the call is passed to one of your team’s numbers. Outside your team’s working hours, the caller hears your unavailability message instead and the call ends, unless Voice Assignment is on in the call transfer configuration. | Handover Configurations: one of the call transfer configurations from Voice settings |
| Knowledge Base | Searches your Knowledge Base during the call, for example for a refund policy or an interest rate. | Select Knowledge Base Sources, and Set Chunk Limit (1 to 100, default 1): how many passages to fetch per search |
| WhatsApp Outbound Message Tool | Sends a WhatsApp template to the caller during the call, for example a payment link. | Choose Account (your WhatsApp business account), Receiver’s Number (a variable holding the number), Choose Template, and speak during tool call. With Contextual, the agent tells the caller what it is sending, such as “I’m sending you the secure payment link now”. |
| Send DTMF tones | Presses phone keys (0 to 9, * and #) to get through an automated phone menu. It is never used on voicemail. |
None |
If the functions have never been set on an agent, Robylon adds an End Call tool automatically so every call can finish.
For the WhatsApp function you need a connected WhatsApp number and an approved template. See Connect WhatsApp and WhatsApp templates.
How do I add my own tools?
Add them under Tools Available with Add Tool. A tool is an action you have already set up in Robylon, such as an API call to your order system or an action in a connected app like Zendesk, Freshdesk, HubSpot or Slack. See Tools.
On a voice agent, each tool also has:
- Speak during tool call, as above. The default is Contextual, so the caller hears something like “let me check that for you” instead of silence.
- A timeout, 10 seconds by default. A phone caller notices every second of waiting, so keep tools fast.