Skip to content
ai-agent

Design a scoped, tool-using AI agent for a specific task

Guides the design of a narrow, tool-using AI agent for one real task, including its system prompt, tool access boundaries, and failure/escalation behavior.

Who should use this

Is this prompt for you?

  • Developers building an AI agent with tool access (function calling, MCP tools, code execution)
  • Teams tempted to build one "do everything" agent instead of a scoped one
  • Anyone who needs the agent to fail safely rather than guess when uncertain
The prompt

Copy this prompt

Prompt
Help me design an AI agent for a specific, scoped task — not a general-purpose assistant.

Task the agent should perform: [describe precisely, e.g. "triage incoming support emails, categorize them, and draft a reply for simple cases, escalating anything about billing or refunds to a human"]
Tools/APIs it will have access to: [list them, e.g. "read email inbox, send draft (not send directly), look up customer record by email, create a support ticket"]
What it must NEVER do without human approval: [list explicitly, e.g. "never send an email directly", "never issue a refund", "never delete data"]
Model/framework: [e.g. Claude API with tool use, a specific agent framework — name it]

Design:
1. A system prompt that clearly scopes the agent to this task only, states its available tools and what each is for, and explicitly states what it must escalate to a human rather than attempt
2. The exact tool definitions (name, description, parameters) it needs — no more, no fewer than required for the task
3. Explicit instructions for what the agent should do when it's uncertain (e.g. "if you're not confident about the category, ask for human review rather than guessing") — the goal is safe failure, not guessing to seem competent
4. A clear boundary between actions the agent can take autonomously vs. actions that require a human-in-the-loop approval step
5. Logging/observability: what should be logged about each decision the agent makes so a human can audit it after the fact
6. A short set of test scenarios, including adversarial or ambiguous inputs, to verify the agent escalates instead of guessing when it should

Do not design this as an open-ended chat assistant — every tool and instruction should map directly to the one task described above.

Works well with Claude Code, OpenAI Codex and Gemini.

How to use it

Getting the best result

  1. 1Describe one real, narrow task rather than a general assistant — scope is what makes an agent safe and debuggable
  2. 2List every irreversible or sensitive action explicitly as something requiring human approval
  3. 3Test the resulting agent against the adversarial/ambiguous scenarios before giving it real tool access
  4. 4Review the logging design — you need to be able to reconstruct why the agent did something after the fact
Expected result

What you should get back

  • A scoped system prompt naming the task, available tools, and explicit escalation rules
  • Minimal, precisely defined tool definitions matching only what the task needs
  • A clear autonomous-vs-human-approval boundary for sensitive actions
  • Test scenarios specifically designed to check the agent escalates instead of guessing under uncertainty
Tips

Get more out of this prompt

  • The narrower the task, the more reliable the agent — resist the urge to add "and also handle X" to one agent's scope
  • Always separate "draft an action" from "execute an action" for anything irreversible (sending, deleting, paying)
  • Test with deliberately ambiguous or adversarial input, not just clean examples, before trusting the agent with real tool access
Common mistakes

What to watch out for

  • Building one broad agent for many unrelated tasks instead of several small, scoped agents
  • Giving the agent tools it doesn't need for the task, widening the blast radius of a mistake
  • Not defining what "uncertain" looks like, so the agent guesses confidently instead of escalating

Ready to put this prompt to work?

Pair it with an AI coding tool and a real project, then ship something this week.