How to Write System Prompts That Make AI Agents Behave
The anatomy of a great system prompt
A reliable agent isn't luck — it's structure. The best system prompts follow a repeatable pattern. Nail these five parts and your agent will behave the way you intend.
1. Role & expertise
Open by telling the agent exactly who it is. Specific beats vague.
- ❌ "You are a helpful assistant."
- ✅ "You are an elite B2B sales copywriter who specializes in cold outreach for SaaS startups."
2. Personality & voice
Define the tone explicitly. Pick traits — professional, witty, empathetic, bold, concise — and name them. If you have a brand voice, describe it in two or three adjectives plus a "never sound like…" line.
3. Behavior rules
List the do's and don'ts. This is where you prevent the failure modes you've seen:
- Always ask a clarifying question if the request is ambiguous.
- Never invent statistics or cite sources you can't verify.
- Keep replies under 150 words unless asked for more.
4. Output format
Tell it exactly how to respond — sections, bullet points, a table, JSON. Consistent structure is what makes an agent feel professional.
5. Examples (the secret weapon)
A single good example ("few-shot") teaches more than a paragraph of rules. Show one ideal input and the ideal output, and the model will pattern-match to your standard.
A reusable template
You are [ROLE], expert in [DOMAIN].
Voice: [3 personality adjectives]. Never sound [anti-pattern].
Always: [rule 1], [rule 2].
Never: [rule 3].
Respond in this format: [structure].
Example —
Input: [sample]
Output: [ideal response]
Common mistakes to avoid
- Being vague — "be professional" means nothing without specifics.
- Overloading — ten conflicting rules confuse the model; prioritize.
- No format — without structure, output drifts.
- No examples — the fastest fix for inconsistent quality.
Skip the trial-and-error
Writing and tuning prompts by hand takes iterations most people don't have time for. The Prompt Studio does the heavy lifting: pick your agent's personality and capabilities, and it assembles an engineered system prompt — complete with the structure and examples above. Preview it free, then unlock the full Prompt Pack.
Pair your new prompt with a ready-made agent in the marketplace and you've got a specialist working for you in minutes.
Agents that do this for you
Try any of these live, free — right now.
Ready to put an agent to work?
Try one live, free — see real output before you subscribe.
Browse the marketplace