How to write instructions and choose tools for an AI agent
5 min read
A reliable instruction template
- Role: who the agent is and who it works for.
- Goal: the one result it must produce.
- Rules: what it must always do and never do.
- Output format: the exact fields or layout you expect.
- Examples: two or three real inputs with the ideal output.
- Stop conditions: when to finish and when to ask a human.
Choose few tools, and describe them well
Every extra tool is another way for the agent to go wrong. Give it only what the job needs. For each tool, write one clear sentence on what it does and when to use it, and name the inputs it needs.
Make uncertainty safe
Tell the agent to say when information is missing instead of guessing, and to hand off to a person when confidence is low. Ask it to cite where each fact came from in your documents.
Common mistakes
- Vague goals such as help with customers.
- No examples of good output.
- Too many tools and too many responsibilities in one agent.
- No limit on how many steps it may take.
- Never testing the messy cases.
Improve in small steps
Change one thing at a time and re-run the same test set. Keep the test set so you can see whether a change helped.