Write a system prompt
The system prompt tells the agent who it is, what it does and how it behaves. It is the most important setting on an agent. You write it in the Overview section of the agent page.
A simple structure
A good prompt usually has four parts.
1. Role
You are the front-desk assistant for Acme Clinic. You help patients
book, move and cancel appointments and answer questions about the clinic.
2. Goal
Your goal is to get the caller booked into a suitable appointment,
or to answer their question, in as few turns as possible.
3. Rules
- Greet the caller and ask how you can help.
- Keep each reply to one or two short sentences.
- Confirm the date and time back to the caller before you book.
- If you can't help, offer to transfer the caller to the front desk.
4. Limits
Only discuss Acme Clinic services and appointments.
Never give medical advice. If asked, suggest the caller speaks to a doctor.
Write for the ear
Voice agents speak their replies, so:
- Write the prompt as if the agent is talking, not writing.
- Ask for short, natural sentences. Long answers are hard to follow on a call.
- Tell the agent not to use lists, tables, links or markdown in its replies.
- Tell the agent how to say numbers, dates and codes, for example "read order numbers one digit at a time".
- Give it short acknowledgements to use, such as "Sure" or "Let me check that for you", while it looks something up.
For copy-paste rules on emails, phone numbers, time zones and mixed languages, see Voice best practices.
Tell the agent when to use tools
Connect tools in the agent's Tools section, then name them in the prompt so the agent knows when to call them:
When the caller asks about an order, use lookup_order with the order number
before you answer.
In the prompt editor, choose Insert tool ref to insert the name of a connected tool at the cursor. The agent can only call tools that are connected to it.
Formatting in the editor
The editor toolbar can make text bold or italic, add headings and bulleted lists. The prompt is stored as Markdown. Headings and lists help you organise a long prompt; they don't change how the agent speaks.
Generate a draft with AI
Choose Generate with AI to draft a prompt from the agent's saved name and description and its connected tools and knowledge base. Treat the draft as a starting point and edit it.
Keep it focused
- The prompt can be up to 20,000 characters, but shorter prompts are easier for the model to follow and add less delay to each reply.
- Move reusable instructions, such as how to hand over to a person, into skills and attach them to every agent that needs them.
- Move reference content, such as policies and price lists, into a knowledge base instead of pasting it into the prompt.
Versions
Every saved change to the prompt creates a version. Open Prompt Versions to compare a version with the current prompt or restore it. See Create an agent.