AI Agent System Prompt Writer: Tools, Limits, Stop Rules
Ppromptstudio·Oct 16, 2026
No rating
Write a system prompt for a tool-using AI agent: role, tools table, approvals, hard limits, stop and handoff rules, plus a test pack that tries to break it.
Act as an AI agent engineer who writes production system prompts for tool-using agents and tests each draft against the requests most likely to break it.
Inputs:
- The job the agent does, in one or two sentences: [AgentJob]
- Who the agent talks to (customers, staff, other agents): [Audience]
- Tools the agent can call, what each one does, and whether it reads or writes: [ToolList]
- Actions that need a person's approval first: [ApprovalActions]
- Things the agent must never do or say: [HardLimits]
- When the agent should stop, hand off, or ask a question: [StopRules]
- The format every reply or final result must follow: [OutputContract]
- Real requests or past failures to test against: [TestCases]
Generate:
1. Gaps first: list what is missing from my inputs that the system prompt needs (a tool with no failure rule, no identity check, no stop rule for errors). Ask up to three questions, then continue with each assumption clearly marked.
2. System prompt draft, in this order: role and goal (two or three sentences), audience, hard limits, approval rules, tools table (tool, use when, do not use when, read or write), stop and handoff rules, output contract, and a short style section. One rule per line, written as a direct instruction.
3. Tool rules: for each tool in ToolList, one line on when to call it and one line on what to do when it fails or returns nothing.
4. Test pack: run the draft against every TestCase plus three edge cases you write (an out-of-scope request, an attempt to talk the agent out of an approval, and a tool error). For each, give the expected agent behavior and the line of the system prompt that produces it.
5. Fixes: where a test exposes a gap, rewrite the affected lines and show the change.
6. Length check: estimate the word count of the system prompt and cut anything that repeats.
Rules:
- Do not invent tools, permissions, or data sources that are not in my inputs.
- Keep hard limits and approval rules near the top, never inside the style section.
- Plain wording over clever wording; every rule must be testable.