What makes a good Agent Instruction?
Think of your AI Agent as a capable new team member. It can handle many tasks, but it needs to understand your goals, your expectations, and the context behind its work. A good instruction answers five questions:
You don’t need to include every component in every instruction. Start with what’s essential for your use case.
Example: Vague vs. clear instructions
Less effective:You are a helpful customer support assistant. Answer customer questions professionally.More effective:
You are a customer support assistant for Acme, a project management platform. Help customers understand product features and resolve common issues using the available documentation. Provide direct, friendly answers. When troubleshooting, give clear steps customers can follow. If you cannot verify an answer, acknowledge the uncertainty instead of guessing.The improved version explains the Agent’s purpose, available information, expected behavior, and limitations.
5 steps to writing effective Agent Instructions
1. Define the role and goal
Start by telling the Agent who it is, whom it serves, and what it should achieve. Be specific about the outcome, not just the job title. Example:2. Give context and explain why it matters
AI models often perform better when they understand the reason behind an instruction. Provide relevant background about your business, users, or workflow. Less effective:Always keep your answers short.More effective:
Most customers contact us while working on a task. They need quick, practical answers so they can continue without reading lengthy explanations.The second instruction explains why concise responses matter, helping the Agent apply the preference appropriately. Useful context might include:
- Who will interact with the Agent
- What users typically need help with
- Your business or product background
- What matters most when responding
- Any important constraints
3. Describe the expected behavior
Explain how the Agent should approach common requests. Modern AI models can often make reasonable decisions without detailed instructions for every scenario. Example:4. Define communication style and output format
Tell the Agent how responses should sound and what format to use when necessary. Example:Use examples for consistent outputs
If your Agent needs to follow a specific structure, show what a good response looks like. For example:TypingMind also supports Few-shot Prompting, allowing you to provide example conversations separately from your main Agent Instructions.
5. Set boundaries and decision-making rules
Clear boundaries help prevent unwanted actions, unsupported claims, and responses outside the Agent’s responsibilities. Example:Never provide incorrect information.More effective:
When information is missing or uncertain, explain what you can confirm and suggest how the customer can obtain the remaining details.For Agents with access to Plugins or external services, distinguish between answering a question and performing an action. For example:
Ready-to-use Agent Instructions template
Use this template as a starting point. Copy it into the Agent Instructions field in TypingMind and replace the placeholders with your own details.Advanced techniques
Once your basic instruction works well, consider these techniques for more complex Agents.Structure complex instructions with XML tags
For Agents with multiple responsibilities, XML tags can help separate instructions, context, and examples. Example:Give the Agent appropriate autonomy
For more capable AI models, avoid micromanaging every step. Instead, define the goal, constraints, and conditions that require user input. Example:Keep responses focused
More capable models may sometimes provide more detail than the task requires. A simple communication rule can help:Verify actions and results
For Agents using tools, distinguish between what the Agent intends to do and what has actually happened. Example:Give your Agent knowledge and tools
Instructions control behavior, but they don’t automatically provide access to company information or external systems. TypingMind offers additional features to extend your Agent’s capabilities.
For example, a customer support Agent might use product documentation through a Knowledge Base, retrieve account information through Dynamic Context, and use Plugins for supported actions.
Features such as Dynamic Context, Plugins, and Memory must be configured separately. Writing an instruction alone does not grant an Agent access to these capabilities.
Test and improve your instructions
Even well-written instructions should be tested with realistic conversations. Start by asking your Agent questions that reflect actual user needs. For a customer support Agent, try:
Check whether your Agent:
- Understands the user’s request and stays within its role.
- Gives accurate, useful answers.
- Follows your preferred communication style.
- Asks clarifying questions only when necessary.
- Acknowledges uncertainty instead of inventing information.
- Respects boundaries and action permissions.
Common mistakes to avoid
Final tips
The most effective Agent Instructions combine a clear purpose with enough context and flexibility for the AI to make good decisions. Remember:- Start with the goal. Explain what success looks like.
- Provide useful context. Include the information and reasoning that guide decisions.
- Be clear, not overly prescriptive. Focus on important behaviors rather than every possible situation.
- Use examples when needed. Show the expected output instead of relying on vague descriptions.
- Set meaningful boundaries. Define what the Agent can do and when to ask for confirmation.
- Test and refine. Improve instructions using real conversations and observed results.