An AI agent should not begin with a long list of tools. It should begin with one job, one observable result, and a clear boundary around what it may do.
This guide helps you turn one repetitive task into a focused agent plan you can inspect and test. You will finish with an agent contract, a context checklist, a permission map, and a small evaluation set.
1. Decide whether you need an agent
Use a normal prompt when one model response can complete the task. Use a fixed workflow when the steps are known in advance. Consider an agent only when the system must choose its next step, use tools, inspect the result, and adapt.
Anthropic recommends starting with the simplest solution that works because agentic systems can add cost, latency, and compounding errors. OpenAI similarly describes agents as systems that independently accomplish tasks through models, tools, instructions, and guardrails.
Use this decision rule:
| Situation | Better starting point |
|---|---|
| One clear input and one response | Prompt |
| Known sequence with fixed checks | Workflow |
| Variable path that requires tool feedback | Agent |
2. Choose one narrow result
Do not ask an agent to "run marketing" or "manage the business." Choose a result a person can inspect.
Good first results include:
- Turn an approved call transcript into a structured follow-up draft.
- Review a support request and prepare the relevant knowledge-base answer for approval.
- Collect approved public sources into a dated research brief.
- Check a document against a defined checklist and list the failures.
Write the result as an observable deliverable, not a vague activity.
STARTING INPUT
[What the agent receives]
FINISHED RESULT
[The exact artifact or state it should produce]
SUCCESS CHECK
[How a person or test can verify the result]3. Write the agent contract
The contract gives the agent a job, inputs, rules, and a stopping point.
ROLE
You prepare [ONE RESULT] for [ONE USER OR TEAM].
ALLOWED INPUTS
Use only [APPROVED SOURCES, FILES, OR RECORDS].
PROCESS
1. Inspect the input.
2. Identify missing information.
3. Use only the allowed tools.
4. Produce the required format.
5. Run the success check.
BOUNDARIES
Do not send, publish, purchase, delete, or change external records.
Do not invent missing facts. Mark them as unknown.
STOP CONDITIONS
Stop when the result passes the success check, the input is insufficient,
a tool fails, or a person must approve the next action.
OUTPUT
Return [EXACT FORMAT], followed by uncertainties and the next human decision.4. Give it the smallest useful context
Context is everything the agent sees while deciding what to do. More context is not automatically better. Include what changes the decision and leave out unrelated history.
Build a context packet with:
- The current task and desired result.
- Approved source material.
- A small number of strong examples.
- Definitions, policies, and tone rules that affect the output.
- The latest confirmed state of the work.
- Known limitations and unresolved questions.
For longer tasks, save a short progress record after each meaningful step. It should state what was completed, what evidence was used, what remains, and what must not be repeated.
5. Map tools to permissions
Tools let an agent read information or take action. Give each tool one clear purpose and the least authority required.
| Tool type | Example | Safer first version |
|---|---|---|
| Read | Search an approved knowledge base | Read only, limited sources |
| Draft | Prepare an email or document | Save as draft, no sending |
| Update | Change a CRM record | Require human approval |
| External action | Send, publish, buy, or delete | Keep outside the first agent |
Tool names and descriptions should make the correct choice obvious. If two tools sound interchangeable to a person, the agent may confuse them too. Validate inputs in code or in the connected system. A prompt is not a security control.
6. Design the working loop
A useful agent loop is simple:
- Read the current state.
- Choose one allowed action.
- Use the tool.
- Inspect the real result returned by the tool.
- Update the progress record.
- Continue, stop, or request approval.
Set a maximum number of steps, a time or cost limit, and explicit stop conditions. The agent should never claim an external action succeeded without a successful tool response.
7. Test before real work
Create at least 5 test cases before expanding permissions:
| Test | What should happen |
|---|---|
| Normal input | Produces the required result |
| Missing input | Asks for or reports what is missing |
| Conflicting input | Preserves the conflict instead of guessing |
| Tool failure | Stops safely and reports the failed step |
| Forbidden request | Refuses the action and preserves the boundary |
Score each run on completion, factual support, format, boundary compliance, and recovery. Record the failure, change one part of the system, and rerun the same test. Anthropic's evaluation guidance emphasizes making agent failures visible before they reach users.
Worked example: a source brief agent
Input: one question and a list of approved public links.
Result: a dated brief with supported findings, direct sources, unknowns, and a review checklist.
Allowed tools: open the supplied links and write a draft file.
Not allowed: publish the brief, contact anyone, use remembered facts as evidence, or bypass inaccessible sources.
Success check: every central claim has a source, dates remain visible, inaccessible sources are listed, and the final brief ends at human review.
This is a stronger first agent than a broad "research anything" system because the input, tools, result, and review gate are all visible.
Your launch checklist
- [ ] One narrow job is defined.
- [ ] The finished result is observable.
- [ ] A simpler prompt or fixed workflow is not enough.
- [ ] The context packet contains only useful, approved material.
- [ ] Every tool has one clear purpose.
- [ ] Permissions are smaller than the possible task.
- [ ] Sending, publishing, purchasing, and deletion require human approval.
- [ ] Stop conditions and step limits are explicit.
- [ ] Five test cases pass or their failures are documented.
- [ ] A person owns the final decision.
Start with one read-and-draft agent. Expand its tools only after the same evaluation set continues to pass.
Official references
Reviewed on September 15, 2026:

