Back to full roadmap
topiccore
Agent System Prompts
Agent system prompt = identity + tool-use rules + loop discipline + format. 5-section scaffold.
2 hours1 resources1 prereqs
5-section production scaffold:
- Identity & Goal — "You are an X-expert agent. Your task is to complete Y."
- Tool inventory + selection guidance — "search_web: real-time info. read_file: code context. Before every tool call, write one sentence on WHY you're calling it."
- Loop discipline — "Max 15 tool calls. End with
<task_complete>when done." - Reasoning style — "After each tool result, interpret it in a
<thinking>block and revise your plan." - Output format — final answer template (markdown, JSON, etc.)
Anthropic example: Claude Code's system prompt is 2000+ tokens, disciplined across all 5 layers. Examples in Anthropic's open-source cookbook repo.