How to build an AI agent for your business.
Not the toy-project tutorial. The production playbook: pick the right workflow, choose the stack, build in the right phases, ship an eval suite, and land the deployment so it survives Week 4. Written by an agency that has shipped dozens of production agents.
How do you build an AI agent for a business?
Building a production AI agent takes six phases: (1) pick a workflow narrow enough to fit on a whiteboard sentence, (2) document the "before" baseline and expected KPI, (3) choose the stack (Claude/GPT + framework + tool integrations), (4) build the four components (system prompt, knowledge base, tools, eval suite), (5) deploy with human-in-the-loop for weeks 1-4, and (6) expand scope only after two clean weeks of eval passes. Total time: 14-30 days with an experienced agency, 8-16 weeks in-house first time. Total cost: €2,500-€15,000 build plus €20-€500/month running. The technology is not the hard part; the deployment discipline is.
Christos Papadimitriou, theagency47 · Updated July 2026Phase 1. Pick the workflow before you pick the tech
The most common failure mode in a first agent build is starting with the tech stack ("we're going to use Claude") instead of the workflow. Skip that. Answer three questions first:
- Can you name the workflow in one whiteboard sentence? "Draft first-response emails for Tier-1 shipping questions, held for human review before send." If it takes a paragraph, the scope is too broad.
- Is the current time-cost measurable? "Our team spends 8 hours/week on this." If nobody knows the number, measure for one week before signing anything.
- Do you have 5 examples of correct output and 5 of incorrect output? This is the seed of your eval suite. If you cannot produce these, the workflow is not yet ready for an agent — you are ready for a documentation exercise first.
The workflows that most consistently break-even inside 60 days: inbound lead research briefs, invoice extraction and categorization, first-line support triage with routing, weekly reporting drafts, meeting-note structuring, contract first-pass review. See our industries pages for vertical-specific patterns.
Phase 2. Baseline the "before" number
Skip this and you have no ROI story at renewal — the deployment produces real savings but nobody can defend them at budget review. See our hours-saved-per-week post for the invisibility problem.
Minimum baseline capture, five minutes/week from the team lead:
- Task count per week (how many times does this workflow run)
- Average minutes per task (best estimate; ugly is fine)
- Total weekly hours (task count × avg minutes ÷ 60)
- Error/rework rate baseline (what fraction currently gets sent back)
Do this for two weeks. Now you have a defensible before-number and the target after-number is "measurable improvement, same method". This is the single cheapest insurance policy against a Month-6 defence-of-budget conversation you cannot win.
Phase 3. Choose the stack (2026 defaults)
The 2026 stack choice for a business-buyer AI agent has narrowed to three practical paths:
| Path | Best for | Cost profile | Time to ship |
|---|---|---|---|
| No-code (Zapier AI, n8n, Voiceflow) | Glue between SaaS tools, no custom logic | €0–€500 setup + €50–€500/mo | 1–3 days |
| Custom build (Claude / GPT + Agent SDK) | Business workflows with judgment, integrations, guardrails | €2,500–€15,000 build + €20–€500/mo | 14–30 days |
| Enterprise platform (Claude Enterprise, Vertex AI Agent Builder) | Multi-department, compliance, SLA-backed | €20,000+ build + €1K–€10K/mo | 60–120 days |
Our default for SMB deployments in 2026: Anthropic Claude Sonnet 5 with the Agent SDK, MCP for tool connections, and a purpose-built eval suite. Reliability, tool-use quality, and enterprise controls all currently favor Claude for production business work. See our framework comparison post for the trade-offs across LangGraph, CrewAI, and n8n.
Phase 4. Build the four components (not "the agent")
An agent is not a monolith. It is four separately-configurable components. Build them in this order:
System prompt
2-4 pages of instructions defining the agent's role, voice, boundaries, and decision rules. The single highest-leverage customization layer. Rewrite it 3-5 times during the build as edge cases surface.
Knowledge base
The documents the agent retrieves from at decision time. Structured, versioned, and editable by the team. Bad knowledge base = hallucinations, no matter how good the model. Most projects underinvest here.
Tool integrations
The APIs the agent can call — CRM, email, calendar, ticketing system, database. Each tool needs a clear function signature, error handling, and (critically) permission scoping.
Eval suite
20-40 test cases with known-correct outputs. Runs before every deploy and monthly after. Non-negotiable. See the 20-case template we use.
Skipping any of the four ships technical debt into production. The Knowledge Base and Eval Suite are the two most commonly under-invested; both compound the ROI over the agent's lifetime. If you're building yourself, budget 40% of build time on the KB + evals combined.
Phase 5. Deploy with human-in-the-loop for weeks 1–4
The temptation to ship autonomously in Week 1 is real and every experienced team has learned to resist it. The 4-stage deployment curve that produces the 62% high-stakes-trust rate among SMBs:
| Stage | Weeks | Human review | What ships |
|---|---|---|---|
| 1. Draft-only | 1–4 | 100% of outputs | Agent drafts, human sends |
| 2. Scaled review | 5–10 | 30–50% | Auto-send for boring cases, review for edge cases |
| 3. Guarded autonomy | 11–16 | 10–20% (sampled) | Full auto + escalation triggers |
| 4. High-stakes delegation | 16+ | 5% (spot check) | Autonomous with monthly eval |
Rushing the curve produces the failure mode where the team never trusts the agent and reviews everything defensively forever. Ship Week 4 gates before promoting to Stage 2.
Phase 6. Expand scope only after 2 clean weeks
The rule that separates the 80% of deployments that succeed from the 20% that fail (see why 20% fail): expand scope only after 2 consecutive weeks of clean eval passes plus zero escalations from the team using it.
When those conditions are met, add: one new sub-workflow, one new integration, or one new escalation rule. Never more than one change at a time. Re-run the eval suite. If it regresses, revert. This is boring engineering discipline, and it is why our clients' agents are still running 18 months in.
What to buy vs build yourself
Build yourself if…
- You have an engineer with LLM/agent build experience already
- The workflow is deeply proprietary and hard to describe
- You expect to build 5+ agents (learning curve amortizes)
- You can absorb a 3-month timeline for the first one
Buy from an agency if…
- This is your first agent (skip the learning tax)
- You need it running inside 30 days
- The workflow is not unique — vertical/function patterns exist
- You want the eval + adoption discipline that comes with delivery
For a deeper decision framework, see AI Agent vs AI Consultant and What Does an AI Agent Agency Do?.
Questions about building AI agents.
How long does it take to build an AI agent?
14–30 days end-to-end with an experienced agency. 8–16 weeks in-house for the first agent (the delta is deployment discipline, not code). Second and third in-house builds cut roughly in half.
Do I need to know how to code?
No-code tools (Zapier AI, n8n, Voiceflow) let you ship simple task agents in an afternoon. Production-grade agents with custom integrations and eval suites still require coding or agency partnership.
Which framework should I use?
For business workflows: Claude with the Agent SDK (our default). For multi-agent research: LangGraph or CrewAI. For SaaS-glue: n8n or Zapier. Pick by workflow shape, not framework hype.
What is the biggest first-time mistake?
Scoping the workflow too broadly. "Handle customer support" fails. "Draft first-response for Tier-1 shipping questions, human-reviewed" succeeds.
How much does it cost?
€2,500–€15,000 build + €20–€500/month running via an agency. €30,000–€150,000 year-one in-house. See our full cost breakdown.
How do I know if my workflow is a good candidate?
Green flags: runs weekly or daily, ≥4 hours/week per person, standard tools (Gmail/HubSpot/Notion), rules-based with occasional exceptions. Red flags: quarterly, judgment-heavy, custom formats. Book a discovery call if you want a second opinion.
Related resources
The 20-Test-Case Eval Playbook
The exact eval structure we ship with every agent — common cases, edge cases, adversarial.
How Much Does an AI Agent Cost?
Industry-wide 2026 pricing across SaaS, agency, in-house, and Big-4 consultancy paths.
How to Train an AI Agent
The 7-phase training methodology — what "training" actually means and the timeline per phase.
Why 20% of AI Agent Projects Fail
The four preventable failure modes — and the 30-minute pre-mortem that eliminates them.