> ## Content Index
> Fetch the complete content index at: https://www.doitwithfriday.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Build an AI Agent for One Business Task, Step by Step
- URL: https://www.doitwithfriday.com/blog/how-to-build-an-ai-agent/
- Published: 2026-11-15T07:36:08.000Z
- Updated: 2026-11-20T14:01:31.000Z
- Description: Six steps to build an AI agent for one business task: define the job, write the instructions, supply the context, connect tools, set guardrails and test it.
- Author: Kevin Anderson
- Tags: AI agents

The model is the easy part. Whether an agent holds up on real work depends on the brief it follows, the information it reads and the tools it is allowed to use.

Each step assumes one business task with a named owner. If you are not sure the task needs an agent, check first whether a fixed workflow would do the job.

[![](https://i.ytimg.com/vi/jozFNRwUItM/hqdefault.jpg)](https://www.youtube.com/shorts/jozFNRwUItM?ref=doitwithfriday.com)

## Step 1: Define one job and what done looks like

An agent with a vague job cannot be built, tested or trusted. Before any setup, write the job down, gather real examples of a finished result and decide on the smallest version worth building.

### Name the input, output and owner

Name the input, the output and who receives it in one sentence. For example: "Read each new support email, draft a reply from our help articles and leave it for the support lead to send." If the sentence needs an "and also", you have two jobs. Build the first one and keep the second for later.

Write down the owner too. Someone has to decide what a good result is, answer the agent's open questions during the build and approve each change to its instructions after launch.

### Collect examples of excellent output

Pull real finished work from the last few months: replies customers thanked you for, summaries your team liked, records filled in correctly. Anthropic's prompting guide calls examples one of the most reliable ways to steer output format, tone and structure, and its advice is to include 3–5 examples for best results.

The guide also asks for examples that mirror the real use case and cover edge cases. Pick a routine case, a messy one and one where the right answer is to ask for help. Those examples become the target for the instructions and, later, the first test cases.

### Start with the smallest version that works

In its guide to [building effective agents](https://www.anthropic.com/research/building-effective-agents?ref=doitwithfriday.com), Anthropic reports that the most successful implementations it saw were not using complex frameworks; they were "building with simple, composable patterns." A first version that drafts and never sends is a reasonable place to start.

## Step 2: Write instructions a new hire could follow

The instructions are the agent's job description. They work when they read like a brief for a capable person who joined this morning and knows nothing about your customers, rules or habits.

### What the instructions cover

Anthropic's prompting guide asks you to think of the model as "a brilliant but new employee who lacks context on your norms and workflows." A brief for that employee covers four things:

- **The role:** who the agent works for and what it is responsible for.
- **The steps:** the order of work, and where it may deviate.
- **The standard:** what a good result contains, with the examples from step 1.
- **The limits:** what it must never do, and when to stop and ask.

The same guide offers a test before you go further: show the instructions to a colleague with minimal context on the task and ask them to follow them. If the colleague would be confused, the model will be too.

### Explain the reason behind each rule

Anthropic's guide says that explaining why an instruction matters gives the model more information about your goals. Its example rewrites a bare formatting rule so that it names the reason, and the guide adds that Claude can generalize from the explanation.

![Two examples from Anthropic's prompting guide, side by side in a terminal window. Less effective: 'NEVER use ellipses'. More effective: 'Your response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them.' The opening clause naming the reason is highlighted and tagged 'the reason'.](https://storage.ghost.io/c/67/23/6723d566-f4a4-4c03-8b45-4f8f0948342b/content/images/2026/11/prompt-rule-with-reason.webp)

The same rule works better when it carries its reason, which lets the model apply it to cases the rule never named. Source: Anthropic, Claude prompting best practices, checked Nov 16, 2026.

A rule with its reason covers cases the rule never named. "Never promise a delivery date" stops one sentence. "Never promise a delivery date, because the warehouse sets dates after an order ships" also tells the agent not to guess a date when a customer asks in a different way.

### Make every line specific to your business

Lines such as "be helpful and accurate" give the agent nothing it can act on. Specific lines change behavior. For example: "Quote prices only from the current price list, and say so if a product is not on it."

Ask for steps as a numbered list when their order matters, as the guide suggests, and say what the finished output looks like: its length, its format and where it goes next. Keep the instructions in one document with a version number, because step 6 and every later change start from that file.

## Step 3: Supply the right context, and only that

Context is everything the agent reads while it works: product sheets, policies, past examples, the customer's record. The goal is what this job uses, kept current and small.

### Relevant beats complete

Give the agent what the task uses and leave out the rest. Every document in the prompt is billed as input tokens on every request, and Anthropic's model overview notes that actual latency depends on prompt length. A support agent needs the help articles and the return policy, and has no use for last year's board minutes.

### Keep each source current

Connect to the live source where possible, so the agent does not quote last year's prices from a copy pasted in months ago. Where a copy is unavoidable, record its date and who updates it, and put that file on the same review schedule as the instructions.

### When the documents outgrow the prompt

In a September 2024 article on contextual retrieval, written when Claude's context window was 200,000 tokens, Anthropic says a knowledge base below that size, about 500 pages of material, can go into the prompt whole. For larger sets it tested retrieval, which fetches only the passages that match each question, and found that adding context to each chunk, keyword matching and reranking cut the share of relevant passages missed in the top 20 results from 5.7% to 1.9%.

![Bar chart of Anthropic's contextual retrieval tests: the share of relevant passages missed in the top 20 results is 5.7% with standard retrieval, 3.7% with context added to each chunk, 2.9% with keyword matching added and 1.9% with reranking added. The 1.9% bar is highlighted.](https://storage.ghost.io/c/67/23/6723d566-f4a4-4c03-8b45-4f8f0948342b/content/images/2026/11/contextual-retrieval-failure-rate.webp)

In Anthropic's tests, each retrieval step added on top of the previous ones lowered the top-20 retrieval failure rate, the share of relevant passages not retrieved in the top 20 results, from 5.7% to 1.9%. Source: Anthropic, Introducing Contextual Retrieval (Sep 19, 2024), checked Nov 16, 2026.

Those results come from Anthropic's own test sets, so read them as evidence that the retrieval method matters, and expect your own numbers to differ. When a builder proposes retrieval, ask how they will measure missed passages on your documents, and add questions whose answers sit deep in a long file to your test set.

A larger context window does not remove the choice. Anthropic lists a 1M-token context window for each of its current models, roughly 555,000 words on its current tokenizer, and every token of it is still billed on each request that sends it.

### Package reusable methods as skills

Some context is a method, such as how your company formats a proposal or checks an invoice. Methods that several agents or people reuse can be packaged as skills and maintained in one place, so each set of instructions does not carry its own copy.

## Step 4: Connect only the tools the job needs

Tools let the agent act: search the CRM, read a file, create a draft. Each tool is also a new way to make a mistake, so add them one at a time, describe each one fully and keep their results small.

### Fewer, task-shaped tools

Anthropic's engineering article on writing tools for agents warns against tools that merely wrap existing software functionality or API endpoints. Its example is a single schedule\_event tool that finds availability and schedules an event, in place of separate tools for listing users, listing events and creating one.

The article also suggests namespacing tools by service, such as asana\_search and jira\_search, so the agent does not confuse two searches. Anthropic's appendix to its agent guide adds that tool definitions deserve as much prompt engineering attention as the overall prompt, and says that while building its agent for SWE-bench, a coding benchmark, it spent more time optimizing its tools than the overall prompt.

### Write the description the agent reads

Anthropic's [tool-use documentation](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools?ref=doitwithfriday.com) calls detailed descriptions by far the most important factor in tool performance and asks for at least 3–4 sentences per tool. Its own example sets a one-line description of a stock-price tool beside a five-sentence one that also says what the tool returns, when to use it and what it will not provide.

![Two versions of the same get_stock_price tool from Anthropic's documentation, in a terminal window. The poor one has the description 'Gets the stock price for a ticker.' The good one has five sentences covering valid tickers, the price returned in USD, when to use it and that it provides no other information; its last two sentences are highlighted.](https://storage.ghost.io/c/67/23/6723d566-f4a4-4c03-8b45-4f8f0948342b/content/images/2026/11/tool-description-poor-vs-good.webp)

A one-line description leaves the model guessing; the documented good version also says when to use the tool and what it will not return. Source: Anthropic, Claude Docs, Define tools, checked Nov 16, 2026.

The documentation lists what a description should explain: what the tool does, when it should be used and when it should not, what each parameter means, and its caveats or limits. A description that answers those four points for a CRM search or an invoice lookup gives the agent the same help.

### Results and errors the agent can use

What a tool returns is context too. The tools article recommends fields such as names and file types over low-level identifiers such as a uuid, and pagination, filtering or truncation for large results. It notes that Claude Code restricts tool responses to 25,000 tokens by default.

Errors need the same care. The article's advice is to prompt-engineer error responses so they communicate specific and actionable improvements. "No customer found; try searching by email" lets the agent recover, and a bare error code leaves it guessing.

### Standard connections through MCP

The Model Context Protocol (MCP) gives tools a shared format that different AI apps can read. In its tools specification, revision 2026-07-28, a tool has a name, a human-readable description and a JSON Schema for its inputs. The specification says there should always be a human in the loop with the ability to deny tool invocations, and that client apps should prompt for confirmation on sensitive operations and log tool use for audit purposes.

Build to that standard even if the first version has a single user. Our [MCP tools and integrations](https://www.doitwithfriday.com/services/mcp-tools/) page describes how we scope one connection with read and write permissions per action.

## Step 5: Add guardrails before anyone relies on it

Guardrails decide what happens when the agent is wrong, confused or misled. Set them before the first real user, because better instructions cannot undo a sent email or a payment.

### Access limits and approval steps

- Narrow permissions for every tool, using each user's own access where the system allows it.
- An approval step for anything that sends, pays, commits or deletes.
- A clear way to escalate: when unsure, the agent stops and asks.
- Logs of every run, read by the owner during the first weeks.

### A stopping condition

Anthropic's agent guide says that "it's also common to include stopping conditions (such as a maximum number of iterations) to maintain control." Set a limit on steps or tool calls per run, so a confused agent stops and reports instead of looping and running up usage.

### Tell the agent which actions need a person

Approval gates in the software come first. The instructions can back them up: Anthropic's prompting guide includes a sample prompt that asks the model to check with the user before actions that are hard to reverse, affect shared systems or could be destructive. Write the same list for your business, naming the actual actions, such as issuing a refund or emailing a customer.

## Step 6: Test on real cases, then launch small

Testing shows whether the instructions, context and tools work together on your real work. A small launch then shows whether they hold up when real people send requests nobody planned for.

### Run the examples and the awkward cases

Run the agent against the examples from step 1 plus the awkward cases: missing information, conflicting sources, a request outside its job. Fix the instructions where it fails, then rerun everything, since a fix for one case can break another. Anthropic's guide puts it plainly: the key to success is measuring performance and iterating.

### Launch to a single queue first

Give the first version to one person or one queue, compare its results with the old process and widen use only when the comparison holds. Keep the approval steps on during this stage, even for actions that later run on their own.

## No-code builder, platform feature or custom code

The same six steps apply whichever way you build. What changes is how much of your business the agent can reach, who controls the instructions and tools, and how much development time it takes.

### No-code agent builders

No-code builders are a quick start and suit a contained job inside one product. Their limits show up when the agent needs your own systems, custom approval steps or a test set you control.

### Agent features in tools you already pay for

Agent features inside your CRM or help desk see that tool's data well and little else. They fit jobs that start and end in one system, and they inherit that vendor's choices about permissions and logs.

### Custom code against a model API

Custom code gives full control over instructions, tools and logs, at the cost of development time. Anthropic suggests that developers start by using LLM APIs directly, and warns that frameworks can create extra layers of abstraction that obscure the underlying prompts and responses, making them harder to debug. If you use a framework, someone on the project should be able to show what it sends to the model.

## Plan for the agent after launch

An agent is never finished at launch. Prices, policies and tools change, and model providers release and retire versions, so each part built in steps 2 to 4 needs an owner and a schedule.

### Version the instructions and the context

Give every change to the instructions, tools or context sources a version number and a date. Set a schedule for reading a sample of the logs, and add every real failure to the test set as a new case.

### Watch the model's retirement date

Anthropic's model overview says every Claude model ID is a pinned snapshot, and it lists a retirement commitment for each current model: for Claude Opus 5.5, not sooner than September 22, 2027\. Record the model ID your agent uses and the date its provider gives, so the move to a newer model happens on your schedule.

### Rerun the tests on every change

Rerun the full test set whenever the instructions, tools, context sources or model change. That habit is what catches an update that quietly breaks a case the agent used to handle.

## FAQs About Building AI Agents

Short answers on coding, choosing a model and running more than one agent, for owners deciding whether to build a first agent themselves or with an outside builder.

### Do I need to code to build an agent?

Not always. No-code platforms can build simple agents inside one product. Agents that use your own systems, rules and data need development for connections, guardrails and testing.

### Which AI model should I use?

Start with a capable general model from a major provider and spend the effort on instructions, context and tools. Switch models only if your test set shows a clear gain, and rerun the whole set when you do.

### Should I build several agents at once?

No. Start with one agent and one job. Add more only when the work has distinct roles that one agent cannot handle cleanly, and give each new agent its own owner and test set.

## Build it with a partner

If you have the job and the examples, the rest is engineering: instructions, context, tools, guardrails and tests, built and checked in that order on your real work.

Our [AI agents and skills](https://www.doitwithfriday.com/services/agents-skills/) service follows these six steps, from the one-sentence job to a small launch with approvals on. [Send us the job in one sentence](https://www.doitwithfriday.com/contact/) and we will reply with what the first version would include.

Last checked: November 16, 2026, against Anthropic's guide to building effective agents, its engineering article on writing tools for agents, its contextual retrieval article (September 2024), its Claude 3.5 Sonnet announcement (June 2024), the Claude prompting best practices, define tools and models overview pages, and the MCP tools specification revision 2026-07-28\. Documentation changes; check the linked pages before relying on a detail.

Method and technical details come from Anthropic's published documentation and the MCP specification, checked November 16, 2026, and our own build process.