Skip to content
Shahid Malla

How Much Does It Cost to Build an AI Agent or AI Chatbot?

Build hours by cost driver, monthly token bills worked out with Anthropic and OpenAI prices read on 15 October 2026, the costs people forget, a quote checklist and when not to build.

· Published · 8 min read
On this page (10 sections)

My planning estimate for a custom AI chatbot is 35 to 70 hours of work, and about 80 to 170 hours for an AI agent with a few tools, at $55-$65 per hour or a fixed quote. Running it is a separate monthly bill, mostly model tokens: in my worked example, 3,000 support conversations cost $6.90 to $138 a month at prices dated 15 October 2026.

How much does it cost to build an AI agent or chatbot?

With me, roughly $1,925-$4,550 for a chatbot and $4,455-$10,920 for an agent with two lookups and one approved action. The hours are my planning estimates, broken down below.

BuildHours (my planning estimate)Build cost at $55-$65/hourExample token bill per month
Chatbot answering from your documents, with hand-off35-70$1,925-$4,550$6.90-$138 for 3,000 conversations
Agent with two read-only lookups and one action behind approval81-168$4,455-$10,920$5-$100 for 1,000 tasks

After a free scoping call of about 30 minutes I send a written fixed quote within one business day, as on how I work. The model provider bills tokens to your own account.

What goes into the build cost of an AI chatbot?

Mostly preparation and testing; connecting the model is a small share.

WorkPlanning estimate
Scoping and collecting 50-100 real customer questions3-6 hours
Cleaning, chunking and indexing your documents4-12 hours
Retrieval, system prompt, rules and hand-off triggers8-14 hours
Chat widget with streaming replies, rate limits and retries6-12 hours
Logging with masked personal data, spend caps and alerts4-8 hours
Running the question set, fixing causes, rerunning6-12 hours
Launch, first review of real conversations, handover notes4-6 hours

Document cleanup varies most: a tidy help center sits at the low end; PDFs, conflicting policies or a second language push it up. The steps are on the AI chatbot development page.

What adds hours when the chatbot becomes an AI agent?

Every tool the agent may call adds hours, and tools that change data add the most. AI chatbot vs AI agent explains the difference.

Cost driverAdds (planning estimate)What the hours pay for
Each read-only tool, such as "look up this customer's invoices"6-12 hours per toolA JSON schema, a credential limited to that action, value checks and tests
Each write tool behind approval, such as "open a ticket"12-24 hours per toolAn approval step, a one-time key so a retry cannot run it twice, a log entry, an undo path
Evaluation set from past tickets8-16 hours50-100 real cases with the correct outcome, rerun after every change
Hand-off into your helpdesk with a summary4-12 hoursDepends on the helpdesk API
Prompt injection and permission tests4-10 hoursTicket text that gives orders; requests for another customer's data
Draft-mode pilot on one category6-12 hoursReading drafts and fixing causes

Example: the chatbot base (35-70 hours), two read-only tools (12-24), one write tool behind approval (12-24), the evaluation set (8-16), helpdesk hand-off (4-12), injection tests (4-10) and a pilot (6-12) add up to 81-168 hours, or $4,455-$10,920. A prototype on one category comes first, so you see it work before the full build, as on the AI agent development page.

What does an AI agent or chatbot cost to run each month?

Mostly model tokens, billed per million tokens the model reads (input) and writes (output). Every call resends the instructions, retrieved passages and conversation so far; an agent also resends its tool definitions and tool results. Anthropic's pricing page prices tool use on all input tokens, including the tools parameter, plus a 286-token tool-use system prompt on Claude Sonnet 5.5. OpenAI's function calling guide says function definitions "are billed as input tokens", and its pricing page counts hidden reasoning tokens as output.

Model (list prices per million tokens, read 15 October 2026)InputCached inputOutput
Claude Sonnet 5.5 (Anthropic)$2.00$0.10$10.00
gpt-6.1-sol (OpenAI, short context)$2.00$0.10$10.00
Claude Haiku 5.5 (Anthropic, prompts up to 100,000 tokens)$0.10$0.01$0.50
gpt-6-luna (OpenAI, short context)$0.10$0.01$0.50

The two larger models shared list prices that day, as did the two smaller ones, which keeps the arithmetic simple. Equal prices are not equal answers; I choose by testing.

How do you work out the monthly token bill?

Multiply calls per month by tokens per call, divide by one million and multiply by the price, separately for input and output.

monthly cost = calls × input tokens ÷ 1,000,000 × input price + calls × output tokens ÷ 1,000,000 × output price

Example 1, a support chatbot. The volumes and token sizes are assumptions for illustration:

  • 3,000 conversations a month with 4 customer messages each: 12,000 model calls.
  • Input per call: 1,500 tokens of instructions, 2,000 of retrieved passages and 1,000 of conversation so far, 4,500 in all. 12,000 × 4,500 = 54 million input tokens.
  • Output per call: 250 tokens. 12,000 × 250 = 3 million output tokens.
  • At $2 and $10: 54 × $2 + 3 × $10 = $108 + $30 = $138 a month, about 4.6 cents per conversation.
  • At $0.10 and $0.50: 54 × $0.10 + 3 × $0.50 = $5.40 + $1.50 = $6.90 a month.

