Guide · 6 Nov 2026

How to Build an AI Agent: From Prompt to Production

Six steps to build an AI agent, each tested on our phone assistant Emily: scope, knowledge base, tools, tests, launch and measurement.

Greg Ciupek 11 min read 4 sources Comment
Cover: how to build an AI agent in six steps, with the 85/100 pre-launch test score of our phone assistant Emily
Short answer · as of 4 Nov 2026
  • To build an AI agent, go through six steps: scope one job, write the knowledge base, add a few tools with clear exits, test, launch small and measure outcomes, not minutes.
  • My worked example is Emily, GAPLI's AI phone assistant. Before going live on 9 Oct 2026 she scored 85/100 in a pre-launch test, with a knowledge base of 189 FAQs and 239 passages from 49 pages.
  • After 305 calls (GAPLI database, 27 Oct 2026), the build choices showed up in the results: 63 of 136 inbound calls resolved (46%), but only 30 of 169 outbound calls reached a conversation (18%), and 45 went to voicemail.
  • Usage is the small part of the cost. On price pages checked on 4 Nov 2026, a phone minute with Claude Sonnet 5.5 tokens, ElevenLabs voice and Twilio US carriage comes to about $0.11, so a 50-call test set costs about $17. Your time costs far more.
Contents · 9 sections
  1. 01How to build an AI agent: what are the steps?
  2. 02How to build an AI agent step 1: how narrow should the scope be?
  3. 03How to build an AI agent's knowledge base?
  4. 04How to build an AI agent's tools and guardrails?
  5. 05How to test an AI agent before launch?
  6. 06How to launch and measure an AI agent?
  7. 07How much does it cost and how long does it take to build an AI agent?
  8. 08Frequently asked questions
  9. 09Sources

This guide is for a store owner or small company that wants an AI agent answering customers, not a demo. Each step has what I did for one real agent, the number it produced and what I would change.

Emily works for GAPLI, my dropshipping platform, and runs on Telofia, also my company, so read the disclosures and weigh my opinion of both accordingly. I also say where each of them is the wrong tool for you.

How to build an AI agent: what are the steps?

Building an AI agent takes six steps: define one job and its exits, write a knowledge base from real questions, connect a small set of tools, test with scored calls, launch to a limited audience and measure outcomes. Emily went through all six and reached 305 calls between 9 and 27 Oct 2026.

Numbers: GAPLI database (read 27 Oct 2026, 13 of my own test calls excluded) and Telofia's pre-launch report (9 Oct 2026).

Six build steps with Emily's result at each one, GAPLI database read 27 Oct 2026 and Telofia test of 9 Oct 2026
StepWhat Emily gotNumberWhat it told me
1. Scope4 goal-based conversations, a 12-step operator journey, calls on day 0, 3, 7 and 144 goalsInbound scope was right; outbound scope was too wide
2. Knowledge baseFAQs and longer passages written from the platform's pages189 + 239 from 49 pagesEnough to resolve almost half of inbound calls
3. Tools and exitsOpen a ticket, hand over to a human, request a callback, stop calling10 tickets inbound10 inbound calls ended in a ticket or handover
4. TestPre-launch test before the first real call85/100Good enough to launch, not good enough to stop testing
5. LaunchPhone, browser and Telegram, live 9 Oct 2026305 callsInbound and outbound behave like two different products
6. MeasureOutcomes per call, per lead and per onboarding step46% vs 18%The phone works for questions, not yet for activation

Not sure you need an agent rather than a workflow? What is an AI agent? draws that line.

How to build an AI agent step 1: how narrow should the scope be?

Scope an AI agent as one job with a named goal, a list of allowed actions and a written exit for everything else; Emily's inbound job, answering questions about GAPLI, resolved 46% of 136 calls by 27 Oct 2026, while her wider outbound job, moving operators through onboarding, reached only 18% of 169 calls.

A scope that works fits on one card. Inbound, mine was: answer questions, open a ticket when a fix is needed, hand over when a person must decide. Outbound was an announcement SMS, calls on day 0, 3, 7 and 14, four goal-based conversations and a 12-step operator journey. That is a lot of agent for a channel where most people do not pick up.

  1. Write the goal as an outcome. "Caller gets a correct answer or a ticket number" can be counted.
  2. List what the agent may do. Each item becomes a tool in step 3.
  3. List what it must never say. Unconfirmed prices, refunds, legal or tax answers.
  4. Write the stop rules. Emily closes an onboarding lead after 3 unanswered calls in a row (30 leads closed that way) and stops at once on "do not call" (1 case).

How to build an AI agent's knowledge base?

