Skip to main content
The system prompt is your agent’s behavioral ruleset. It sets who the agent is, how it talks, the steps it follows on a call, and the lines it must not cross. Smaller, faster large language models (LLMs) follow a short, concrete, well-structured prompt far more reliably than a long, abstract one, so the way you write it matters as much as what you put in it. This page covers how to write the prompt. For where to set it, see Think.
Prefer to start from a scenario? The agent-prompt skill turns a description of your use case into a greeting, system prompt, variables, and tools that follow the practices below.

Structure the prompt in sections

Give the prompt a clear skeleton. Labeled blocks help the model find the rule it needs on each turn:
  • Identity: who the agent is, its role, and the company it represents.
  • Style: tone and how long each reply should run.
  • Response guidelines: how to ask questions, confirm details, and format what it says.
  • Tool guidance: when to reach for an action and what to say around it.
  • Conversation flow: the numbered steps of the call.
  • Guardrails: what the agent must never do.
Order matters. Put the most important rules near the top and repeat one or two of them at the very end, since those positions carry the most weight.

Write for voice, not text

The agent speaks every reply out loud, so write for the ear:
  • Keep replies to one or two sentences. Long monologues break the feel of a live call.
  • Ask one question at a time. Compound questions (“What’s your name and email?”) confuse callers.
  • Tell the agent never to use markdown, bullet points, or lists in its replies. Formatting is meaningless when spoken.
  • Format for natural speech: dates as “January 15th”, amounts as “two thousand five hundred”, phone numbers digit by digit.
  • Prefer concrete behaviors over abstract ideals. “If the caller mentions a loss, say you’re sorry to hear it” works better than “be empathetic”.
Leave pipeline mechanics out of the prompt. The agent does not know about speech to text (STT), the LLM, or text to speech (TTS), and it does not control turn-taking. Rules like “wait for silence”, “pause”, or “stop speaking” belong to the orchestrator, not the prompt. To set what the agent says when a caller goes quiet, see Handle silences.

Give the agent an identity

Hardcode everything you already know: the company, the agent’s name, its role, and its persona. For a Wayne Enterprises support line, name the company and the role directly rather than leaving them for the model to invent. Add a pronunciation hint next to any term the model might mangle, for example:
A prompt hint guides how the agent refers to a term. To control how the text to speech (TTS) model says a specific word on every call, use a pronunciation dictionary instead. See Using pronunciation dictionaries.

Design the conversation flow

Write the call as numbered steps, one step per agent turn. Keep it to roughly six to ten steps and combine related ones.
  • Use single-level conditionals only. Nested logic (“if X, then if Y, then if Z”) is where smaller models lose the thread.
  • Collect every piece of information an action needs before the step that takes it.
  • Mark a step the agent must not skip with “This step is important.”
Inbound and outbound calls flow differently:
  • Inbound: the caller dialed you. Greet them, say who you are, and offer help. Skip call screening; there is no “who’s calling?” to handle.
  • Outbound: you called them. State who you are and why you’re calling, and handle call screening such as voicemail or “who is this?”.

Verify what the agent hears

Transcription of names, emails, and numbers is error-prone, so build in a read-back. Collect a name or email in two steps: ask for it and have the caller spell it, then read it back, spell it, and confirm. Watch for double letters. Frame this as double-checking what you heard on the call, not as fixing a transcription problem.

Set guardrails

State plainly what the agent must never do, and give it a fallback for anything out of scope, such as offering to take a message. Do not promise capabilities the agent does not have: if there is no tool to transfer a call or take a payment, the prompt must not say it can. Close the section by repeating the one or two rules that matter most.

Use variables for per-call data

Reserve {{variable}} placeholders for values that change per call or that you genuinely don’t know yet, such as a caller’s name. Hardcode fixed values like the company name. Keep the set small.

Prime the agent for tools

When an agent uses a tool, write the flow so it gathers every required parameter before the step that runs the tool. In the prompt, describe what to say while the tool runs and how to react to success or failure, without naming the tool itself. For how to build and attach tools, see Give an agent a tool.

Tune generation

The prompt sets behavior; generation parameters set consistency and length. Lower temperature for steadier answers and set max_completion_tokens to cap reply length. See Tune generation.

Start from a template

The agent studio ships four starter agents you can adapt instead of writing from a blank prompt: Healthcare, Insurance, Financial Services, and Hospitality and Travel. Pick one when you create an agent, then edit the system prompt, greeting, and variables to fit your use case.

Example prompt

The prompt below adapts the built-in Healthcare template to the practices on this page. It shows the sectioned structure in a complete, working prompt.

Next steps

Think

Set the system prompt, greeting, and language model.

Give an agent a tool

Let the agent take actions during a call.

agent-prompt skill

Generate a prompt from a description of your use case.