System Prompt

Definition: A system prompt is a high-priority set of instructions supplied by an application to define a model or agent's role, behavior, priorities, and boundaries.
Also known as: System message

What is a system prompt?

A system prompt is a high-priority instruction layer supplied by an application before the user’s current request. It establishes how a model or AI agent should behave, including its role, priorities, boundaries, tool-use rules, and expected response style.

Users may never see the system prompt, but it can influence every model inference within the interaction.

What a system prompt does

A system prompt may tell an agent to:

  • act within a defined role or domain;
  • follow a priority order when requirements conflict;
  • ask for clarification before risky actions;
  • use only approved tools or data sources;
  • protect confidential information;
  • return a specific format;
  • stop or escalate under defined conditions.

For example, a support agent’s system prompt might require it to verify an order before discussing refunds and to request human approval above a fixed limit.

System prompt versus user prompt

A user prompt contains the user’s current request. A system prompt contains application-level guidance that should remain in force across requests. If a user asks the agent to ignore a higher-priority safety rule, the system instruction should continue to apply.

Both are prompts, and both become part of the model’s current [context](/glossary/context/). Their roles and priority differ.

A system prompt also differs from [agent instructions](/glossary/agent-instructions/). Agent instructions are the overall behavioral rules of the system. A system prompt is one delivery mechanism for those rules. Some instructions may instead be enforced by permissions, workflow logic, validators, or approval controls.

What a system prompt cannot guarantee

A system prompt guides model behavior but is not a security boundary by itself. Models can misunderstand instructions, follow malicious content, or produce invalid tool arguments. Long prompts can also contain internal contradictions or hide the most important rule among lower-priority details.

High-impact controls should exist outside the model. Application code should enforce permissions, validate tool calls, protect secrets, and require approval for sensitive changes.

Why it matters

A clear system prompt creates consistent behavior across tasks and helps the model resolve ambiguity. It should explain what the agent is responsible for, which rules take priority, and what to do when information or authority is missing.

Builders should keep system prompts focused, version-controlled, and covered by evaluations. Separate trusted instructions from untrusted documents or webpages, and avoid claiming the prompt can prevent every failure. For a hands-on example of defining an agent’s behavior, see [Build Your First AI Agent](/build-your-first-ai-agent/).

Learn More

Build Your First AI Agent
Continue with the full AIRundown guide →