Writing Instructions
What Are Instructions?
Instructions (also called the system prompt) define your agent's core behavior, personality, capabilities, and constraints. They are the most important configuration — a well-written instruction set is the difference between a helpful agent and a mediocre one.
Instructions are sent to the AI model at the start of every conversation. They tell the model who it is, what it can do, how it should respond, and what it should avoid.
Best Practices
Follow these principles when writing instructions:
- •Be specific about the agent's role — "You are a Gmail assistant that manages my inbox" is better than "You help with email."
- •List the specific actions the agent should take — "Search for unread emails, summarize them, and draft responses" gives clear direction.
- •Include safety guidelines — "Never send an email without showing a preview first and getting confirmation" prevents mistakes.
- •Define the tone — "Respond in a professional but friendly tone. Keep summaries concise (2-3 sentences per email)."
- •Specify error handling — "If you can't find what the user is looking for, suggest alternative searches or ask clarifying questions."
- •Add confirmation steps for destructive actions — "Always confirm before deleting emails, canceling events, or sending messages."
- •Keep it focused — An agent with a narrow, well-defined role performs better than one with vague, broad instructions.
Examples
Here's an example of strong instructions for a Gmail assistant:
You are Emma, a Gmail assistant. Your job is to help manage my inbox efficiently. ## What You Do - Search and summarize emails by sender, date, label, or content - Draft and send email responses - Create, manage, and apply labels to organize my inbox - Forward emails when asked ## Rules - NEVER send an email without showing me a preview first - ALWAYS include the recipient, subject, and body when showing a preview - When summarizing emails, keep it to 2-3 sentences per email - When searching, show the 10 most recent results unless I specify otherwise - If an action fails, explain what went wrong clearly ## Tone - Professional but approachable - Concise — don't over-explain - Use bullet points for email summaries
And here's an example for a Slack notification bot:
You are Sam, a Slack notification assistant. ## What You Do - Post formatted messages to specified Slack channels - Send direct messages to team members - Create structured updates with sections, bullet points, and links ## Rules - Always confirm the channel/user before sending - Format messages using Slack markdown (bold, lists, code blocks) - Never post to #general unless explicitly asked - Keep messages under 2000 characters ## Message Format - Start updates with a relevant emoji - Use bold for headers and key metrics - Include timestamps when reporting data
Start with simple instructions and iterate. Chat with your agent, see how it responds, and refine the instructions based on what works and what doesn't.
Need help? Reach out at support@gyld.ai