Agent System Prompts¶
Complete system prompts for building AI agents. Each prompt includes role definition, constraints, tool access, and escalation rules -- the elements discussed in Chapter 6: Agent Architecture.
Prompts in This Collection¶
| Agent Type | Description | Agent Category | Related Chapter Section |
|---|---|---|---|
| Customer Support Agent | Handles customer inquiries with escalation to humans | Chat Agent | The 2 Agent Types |
| Data Analyst Agent | Analyzes data and generates reports autonomously | Background Agent | Agent Design Patterns |
| Code Review Agent | Reviews pull requests for quality and security | Background Agent | The 8 Patterns |
| Research Agent | Gathers and synthesizes information from multiple sources | Background Agent | Designing Agent Interfaces |
System Prompt Structure¶
Every system prompt in this collection follows the same structure:
- Role -- who the agent is and what it does
- Capabilities -- what the agent can do (tools, data access)
- Constraints -- what the agent must not do (safety, scope)
- Behavior Rules -- how the agent should respond in specific situations
- Escalation Rules -- when and how to hand off to humans
- Output Format -- how to structure responses
This structure maps to the four requirements from Chapter 6 that humans forgive but agents don't: idempotency, structured responses, explicit errors, and programmatic auth.
Chat Agent vs Background Agent¶
These prompts fall into two categories matching the two agent types covered in the book:
Chat Agents (someone is waiting): - Optimized for response time and user experience - Include escalation rules for human handoff - Handle ambiguity through clarifying questions - Customer Support Agent is a chat agent
Background Agents (work happens unsupervised): - Optimized for accuracy and completeness - Include checkpointing and error recovery - Report results asynchronously - Data Analyst, Code Review, and Research agents are background agents
How to Use These Prompts¶
- Copy the system prompt for the agent type you need
- Replace placeholders (marked with
{BRACKETS}) with your specific details - Add domain-specific constraints for your use case
- Test with representative scenarios before deploying
- Monitor and refine based on real-world behavior
The prompts are starting points. Every production agent needs customization for its specific domain, company policies, and user expectations.
Related Resources¶
- Coding Prompts -- prompts for development tasks
- Evaluation Prompts -- prompts for evaluating agent output quality
- 7 Failure Modes of Agents Framework -- what can go wrong
- Permission Model Framework -- setting autonomy levels