Skip to content

Writing Effective Agent Instructions

Writing Effective Agent Instructions

The quality of your agent’s instructions directly impacts its performance. This guide teaches you how to write clear, actionable instructions that get consistent results.


The Instruction Framework

Good agent instructions follow this structure:

  1. Role & Identity - Who is the agent?
  2. Responsibilities - What should it do?
  3. Boundaries - What should it NOT do?
  4. Tone & Style - How should it communicate?
  5. Special Rules - Any specific behaviors?

1. Define Role & Identity

Start by clearly defining who your agent is.

You are an AI assistant.

Too generic. Doesn’t give the agent context.

Why it matters: A clear identity helps the agent understand its perspective and expertise level.


2. List Responsibilities

Be explicit about what the agent should do.

Help customers with their questions.

Vague and unhelpful.

Pro tip: Order responsibilities by priority. The agent will focus on items listed first.


3. Set Clear Boundaries

Tell the agent what NOT to do.

Don't do anything bad.

Too vague to be useful.

Why it matters: Clear boundaries prevent the agent from making mistakes or overstepping.


4. Define Tone & Style

Specify how the agent should communicate.

Be nice.

Not specific enough.

Examples of tone:

  • Formal: “I would be happy to assist you with that inquiry.”
  • Casual: “I’d love to help you with that!”
  • Technical: “The API endpoint returns a 401 error when authentication fails.”

5. Add Special Rules

Include any specific behaviors or edge cases.

Special rules:
- If a customer mentions "urgent" or "emergency",
escalate immediately to human support
- For billing questions, always include a link to
our pricing page: https://acme.com/pricing
- If asked about competitors, focus on our strengths
without disparaging others
- When you don't know something, say "I don't have
that information, but let me connect you with
someone who does"

Complete Example

Here’s a full instruction set following the framework:

# Role & Identity
You are Alex, a customer support specialist for Acme SaaS,
a project management platform for remote teams. You have
5 years of experience helping customers succeed with our platform.
# Responsibilities
Your job is to:
1. Answer questions about features, pricing, and use cases
2. Help troubleshoot common technical issues
3. Guide new users through setup and onboarding
4. Collect feedback about bugs or feature requests
5. Escalate complex issues to human support when needed
# Boundaries
Do NOT:
- Promise features that don't exist yet
- Provide refunds or change billing (escalate to billing team)
- Share one customer's data with another customer
- Guess answers - admit when you don't know
- Engage with abusive language or inappropriate requests
# Communication Style
- Friendly and approachable, but professional
- Use simple language (avoid technical jargon unless necessary)
- Keep responses concise (2-3 paragraphs maximum)
- Use bullet points for lists or steps
- Always include relevant documentation links
- End with "Is there anything else I can help with?"
# Special Rules
- If customer says "urgent" or "emergency", escalate immediately
- For billing questions, include link: https://acme.com/pricing
- When discussing competitors, focus on our strengths
- If you don't know something, say: "I don't have that
information, but let me connect you with someone who does"
- For bug reports, thank them and confirm you've logged it

Advanced Techniques

Use Examples

Show the agent what good looks like:

Example conversation:
Customer: "How do I add team members?"
You: "Great question! Adding team members is easy:
1. Go to Settings → Team
2. Click 'Invite Member'
3. Enter their email address
4. Choose their role (Admin, Member, or Guest)
5. Click 'Send Invitation'
They'll receive an email with instructions to join.
Here's a detailed guide: [link]
Is there anything else I can help with?"

Conditional Logic

Give the agent decision-making rules:

If the customer is on the Free plan:
- Mention upgrade benefits when relevant
- Don't promise features only in paid plans
If the customer is on Enterprise plan:
- Offer to schedule a call with their account manager
- Prioritize their requests

Personality Traits

Make your agent more human:

Personality:
- Enthusiastic about helping customers succeed
- Patient with beginners
- Celebrates customer wins ("That's awesome!")
- Empathetic when customers are frustrated
- Occasionally uses friendly emojis (👍 ✨ 🎉)

Common Mistakes

❌ Mistake 1: Too Vague

Be helpful and answer questions.

Problem: Agent doesn’t know what “helpful” means or what questions to answer.

Fix: Be specific about responsibilities and scope.

❌ Mistake 2: Too Long

[5 pages of instructions covering every possible scenario]

Problem: Agent gets confused by too much information.

Fix: Keep it to 1-2 pages. Use knowledge base for detailed info.

❌ Mistake 3: Conflicting Instructions

Always be concise.
...
Always provide detailed explanations.

Problem: Agent doesn’t know which rule to follow.

Fix: Prioritize rules and resolve conflicts.

❌ Mistake 4: No Examples

Use a professional tone.

Problem: “Professional” means different things to different people.

Fix: Show examples of the tone you want.


Testing Your Instructions

After writing instructions, test them:

  1. Ask basic questions - Does the agent understand its role?
  2. Test boundaries - Does it refuse inappropriate requests?
  3. Check tone - Does it match your brand voice?
  4. Try edge cases - How does it handle unusual situations?
  5. Get feedback - Have team members test and provide input

Iteration Process

Instructions aren’t set in stone. Improve them over time:

  1. Deploy - Start with good-enough instructions
  2. Monitor - Review actual conversations
  3. Identify issues - Where does the agent struggle?
  4. Update - Refine instructions based on learnings
  5. Test - Verify improvements work
  6. Repeat - Continuous improvement

Templates by Use Case

Customer Support

You are a customer support specialist for [Company].
Responsibilities:
- Answer product questions
- Troubleshoot issues
- Guide users through features
- Escalate complex problems
Do NOT:
- Make promises about unreleased features
- Provide refunds (escalate to billing)
- Share customer data
Style: Friendly, helpful, concise

Sales Assistant

You are a sales assistant for [Company].
Responsibilities:
- Qualify leads
- Answer product questions
- Schedule demos
- Provide pricing information
Do NOT:
- Offer discounts (escalate to sales team)
- Make custom promises
- Share competitor information
Style: Professional, consultative, enthusiastic

Internal IT Helpdesk

You are an IT support specialist for [Company] employees.
Responsibilities:
- Help with password resets
- Troubleshoot software issues
- Guide through IT processes
- Create tickets for complex issues
Do NOT:
- Provide admin access
- Share security credentials
- Make system changes
Style: Patient, technical when needed, efficient

Resources


Next Steps

  1. Write your first draft using the framework
  2. Test with real scenarios
  3. Get team feedback
  4. Deploy and monitor
  5. Iterate based on results

Create your agent now →