Input is $108 of the $138, so passage size matters more than reply length: cutting passages to 1,000 tokens saves 12 million tokens, $24 a month at $2.

Prompt caching cuts the cost of the repeated instructions. On Claude Sonnet 5.5 a cache entry lives 5 minutes by default, refreshed on each use, for prompts of 512 tokens or more. If each conversation writes it once ($2.50 per million) and reads it three times ($0.10), 3,000 writes and 9,000 reads of 1,500 tokens cost 4.5 million × $2.50 + 13.5 million × $0.10 = $11.25 + $1.35 = $12.60, against 18 million × $2 = $36 uncached. That saves $23.40 a month.

Example 2, a ticket agent, with the same caveat:

  • 1,000 tasks a month: read a new ticket, look up the customer's services and invoices, draft a reply for staff. At 5 model calls per task, 5,000 calls.
  • Input averages 8,000 tokens per call, because earlier tool results are sent again: 40 million tokens. Output: 400 tokens per call, 2 million.
  • At $2 and $10: 40 × $2 + 2 × $10 = $80 + $20 = $100 a month, 10 cents per task. At $0.10 and $0.50: $4 + $1 = $5.

Per request, the agent costs about twice a chatbot conversation, and a task that loops for 15 steps costs at least three times as much as a 5-step one. Measure rather than guess: Anthropic's free token counting endpoint estimates a request's input tokens before you send it, and the page warns that Claude 4.7 and later models produce about 30 percent more tokens for the same text than earlier ones.

What else is on the monthly bill besides tokens?

Embeddings and search are usually small, hosting depends on your setup, and at low volume upkeep hours often cost more than the model.

ItemFigure for example 1How it is worked out
Model tokens$6.90-$138The arithmetic above
EmbeddingsAbout 1 cent per full re-index400 articles × 1,500 tokens = 0.6 million tokens × $0.02 for OpenAI's text-embedding-3-small
Search index$0 extra in your own database, or $30 on OpenAI's hosted file search12,000 searches × $2.50 per 1,000 calls, plus $0.10 per GB a day after the first free GB
Web search, if used$10 per 1,000 searchesList price at both providers, plus result tokens
HostingYour host's priceA small backend, often beside your existing app
Upkeep$110-$390My planning estimate of 2-6 hours a month: reading logs, fixing documents, rerunning tests after a model change

How do you stop the running cost from surprising you?

Set limits in two places, your code and the provider's console.

  • A provider spend limit. Per Anthropic's rate limits page, you can set a monthly limit below your tier's cap on the Claude Console's Billing page. Once reached, requests fail, so the widget needs a fallback that shows how to reach a person.
  • Caps per conversation: messages, reply length and steps per agent task.
  • A rate limit per visitor and bot filtering, because scripts can run up a bill.
  • The small model for simple steps where the evaluation set shows it is good enough. The price gap above is 20 times.
  • Batch work that can wait, such as nightly summaries. Anthropic's Batch API is 50% off, and OpenAI listed half-price batch rates for both models above.
  • A weekly cost-per-conversation report during the pilot.

Is a ready-made chatbot cheaper than a custom build?

Usually, when your needs are the common ones: answers from a knowledge base, account lookups and a hand-off to staff. A subscription replaces the build hours. A custom build pays off when you need logic no product offers or tools specific to your systems. I founded MagizAI, a ready-made AI chatbot and live chat, so I gain either way, and on the scoping call I will say which one fits.

What should you prepare before asking for a quote?

These items turn a vague estimate into a fixed quote, from me or anyone else:

  • Conversations or tickets per month over the last three months.
  • Average messages per conversation.
  • The first three questions or tasks you want handled.
  • 50-100 real questions with the answers your staff gave.
  • Every system it must read or change, and whether each has an API.
  • The actions that need a person's yes.
  • A monthly spend limit you are comfortable with.
  • Provider and hosting accounts opened in your name.
  • The person who will read the logs and answer hand-offs.
  • From every quote: hours by driver, what is excluded, who pays for tokens and how much upkeep is planned.

When should you not build an AI agent or chatbot?

Do not build one when the money does more good elsewhere:

  • A dozen stable questions that a good FAQ page answers.
  • Thin or conflicting documentation; fix that first.
  • You cannot name the first three questions or tasks.
  • The plan needs unattended refunds, deletions or admin credentials.
  • Nobody will read the logs or pick up hand-offs.
  • Volume is so low that upkeep hours cost more than the staff time saved.

If you know your first questions, start with AI chatbot development. For tools that act in your systems, see AI agent development.

Last reviewed 15 October 2026. Disclosure: I sell AI agent and AI chatbot development, so I am not neutral, and I founded MagizAI, an AI chatbot product. I am not affiliated with Anthropic or OpenAI. Model and tool prices come from their official pricing pages as read on 15 October 2026; the hour ranges are my own planning estimates, not quotes.

Share this article

Shahid Malla

Written by

Shahid Malla

Freelance WHMCS developer and web designer with 13+ years of client work. CTO at ElySpace, freelance developer for Marmaids LLC, and founder of WHMCSPilot and MagizAI.

Got a project like this?

Tell me what you need and I will send a written quote within one business day.