Build the knowledge base from the questions customers really ask and the pages you already publish, in two forms: short FAQ pairs for exact questions and longer passages for everything else. Emily's base had 189 FAQs and 239 passages drawn from 49 pages when she went live on 9 Oct 2026.

A FAQ pair is what the agent should say almost word for word; a passage is background it can draw on when no FAQ matches. On 49 source pages that came to roughly four FAQs and five passages per page.

  1. Collect the real questions first. Emails, chat logs and call notes, not your marketing copy.
  2. Write for people who are not customers yet. 63 of Emily's 136 inbound calls came from people without a GAPLI account.
  3. Date every answer. A stale shipping time does more damage than "I will open a ticket".
Watch out: "completed" is not "resolved"

70 of Emily's 136 inbound calls ended normally but without the "resolved" status. That is where the knowledge base is thin: read those transcripts first after launch.

How to build an AI agent's tools and guardrails?

Give an AI agent the fewest tools that cover its job, each with a clear name and a result it can report back; Emily needed four: open a ticket, hand over to a human, schedule a callback and stop calling. Between 9 and 27 Oct 2026 she opened 9 tickets and made 1 handover on inbound calls.

A tool is a function the model can call, such as "create_ticket". The model decides when; your code does the work. That split is the guardrail: the agent can only do what your code allows.

  • Exits before features. Ticket and handover stop a bad call from getting worse; build them first.
  • Every tool costs tokens. Anthropic's pricing page (checked 4 Nov 2026) says tool names, descriptions and schemas are counted as input tokens on every request, and tool use adds its own system prompt, so unused tools cost money on every turn.
  • Log every tool call. Emily's 15 callback requests are countable only because each wrote a record.

The Model Context Protocol is one standard way to connect tools in other software; it gets its own article. For outbound calls in the US and UK, check the TCPA and PECR consent rules before the first dial; the summary is in AI agent examples from my companies.

How to test an AI agent before launch?

Test an AI agent with a fixed set of scripted calls, scored against the answers you expect, before any customer hears it; Emily scored 85/100 in Telofia's pre-launch test on 9 Oct 2026, and the 13 test calls I made myself are excluded from every result in this article so they do not flatter it.

A test set is a list of questions with the expected answer and action. Keep it the same between runs, so you can see whether a change helped.

  1. Take 30 to 50 real questions. Include awkward ones: angry caller, out of scope, a request for a person.
  2. Write the expected outcome. The fact it must state and the tool it must or must not call.
  3. Score pass or fail. A wrong price fails even if the call sounded friendly.
  4. Set the launch bar in advance, before you see the score.
Our numbers

What a test run costs in usage, on prices checked 4 Nov 2026: Claude Sonnet 5.5 at $2 per million input and $10 per million output tokens, ElevenLabs Speech Engine at $0.08 a minute and Twilio US inbound carriage at $0.0085 a minute. With my assumed 3 minutes per call and 10,000 input and 400 output tokens per minute, a minute costs $0.024 + $0.08 + $0.0085 = about $0.11. My 13 test calls come to 39 minutes, about $4.39; a 50-call test set is 150 minutes, about $16.88. These are my arithmetic on public prices, not Telofia's invoice.

To grade transcripts with a model, Anthropic's Batch API charges 50% of the standard token price (checked 4 Nov 2026).

How to launch and measure an AI agent?

Launch an AI agent to a limited audience and measure outcomes per call, not minutes or calls handled: after 19 days live (9–27 Oct 2026) Emily resolved 63 of 136 inbound calls, but operators she talked to completed the next onboarding step at almost the same rate as those she never reached.

46%inbound calls resolved (63 of 136)
56%outbound calls unanswered (94 of 169)
2 of 24operators who talked moved a step
2 of 28operators never reached moved a step

The last two tiles are the most useful result of the build. Of 52 onboarding leads, 24 talked with Emily and 28 never did; two in each group completed a step before the next call. Talking did not move people in 19 days, and no sales are attributed to the calls.

Where Emily's 169 outbound calls ended, GAPLI database read 27 Oct 2026 (my percentages)
OutcomeCallsShare
Not answered9456%
Voicemail4527%
Conversation3018%
  1. Launch to one channel or group first. The first week finds what no test predicted.
  2. Define outcomes before launch as statuses the agent sets, not labels guessed afterwards.
  3. Keep an untouched group. Without the 28, her 2 of 24 would have looked like progress.

How much does it cost and how long does it take to build an AI agent?

An AI agent's usage costs cents per minute, about $0.11 a phone minute on prices checked 4 Nov 2026 with Claude Sonnet 5.5, ElevenLabs voice and Twilio US carriage, while the real cost is the hours spent on scope, knowledge base and tests. Emily went from pre-launch test to her first 305 calls in 19 days.

Building blocks for a phone agent, official pricing pages checked 4 Nov 2026
BlockItem as listedPrice
Language modelClaude Haiku 5.5, input / output per million tokens (prompts up to 100,000 tokens)$0.10 / $0.50
Language modelClaude Sonnet 5.5, input / output per million tokens$2 / $10
Voice layerElevenLabs Speech Engine agents, per minute$0.08
Phone carriageTwilio, receive on a local US number / call a US local number, per minute$0.0085 / $0.0140
Phone numberTwilio, local US number, per month$1.15

The full cost breakdown on Emily's call log, with a calculator, is in How much does an AI agent cost? Twilio's page says its prices are current as of August 2026; check every page again on the day you budget.

On time: I did not log the hours behind Emily's scope and knowledge base, so I give no figure. What I can date: test and launch on 9 Oct 2026, and 19 days of live calls were enough to see that inbound works and outbound does not yet.

When Telofia and GAPLI are not the best choice: with a developer, the raw APIs in the table are open to anyone; for written answers, a help page costs nothing per minute; to sell or activate by phone, my 2 of 24 says wait. To try a ready inbound assistant, Emily is built on Telofia, and the store platform she answers questions about is GAPLI. More guides are in the AI & automation topic.

Frequently asked questions

How do I build an AI agent with no coding?

Use a platform that joins a model, a voice layer and a phone line, and do the scope, knowledge base, test set and measurement yourself. For Emily they produced 85/100 before launch and 46% of inbound calls resolved.

How long does it take to build an AI agent?

I did not log Emily's build hours, so I give no figure. She was tested and launched on 9 Oct 2026, and 19 days of calls were enough to judge inbound against outbound.

What should an AI agent's knowledge base contain?

Short FAQ pairs for questions people ask often and longer passages for background, both written from real customer questions and dated. Emily started with 189 FAQs and 239 passages from 49 pages. Include pre-sales questions: 63 of her 136 inbound callers had no account yet.

How do you test an AI agent before going live?

Write 30 to 50 real questions with the expected fact and action, score pass or fail and repeat after every change. Keep your own test calls out of the live numbers, as I did with 13.

What is the best first AI agent for a small business?

An inbound assistant that answers repeat questions and opens a ticket for everything else. In my data inbound resolved 46% of calls, while outbound reached a conversation in 18% and did not change onboarding progress (2 of 24 against 2 of 28).

Sources

  1. GAPLI database, Emily call records 9–27 Oct 2026, 13 owner test calls excluded (read 27 Oct 2026); Telofia pre-launch test report (9 Oct 2026).
  2. Anthropic, Pricing: model pricing, batch processing and tool use pricing (checked 4 Nov 2026): platform.claude.com
  3. ElevenLabs, API pricing, Speech Engine agents (checked 4 Nov 2026): elevenlabs.io
  4. Twilio, Programmable Voice pricing in the United States, "current as of August 2026" (checked 4 Nov 2026): twilio.com

As of 4 Nov 2026. Emily's call, lead and onboarding figures are from the GAPLI database as read on 27 Oct 2026; the knowledge base size and the 85/100 score are from Telofia's pre-launch test of 9 Oct 2026. The Anthropic, ElevenLabs and Twilio pricing pages were read on 4 Nov 2026. Call length and tokens per minute in the test-cost example are my assumptions, and every dollar figure is my arithmetic on public prices, not an invoice. Percentages are mine, rounded to whole numbers. I will update this guide with Emily's first full month.

Read next

Discussion

Comments and questions

Got a question about this piece, or numbers of your own to share? Write it here. I answer in the comments, and the answer stays here for the next reader.

    No comments yet. Have a question or your own experience to share? Go first: your question will help other readers too.

    Add a comment

    No referral links. We don't publish referral codes or affiliate links. Comments with them wait for a moderator, and the link gets removed. Discussion rules

    Why?

    Under posts about affiliate marketing, everyone would like to drop their own link, and real questions would drown in ads. We also don't want to pick whose link is "better". On top of that, the terms of many partner programs and affiliate networks forbid posting links in other people's comment sections. Break that rule and a network can close your account, commissions included.

    Report a comment

    Reason

    Free Starter Kit · PDF

    Avoid online income scams. Build something boring and legal.

    Free · the kit now, 6 short e-mails over 11 days, then weekly · one-click unsubscribe

    What are you interested in?

    You confirm with a link in your inbox, the kit comes straight after. Then The Empire Report once a week; unsubscribe with one click.