Prompting

System prompt

A system prompt is the standing instruction given to an AI model before the conversation starts — it sets the model’s role, rules, tone, and the tools and constraints it must follow.

Where a user message is a single request, the system prompt is the persistent context that frames every response: who the assistant is, what it may and may not do, how to format output, and how to use the available tools. In an agent it also encodes the operating contract — safety rules, when to ask versus act, and how to handle errors. Because it applies to the whole session, small wording changes in a system prompt can shift an agent’s behaviour far more than any single user turn.

Key points

  • It defines role, rules, tone, output format, and tool-use policy for the entire session.
  • It is separate from user turns and normally not visible to the end user.
  • It is the highest-leverage place to change agent behaviour — and the first place to look when an agent misbehaves.
  • Keep it specific and testable; vague instructions produce inconsistent behaviour.

Learn it by building

Way of the Agent teaches AI agent engineering level by level — concepts like this one, then hands-on practice, XP, and the AI Chronicles.

Start learning free →