Skip to main content
Write instructions that help agents understand and execute their mission effectively.

Key Principles

Be Specific

Vague instructions lead to unpredictable results.

Show Examples

Demonstrate the expected behavior with concrete examples.

Define Boundaries

Clearly state what the agent should and shouldn’t do.

Explain Context

Help the agent understand why certain rules exist.

Instruction Structure

A good set of instructions typically includes:
1

Mission Statement

One clear sentence about what the agent does.
2

Key Responsibilities

The main tasks the agent handles.
3

Guidelines

How to handle common situations.
4

Boundaries

What the agent should never do.
5

Escalation

When and how to ask for human help.

Examples

  • Good Instructions
  • Bad Instructions
You are an invoice processing assistant.

MISSION: Review incoming invoices and route them to the appropriate approver.

PROCESS:
1. Extract vendor name, amount, and department from each invoice
2. If amount < $1000, approve automatically and notify finance
3. If amount >= $1000, route to department head for approval
4. If vendor is new, flag for review and notify procurement

NEVER:
- Approve invoices over $5000 without explicit human approval
- Email vendors directly
- Modify invoice amounts

ESCALATE TO HUMAN WHEN:
- Invoice format is unrecognizable
- Vendor information conflicts with our records
- You're unsure about the correct department

Level of Detail

The detail level controls predictability vs. flexibility:
More DetailLess Detail
More predictable behaviorMore flexible problem-solving
Less room for creativityCan handle unexpected situations
Easier to auditMay surprise you (good or bad)
Start with moderate detail, then adjust based on the agent’s behavior. Add rules when you see unwanted patterns.

Common Mistakes

“Handle customer emails” → What does “handle” mean? Which customers?
“Always respond quickly” + “Take time to research thoroughly”
What if the data is incomplete? What if the system is down?
Agent doesn’t know when to ask for help.

Let the Agent Help

Remember: agents can write their own instructions based on conversation. Often, the best approach is:
  1. Describe what you want
  2. Let the agent draft instructions
  3. Review and refine together
  4. Test and iterate