# System Prompt

> The system prompt is the standing instruction layer an LLM receives before user input — defining its role, rules, tools, and tone for the whole conversation.

**A system prompt is the instruction layer a language model receives before any user input — the standing definition of its role, rules, capabilities, and tone that governs every turn of the conversation.**

Chat-trained models distinguish message *roles*: system instructions outrank user messages when they conflict, which is what makes the system prompt the right home for invariants — "you are a code reviewer," "never fabricate citations," "output JSON matching this schema." Every serious LLM product is substantially *made of* its system prompt; the same base model becomes a different product under different standing instructions.

Two crafts follow. Writing them well is a discipline of economy — clear role, few load-bearing rules, no generic filler — the same discipline as a [subagent's prompt body](/guides/getting-started/writing-a-custom-agent), and in agentic tools the system layer extends into files like [CLAUDE.md](/guides/configuration/claude-md-best-practices). Defending them matters because the role hierarchy is soft: [prompt injection](/glossary/prompt-injection) is precisely the attempt to make untrusted text outrank the system layer, which is why real guarantees live in architecture, not wording.

---

_Source: https://agentscamp.com/glossary/system-prompt — Term on AgentsCamp._
