Agent System Prompt Generator
Write an AI agent system prompt from a short brief: role, goal, tools, guardrails, escalation and stop conditions, in XML tags or Markdown, with a gap checklist.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Agent System Prompt Generator?
An agent's system prompt has to answer the same questions every time: who it is, what success looks like, which tools to use and when, what it must never do, what needs a person's approval, when to escalate, how to format answers and when to stop. This generator asks those questions as a form and assembles the answers into a clean, sectioned prompt.
Choose XML-tag sections (<role>, <tools>, <guardrails>...) or Markdown headings, start from a customer support, research or executive assistant example, and watch the checklist tick off what the brief covers and explain what is still missing. The prompt is built in your browser and nothing is sent anywhere.
- Structured brief: role, goal, users, tools, knowledge, guardrails, escalation, output, stop conditions, memory
- XML-tag or Markdown output
- Eleven-point checklist with advice for each missing part
- Support, research and executive assistant examples
- Copy or download; runs entirely in the browser
Updated
How to use the Agent System Prompt Generator
- Start from an example or a blank brief.
- Fill in the role, goal, users and any run-time values your app inserts, such as {{today}}.
- Add each tool with a sentence on when to use it, and list the knowledge sources the agent should trust.
- Write the never-do list, the ask-before list, the escalation path, the output style and the stop conditions, one per line.
- Pick XML or Markdown, check the list of missing items, then copy or download the prompt.
Worked example
Support agent
Input
Role, goal, four tools, three never-do rules, two ask-before actions, escalation, 80-word output limit, three stop conditions
Output
All eleven checklist items complete; about 450 words in ten XML sections
The prompt opens with "You are Ada, a customer support agent..." and keeps each rule in its own section.
Background and insight
Both Anthropic and OpenAI document clear structure as a way to make long prompts easier for models to follow. Anthropic's prompt engineering guide recommends XML tags to separate instructions, context and examples, and Markdown headings work just as well for models trained on documentation. What matters more than the syntax is that each kind of instruction lives in one predictable place, so you can edit a guardrail without hunting through paragraphs.
Tool guidance is where many agent prompts are thin. Models choose tools from their names, descriptions and the instructions around them, so the generator pairs every tool with a "use when" line and adds two general rules: never invent a tool result, and stop retrying after a failed call instead of looping. Guardrails are split into hard limits ("never") and actions that need a clear yes first, because the second group needs a different behaviour: propose, wait, then act.
Stop conditions and escalation are the parts most often left out. Without them an agent may keep calling tools after the question is answered, or keep trying to resolve a case a person should handle. The checklist flags both, along with memory rules that say what may be carried between turns or sessions.
Common use cases
Customer-facing assistants
Support or sales agents that must follow policy, ask before refunds and hand over angry customers.
Internal copilots
Research, data or executive assistants with tools and a clear definition of done.
Specialists in a team
Prompts for each agent in a multi-agent system, with tight scope and stop rules.
Prompt reviews
Use the checklist to audit an existing prompt for missing guardrails or escalation.
Tips and limitations
- State the goal as an outcome ("the customer's question is resolved or handed over") rather than an activity ("answer questions").
- Every "ask before" item should name an action the agent can actually take with a tool; otherwise it is just a note.
- Keep secrets and per-user data out of the system prompt; insert them at run time and tell the agent what they are.
- The word count gives a rough token estimate; long prompts cost money on every turn unless your provider caches them.
- Test the prompt against awkward requests: out-of-policy asks, missing data and users who want a person.
Frequently asked questions
Should an agent system prompt use XML tags or Markdown?
Either works if it is consistent. XML tags make section boundaries unambiguous and are recommended in Anthropic's documentation; Markdown headings read naturally and suit OpenAI and open models too. Pick one per project.
What goes in an agent's guardrails?
Two lists: actions it must never take, such as sharing another customer's data, and actions it may take only after a clear yes, such as refunds or deleting records. Add what to do when a request conflicts with them.
Why does my agent keep calling tools after it has the answer?
It probably has no stop conditions. Tell it exactly when it is done, for example when the user confirms or a call budget is used up, and to give its final answer then.
How long should a system prompt be?
As long as the rules require and no longer. Several hundred words is common for a tool-using agent. Cut repetition and examples that do not change behaviour.
Is my brief stored or sent anywhere?
No. The prompt is assembled in your browser tab and disappears when you close it unless you copy or download it.
Is there an in-depth guide to the Agent System Prompt Generator?
Yes. “The Chief of Staff Agent: Designing Multi-Agent Systems That Finish the Job” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.