IntermediateAgent DesignFree prompt

Design a Single-Purpose Agent Spec from a Messy Workflow

Turn a vague "the AI should just handle this" request into a tight agent specification with scope, tools, stop conditions, and success criteria.

Produce a build-ready agent spec so an engineer can implement it in Claude Code, the OpenAI Agents SDK, or a framework like LangGraph without guessing.

agent designspecscopingsystem promptguardrails

At a glance

Access

Free prompt

Open to copy — no account or payment needed.

Prompt objective

Produce a build-ready agent spec so an engineer can implement it in Claude Code, the OpenAI Agents SDK, or a framework like LangGraph without guessing.

Real use case

An ops lead wants an agent to "deal with refund requests." Before any code is written, the team needs a clear contract: what the agent can read, what it can change, and when it must hand off to a human.

Customize these fields first

DESCRIBE THE WORKFLOWLIST APIS, DATABASES, INTERNAL TOOLSSTAKEHOLDERS

Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.

Prompt

You are a senior AI agent architect. Turn the workflow below into a precise, build-ready single-agent specification.

Workflow to automate: [DESCRIBE THE WORKFLOW]
Systems/tools available: [LIST APIS, DATABASES, INTERNAL TOOLS]
Who is impacted if it gets something wrong: [STAKEHOLDERS]

Produce, as numbered sections:
1. Agent goal in one sentence (the single job it owns).
2. In-scope vs out-of-scope actions (explicit lists).
3. Tool list: for each tool, name, purpose, inputs, outputs, and whether it is read-only or write.
4. State the agent must track between steps.
5. Stop conditions and human-handoff triggers (when it must escalate instead of acting).
6. Success criteria and 3 measurable signals you would log.
7. Failure modes and the guardrail for each.
8. A minimal system prompt (≤200 words) that encodes all of the above.

Be specific. Prefer narrow scope over broad autonomy. Flag anything ambiguous as an open question instead of assuming.

Open directly in an AI — the text is pre-filled:

How to use this prompt

  1. 1Replace the key placeholders first: DESCRIBE THE WORKFLOW, LIST APIS, DATABASES, INTERNAL TOOLS, STAKEHOLDERS.
  2. 2Replace any bracketed placeholders like [this] with your own context.
  3. 3Add extra background information when you want more tailored results.
  4. 4Combine multiple prompts in one conversation when you need a richer output.
  5. 5Save your best-performing prompts so they are easy to reuse later.

Next best step

Open the guide first, then branch only if you still need more.

A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.

If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.

Related prompts

View all

Explore other prompt categories

Move sideways into adjacent libraries when the current category is not the full answer.

Every prompt here is free. The course teaches the thinking behind them.

Copy as many prompts as you like. When you want to move from single prompts to a repeatable AI workflow, Learn AI in 30 Days walks through it, one day at a time.

Get the courseSee the 30-day curriculum first

Buy the course once ($15/$20 by length), or go all-access for $10/mo with a verifiable certificate.