For the complete documentation index, see llms.txt. This page is also available as Markdown.

Write effective agent instructions

Write instructions that produce consistent, on-brand, and goal-directed agent behavior during calls.

Agent instructions define how your agent behaves during a call, including how it speaks, responds, and handles different situations.

Clear instructions help the agent stay consistent, follow a defined goal, and handle conversations effectively.

Before you start

You need the following before you begin:

  • You have an agent created. See Create an agent.

  • You understand the goal of the agent (for example, qualify leads, book appointments, or provide support).

  • You know the tone and communication style your team wants the agent to use.

1

Define the agent’s goal

Start by defining what the agent should achieve during the call.

Write one clear outcome that the agent should work toward.

Examples:

  • Qualify the caller and collect their contact information.

  • Help the caller book an appointment.

  • Answer product questions and guide the caller to a purchase.

Keep the goal specific. Avoid combining unrelated objectives in a single instruction.

2

Set the tone and communication style

Define how the agent should speak to the caller.

Include tone, level of formality, and any communication preferences.

Examples:

  • Be friendly, professional, and concise.

  • Use simple and clear language.

  • Avoid technical terms unless the caller uses them first.

This helps keep conversations consistent and aligned with your brand.

3

Define the conversation flow

Define how the agent should move through the conversation from start to finish. A clear structure helps the agent stay consistent and avoid skipping important steps.

Include the key stages of the interaction.

Examples:

  • Start with a brief greeting and introduce yourself.

  • Ask questions to understand the caller’s needs.

  • Provide relevant information based on the responses.

  • End the call politely once the goal is completed.

A defined flow helps the agent respond in a structured and predictable way.

4

Add rules and constraints

Define what the agent should and should not do.

Use rules to prevent incorrect or undesired behavior.

Examples:

  • Do not make up information.

  • Do not answer questions outside the provided knowledge.

  • Do not end the call unless the goal is completed or the caller requests it.

Clear rules reduce errors and improve reliability.

5

Include fallback and edge case handling

Prepare the agent for situations where it may not have a clear answer. This prevents the agent from failing silently or providing incorrect responses.

Define how it should respond in those cases.

Examples:

  • If you do not know the answer, offer to transfer to a human agent.

  • Ask clarifying questions when the request is unclear.

This helps maintain a consistent experience even in unexpected scenarios.

6

Review and refine the instructions

Review your instructions before using them in production. Small improvements can significantly impact how the agent behaves during real calls.

Check that:

  • The goal is clear and specific.

  • The tone is consistent.

  • The flow is easy to follow.

  • The rules are unambiguous.

Test the agent and adjust the instructions based on real conversations.

Update the instructions as needed until the agent behaves as expected.

Example

This example shows a complete set of agent instructions.

Goal: Qualify the caller and collect their contact information.

Tone:

  • Friendly and professional.

  • Clear and concise.

Conversation flow:

  • Greet the caller and introduce yourself.

  • Ask for the caller’s name and company.

  • Ask questions to understand their needs.

  • Provide relevant information based on their answers.

  • Confirm collected details before ending the call.

  • End the conversation politely once the goal is completed.

Rules:

  • Do not make up information.

  • Do not skip required questions.

  • Do not end the call unless the goal is completed or the caller requests it.

Fallback behavior:

  • If you do not know the answer, offer to transfer the caller to a human agent.

  • Ask clarifying questions if the request is unclear.

Instruction template

Use the following structure when writing instructions to ensure consistency and clarity.

Common mistakes

Avoid these common issues when writing agent instructions:

  • Writing vague goals that do not define a clear outcome.

  • Combining multiple objectives in a single set of instructions.

  • Omitting rules, which can lead to inconsistent behavior.

  • Not defining fallback behavior for unknown situations.

  • Adding too many instructions, which can reduce consistency and clarity.

  • Writing instructions that are too generic, which leads to inconsistent responses.

Next steps

Here are the recommended next steps after completing this guide:

Last updated