Skip to main content
Instructions define how your agent behaves—its identity, communication style, decision-making approach, and operational limits. Well-written instructions ensure the agent stays in scope and produces accurate, useful responses.

Instruction Structure

A complete instruction set covers six components. Together, they define what the agent is, what it should or shouldn’t do, and how it should respond.

Role

Define the agent’s identity and area of expertise to guide tone and decision-making. Specific
Vague

Goal

State a specific objective and how success is measured. Specific
Vague

Context

Provide relevant background information and available data sources. Adequate context reduces assumptions and improves accuracy. Typical context includes:
  • Platform or domain
  • Target audience
  • Available memory variables
  • Tools or knowledge sources

Constraints

Define clear rules to control behavior and ensure compliance. Example

Output Format

Specify how responses should be organized to ensure consistency. Example structure:
  1. Acknowledgment
  2. Analysis or understanding
  3. Solution steps
  4. Next actions

Handling Edge Cases

Prepare agents for unusual situations with explicit instructions.

Sample Prompt

Use this as a starting point for your agent prompts:

Common Issues

The following issues frequently cause poor or incorrect outputs. Use the prompt framework above to avoid them.
  • Vague roles or goals
  • Missing or incomplete context
  • Unstated constraints
  • No defined output structure
  • Conflicting or overly broad instructions
  • Unclear distinction between instructions and context
Examples: