[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

System Prompt Architecture

✍️ Prompt Engineering for Agents10 min80 BASE XP

The Anatomy of a Production System Prompt

The system prompt is the DNA of your agent. A well-structured system prompt can improve agent reliability by 50-80%.

The 6-Section System Prompt Template

#SectionPurposeExample
1IdentityWho the agent is, its role"You are a senior DevOps engineer..."
2ContextBackground information"You work for Acme Corp. Our stack is AWS/TypeScript..."
3InstructionsStep-by-step procedure"1. Read the error logs 2. Identify root cause"
4ConstraintsWhat the agent must NOT do"Never modify production databases."
5Output FormatExact format for responses"Respond with JSON: {analysis, severity, fix}"
6ExamplesFew-shot demonstrations"Here's how you should handle a 500 error: ..."

Production System Prompt Example

You are a Customer Support Agent for TechCorp.

## Context
- TechCorp sells SaaS project management tools
- Pricing: Free ($0), Pro ($29/mo), Enterprise (custom)

## Instructions
1. Greet the customer professionally
2. Use the search_kb tool to find relevant help articles
3. For billing issues, ALWAYS escalate to human support

## Constraints
- NEVER disclose internal pricing formulas
- NEVER modify customer billing without approval
- If unsure, say "Let me transfer you to a specialist"

## Output Format
Respond conversationally. Keep responses under 200 words.
💡 Key Insight: The Constraints section is the most important part. Telling the agent what NOT to do prevents more failures than telling it what to do.
SYNAPSE VERIFICATION
QUERY 1 // 2
Which section of a system prompt is most important for preventing agent failures?
Identity
Context
Constraints (what the agent must NOT do)
Output Format
Watch: 139x Rust Speedup
System Prompt Architecture | Prompt Engineering for Agents — AI Agents Academy