AI-narrated version of this post using a synthetic voice. Great for accessibility or listening while busy.
Why the Prompt Is the Agent
Most of what people call an “AI agent” is not a separate piece of software. It is a language model wrapped in a loop, given some tools, and handed a system prompt that tells it how to behave inside that loop. The frameworks – LangGraph, CrewAI, AutoGen, or a plain function-calling loop you write yourself – decide the plumbing: how state persists, how tools get called, how one step hands off to the next. The prompt decides whether the thing actually behaves like an agent or just an expensive autocomplete that occasionally calls a function.
That is the part most people skip. They read a framework’s quickstart, copy the example agent, swap in their own tools, and wonder why it loops forever, hallucinates a tool call that does not exist, or quietly stops halfway through a task without saying why. Almost always, the fix is not the framework. It is the prompt.
Below are the prompt patterns that actually make an agent behave – not toy examples, but the scaffolding you would use to build something you would trust to run with real tools attached. They are written to be model-agnostic. Drop them into a Claude, GPT, or Gemini system prompt with only minor adjustment, since all three now support structured tool-calling in a broadly similar shape.
1. The Task-Planning Prompt
Before an agent touches a single tool, it should produce a plan you can read and, ideally, approve. An agent that plans out loud is dramatically easier to debug than one that just starts acting.
You are an autonomous agent working toward a defined goal. Before taking any action:
1. Restate the goal in one sentence to confirm you understand it.
2. Break the goal into a numbered list of concrete steps. Each step should
be small enough to verify independently.
3. For each step, name which tool (if any) you expect to use.
4. Flag any step where you are uncertain, missing information, or where
a mistake would be costly or hard to reverse.
5. Output this plan and stop. Do not begin executing until the plan is
approved or you are explicitly told to proceed.
Do not skip straight to actions. A plan that turns out to be wrong is cheap
to fix. An action taken without a plan is not.
The value here is not the plan itself – it is that a bad plan is obvious before anything happens, where a bad first action often is not obvious until three steps later when the agent is already off the rails.
2. The Tool-Use Prompt
Every major provider now supports structured tool/function calling, but the model still needs to be told, in plain language, when to reach for a tool versus when to just answer. Left unguided, models either over-call tools (checking a calculator for arithmetic they could do correctly themselves) or under-call them (guessing at information a tool would have given them for free).
You have access to the following tools: {tool_list}
Use a tool only when:
- The task requires current information you do not reliably know.
- The task requires an exact computation, lookup, or side effect
(sending an email, writing a file, querying a database) that you
cannot simulate accurately in text.
- Verifying your own output against ground truth would meaningfully
reduce the risk of being wrong.
Do not use a tool when:
- You can answer correctly from what you already know with high confidence.
- The tool call would not change your answer.
Before every tool call, state in one line why you are calling it and what
you expect to learn. After the result comes back, state whether it matched
your expectation before deciding your next step.
That last instruction – stating expectations before the call and checking them after – is doing real work. It is what stops an agent from silently accepting a malformed or unexpected tool response and building three more steps on top of a bad result.
3. The Self-Critique / Reflection Prompt
A single pass through a task rarely produces the best possible output. A short, structured self-review pass before finalizing usually catches real problems – and it is far cheaper than a human catching them after the fact.
Before presenting your final output, review your own work as if you were
a skeptical colleague seeing it for the first time:
1. Does this actually satisfy the original goal, or does it satisfy a
simpler version of the goal you drifted toward?
2. Is there a factual claim here you are not actually confident about?
Flag it rather than stating it as certain.
3. Did you skip any step from your original plan? If so, was that
deliberate and justified, or did you just forget?
4. Is there an edge case, error condition, or exception this output
does not account for?
Revise based on this review. If nothing needs to change, say so explicitly
rather than silently passing through unchanged - that confirms the review
actually happened.
The instruction to explicitly confirm “nothing needs to change” is a small but useful trick: it stops the model from performing a review step in name only, without engaging with it.
4. The Human-in-the-Loop Escalation Prompt
The single most important prompt for anyone running an agent against real systems – real money, real customer data, real production infrastructure – is the one that tells it when to stop and ask, rather than proceed on its own judgment.
You are operating with real-world consequences. Before taking any of the
following categories of action, stop and request explicit human approval
rather than proceeding autonomously:
- Anything that spends money, commits to a purchase, or modifies billing.
- Anything that sends a communication (email, message, post) that will be
seen by someone outside this conversation.
- Anything that deletes, overwrites, or irreversibly modifies data.
- Anything where you are less than reasonably confident in the correct
action, even if the action itself seems low-risk.
When escalating, state clearly: what you were about to do, why, what the
risk is if it is wrong, and what you need from the human to proceed.
For everything else, use your judgment and proceed - do not escalate
routine, reversible, low-stakes actions. Escalating everything is as
useless as escalating nothing.
That final line matters as much as the rest of the prompt. An agent that asks permission for every trivial step is not actually saving anyone time – it is just moving the busywork from “doing the task” to “approving forty tiny requests.” The goal is a clean, meaningful escalation boundary, not maximum caution everywhere.
5. Putting It Together
These four patterns are not mutually exclusive – a production agent typically runs all four as layered instructions in a single system prompt: plan first, use tools deliberately, review before finalizing, and escalate at defined boundaries. What changes between a toy agent and one you would actually trust with real access is almost never the underlying model. It is whether these guardrails are actually written down, specific, and testable – versus implied and hoped for.
One practical note: test each of these instructions in isolation before combining them. An agent that plans well but never escalates, or escalates constantly but never plans, is easier to diagnose one layer at a time than as a single tangled prompt that half-works.
Where to Go From Here
If you are choosing which framework to actually build this in, the mechanics differ – LangGraph gives you first-class checkpoints for the escalation pattern above, CrewAI makes role-based planning agents easier to stand up quickly, and a plain tool-calling loop against Claude or GPT is often enough if your workflow does not need persistent state. The prompts above work with any of them – the framework decides how the loop runs, the prompt decides how the agent thinks inside it.
– Alexander
FTC Disclosure: AIToolPickr.com is owned and operated by Auburn AI (Alexander McGregor, Calgary AB). Some links on this site are affiliate links – if you purchase through them, we may earn a commission at no additional cost to you. We only recommend tools we have personally evaluated. This article contains no affiliate links. – Alexander
Related Auburn AI Products
Building content or automations around AI? Auburn AI has production-tested kits: