Skip to content
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:

  1. Identity & Goal — "You are an X-expert agent. Your task is to complete Y."
  2. 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."
  3. Loop discipline — "Max 15 tool calls. End with <task_complete> when done."
  4. Reasoning style — "After each tool result, interpret it in a <thinking> block and revise your plan."
  5. 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.

Prerequisites

Resources(1)