Back

Cost to Build an AI Agent: The Build and the Monthly Bill in 2026

November 23, 2026/Sudeep, Wingflows/13 min read
Cost to Build an AI Agent: The Build and the Monthly Bill
Summarize with:
Share:

The cost to build an AI agent for a small business runs from a $120-a-month no-code subscription plus your own setup time to weeks of developer work, where a US developer’s median salary alone works out to about $65 an hour. Running it is a separate monthly bill: in our calculation, a support agent answering 1,000 chats a month uses $1.80 to $144 of model tokens, and the platform it runs on usually costs more than the model.

This guide is for owners and ops leads who want a number they can check before they sign a quote. Every price comes from the vendor’s own pricing page, checked on 23 November 2026, and every calculation is ours and shown in full so you can swap in your volumes. We build agents and automations on n8n, which we also self-host for our own work, so the n8n parts come from running it day to day.

Key takeaways

  • The build is a one-off: your time on a no-code builder, workflow hours in n8n, or developer hours for custom code. Master of Code’s guide quotes $15K to $350K for the build, figures that fit larger companies more than a five-person business.
  • Model prices ran from $0.10 per million input tokens (Claude Haiku 5.5) to $8 (gpt-6.2-astra and Claude Fable 5.2) as of November 2026.
  • At 1,000 chats a month the platform is most of the bill. At 100,000 chats the model choice decides it: $180 on Haiku 5.5 against $3,600 on Sonnet 5.5.
  • Caching the fixed instructions cut our example bill by 38 to 42%. Billing caps (n8n executions, Chatbase credits) jump in steps, so check them at your real volume.

The two bills behind the cost to build an AI agent

An AI agent takes a request (a customer chat, an email, a form), passes it to a language model, and then acts on the answer: it searches your documents, checks an order, books a slot or hands the case to a person. A chatbot only answers. The acting part is where build hours go.

You pay once to build it and every month to run it. A quote with one number hides one of the two. Before you compare routes, write down three inputs, because every figure in this guide depends on them:

  1. The job in one sentence (“answer delivery and returns questions from our help pages, hand anything else to Sam”).
  2. Monthly volume: chats, emails or tickets.
  3. What it must connect to: help pages, shop, CRM, calendar.

Volume is the one owners most often leave blank, and it is the one that moves the monthly bill by a factor of 100.

Build cost: no-code builder vs n8n vs custom code

Each route moves cost between a subscription, your time and a developer’s time.

Comparison of three ways to build an AI agent: a no-code builder such as Chatbase Basic at $120 a month billed yearly with 4,000 message credits, an n8n workflow at €20 to €50 a month billed yearly plus model tokens with 2,500 or 10,000 executions, and custom code on a €5.99 Hetzner CX23 server where developer hours at about $65 an hour are the main cost.
Route Up front Monthly Fits when
No-code agent builder Your setup time Subscription with message credits (Chatbase from $120/mo billed yearly) One website chat agent answering from your pages
n8n workflow Workflow-building hours n8n plan (€20 or €50/mo billed yearly) + model tokens The agent must act in your CRM, email, sheets or booking tool
Custom code Developer hours Server + model tokens + database and monitoring Your own interface, unusual data, strict control over data flow

Sources: Chatbase pricing, n8n pricing, checked 23 November 2026.

No-code AI agent builders

You upload documents or point the tool at your website and get a chat widget. Model cost is bundled into credits. Chatbase Basic is $120 a month billed yearly ($150 monthly) with 4,000 message credits and one agent; Business is $400 billed yearly with 15,000 credits. Extra credits cost $40 per 1,000, and an extra agent is $25 a month. Its pricing page does not say how many credits one message uses on each model, so test that during the 7-day trial.

The build is your own time. The limit shows later, when you want the agent to update a CRM record or follow your own hand-off rules and the platform has no integration for it.

n8n-based agents

n8n’s AI Agent node is included from the Starter plan. Starter costs €20 a month billed yearly for 2,500 executions, Pro €50 for 10,000, and Business €667 for 40,000 (self-hosted only). You add a model provider and pay its token prices on top. The free Community Edition runs without a licence key on your own server, with no execution cap in its documentation, but you lose features such as projects, SSO and Git version control (n8n docs).

Count executions before you pick a plan. If each customer message starts one workflow run, 1,000 four-message chats is 4,000 executions: over Starter, inside Pro. Our n8n pricing guide explains how runs are counted, and n8n vs Make vs Zapier compares the tools themselves. If you want someone to build it, see our n8n automation agency page.

Custom code

A custom agent is an application, for example Python with Django, that calls a model API directly. You control the interface, data flow and hand-off rules, and you pay for every hour of that control.

The US Bureau of Labor Statistics puts the median software developer wage at $135,980 a year (BLS, May 2025). Divided by 2,080 hours, that is $65.38 an hour in salary (our calculation), so every 100 hours on a quote costs someone at least $6,538 before employer costs and margin. Freelancers and agencies price differently; use the figure as a floor to sanity-check hour counts. Our Django developer page shows how we scope that kind of build.

For scale, Master of Code’s November 2026 guide puts most agent builds at $15K to $350K, with a proof of concept at $15K to $40K (Master of Code). Those ranges assume custom builds with discovery, integrations and evaluation phases. A single-purpose support agent on n8n or a no-code builder sits well below them.

Our own price for a build depends on what the agent has to connect to, so we quote after a short call: tell us what it should do.

Running cost: model prices per million tokens

Models charge per token (roughly a short word or part of one), with separate prices for what you send (input) and what comes back (output). Standard API prices as of November 2026, per million tokens:

Model Input Output Cached
Claude Haiku 5.5 (prompts up to 100k tokens) $0.10 $0.50 $0.01
Gemini 3.1 Flash-Lite $0.25 $1.50 $0.025
gpt-5.4-mini $0.75 $4.50 $0.075
Gemini 3.5 Flash $1.50 $9.00 $0.15
gpt-6.2-sol $2.00 $10.00 $0.10
Claude Sonnet 5.5 $2.00 $10.00 $0.10
Gemini 3.1 Pro Preview (prompts up to 200k tokens) $2.00 $12.00 $0.20
Claude Opus 5.5 $4.00 $20.00 $0.20
gpt-6.2-astra $8.00 $40.00 $0.40
Claude Fable 5.2 $8.00 $40.00 $0.20

Sources: OpenAI API pricing, OpenAI gpt-5.4-mini, Anthropic Claude pricing, Gemini API pricing, checked 23 November 2026. Anthropic’s cached figure is its cache-hit rate; writing to the cache costs 1.25 times input (5-minute cache) or 2 times (1-hour cache). Google also charges cache storage per hour.

Output costs 5 to 6 times input on every model above, so a chatty agent costs more than a terse one. We left out gpt-5.4-nano ($0.20 in, $1.25 out): OpenAI’s model page now labels it Deprecated, and a new build should not start on a model with a short runway.

Web search is a separate fee: OpenAI and Anthropic both charge $10 per 1,000 searches plus the search-result tokens. Google includes 5,000 grounded prompts a month across Gemini 3 models, then charges $14 per 1,000 queries.

Worked example: a support agent answering 1,000 chats a month

Our assumptions: four customer messages per chat, one model call per message, 3,000 input tokens per call (instructions, the relevant help-page extracts and the chat so far) and 300 output tokens back.

Worked calculation: 4 messages per chat times 3,000 input and 300 output tokens per call equals 12,000 input and 1,200 output tokens per chat. For 1,000 chats on Claude Sonnet 5.5: 12M input at $2 per million is $24 plus 1.2M output at $10 is $12, total $36 a month or $0.036 per chat. On Claude Haiku 5.5: $1.20 plus $0.60, total $1.80 a month or $0.0018 per chat.

That gives 12 million input and 1.2 million output tokens for 1,000 chats. Multiply by each model’s prices:

Bar chart of monthly model cost for 1,000 support chats at list prices: Claude Haiku 5.5 $1.80, Gemini 3.1 Flash-Lite $4.80, gpt-5.4-mini $14.40, Gemini 3.5 Flash $28.80, Claude Sonnet 5.5 $36, gpt-6.2-sol $36, Gemini 3.1 Pro Preview $38.40, Claude Opus 5.5 $72, gpt-6.2-astra $144.
Model 1,000 chats 10,000 chats 100,000 chats
Claude Haiku 5.5 $1.80 $18 $180
Gemini 3.1 Flash-Lite $4.80 $48 $480
gpt-5.4-mini $14.40 $144 $1,440
Gemini 3.5 Flash $28.80 $288 $2,880
Claude Sonnet 5.5 or gpt-6.2-sol $36 $360 $3,600
Gemini 3.1 Pro Preview $38.40 $384 $3,840
Claude Opus 5.5 $72 $720 $7,200
gpt-6.2-astra or Claude Fable 5.2 $144 $1,440 $14,400

Our calculation, list prices as of November 2026: (12 × input price) + (1.2 × output price) per 1,000 chats, no caching or batch discount.

What changes at 10,000 and 100,000 chats

Token cost scales in a straight line. Plan limits move in steps, and that is the part owners miss when they budget from a pilot.

Table of monthly model cost at 1,000, 10,000 and 100,000 chats: Claude Haiku 5.5 $1.80, $18, $180; gpt-5.4-mini $14.40, $144, $1,440; Claude Sonnet 5.5 $36, $360, $3,600; Claude Opus 5.5 $72, $720, $7,200. A row below shows n8n executions at one per message: 4,000 fits Pro at €50 a month, 40,000 is over Pro and needs Business at €667 a month self-hosted, 400,000 points to the free self-hosted Community Edition.

At 10,000 four-message chats, the agent triggers 40,000 n8n executions. That is four times Pro’s 10,000, and the next plan up costs €667 a month, which is more than the Sonnet 5.5 token bill at the same volume. On a no-code builder the same thing happens with credits: if one message used one Chatbase credit, 40,000 messages would mean Business (15,000 credits) plus 25,000 extra credits at $40 per 1,000, about $1,400 a month (our calculation; Chatbase does not publish credits per message).

The cheaper route at that volume is a self-hosted n8n Community Edition on a small server, which is how we run n8n for our own work; executions are not counted there. You trade the plan fee for server upkeep: updates and backups, plus someone who notices when it stops.

Caching and batch: the two discounts that matter

The instructions part of every prompt is identical from call to call. Caching bills that repeated part at the cached rate, which is a tenth of input on Haiku 5.5 and gpt-5.4-mini and a twentieth on Sonnet 5.5 and Opus 5.5.

Comparison for 1,000 chats at list price, with caching, and as a batch job: Claude Haiku 5.5 $1.80, $1.08 with caching (minus 40%), $0.90 batch (minus 50%); gpt-5.4-mini $14.40, $9.00 with caching (minus 38%), batch not calculated; Claude Sonnet 5.5 $36.00, $20.80 with caching (minus 42%), $18.00 batch (minus 50%). Notes say batch suits overnight work, not live chat, and Claude cache writes cost 1.25 or 2 times input.

With 2,000 of each call’s 3,000 input tokens cached, our 1,000-chat bill drops from $1.80 to $1.08 on Haiku 5.5, from $14.40 to $9.00 on gpt-5.4-mini, and from $36 to $20.80 on Sonnet 5.5 (cache-write cost left out). A low-traffic agent loses part of that saving, because the cache expires between chats and you pay the write premium again.

Anthropic’s Batch API halves input and output prices for jobs that can wait, and Google’s Batch API is also 50% off. That suits overnight email triage or ticket tagging. A customer in a live chat will not wait for a batch job.

The full monthly bill, line by line

At 1,000 chats the plan or server costs more than the model tokens on all three setups below.

Monthly bill for 1,000 four-message support chats on three setups. Chatbase Basic: $120 billed yearly with 4,000 credits, model and hosting included, valid only if one message uses one credit. n8n Cloud Pro plus Claude Haiku 5.5: €50 plan, $1.80 tokens, Pinecone Starter $0, Langfuse Hobby $0, total €50 plus $1.80, Langfuse Core adds $29. Self-hosted n8n Community Edition plus Haiku 5.5: €0 licence, €5.99 Hetzner CX23 server, $1.80 tokens, total €5.99 plus $1.80 plus your time.

The other lines, with their November 2026 prices:

  • Hosting. Included in no-code and n8n Cloud plans. For self-hosting, Hetzner lists its CX23 server (2 vCPU, 4 GB RAM, 40 GB disk) at €5.99 a month excluding VAT, though it showed as unavailable when we checked (Hetzner).
  • Document search. Embedding is cheap: OpenAI’s text-embedding-3-small costs $0.02 per million tokens (OpenAI), so a 500-page handbook at about 500 tokens a page is half a cent. Storage is where a bill appears. Pinecone’s free Starter tier covers 2 GB, 2M write units and 1M read units a month; Standard has a $50 monthly minimum (Pinecone). OpenAI file search gives 1 GB free, then $0.10 per GB per day plus $2.50 per 1,000 tool calls. In our example that is 4,000 searches, or $10 a month, more than the whole Haiku token bill.
  • Monitoring. You need to see what the agent said and what each chat cost. Langfuse Hobby is free for 50k units a month with 30 days of data; Core is $29 for 100k units and 90 days (Langfuse).
Diagram of a small-business AI agent with the billing unit of each part: customer message (free) goes to an orchestrator, n8n or a Python app (per execution or per server-month), which calls the model API (per million tokens in and out). An agent loop sends each tool call back to the model (more calls, more tokens) and reaches retrieval (per GB stored plus per search) and tools such as CRM, calendar and web search ($10 per 1,000 web searches). Below: hand-off to a person (staff time), monitoring such as Langfuse (per unit, Hobby 50k free) and upkeep (staff or developer hours). Customer support lead wearing a headset, reading a support ticket on his laptop in an open-plan office, with colleagues on calls in the background

Hidden costs after launch

Most quotes stop at go-live. Six costs arrive after it.

Six costs that show up after launch: model retirement (Claude Sonnet 4 and Opus 4 retired 15 June 2026, Opus 4.1 retired 5 August 2026, Sonnet 4.5 retires 30 November 2026, gpt-5.4-nano marked Deprecated); the 100k prompt cliff on Claude Haiku 5.5 ($0.0099 for a 99,000-token prompt vs $0.0505 for 101,000 tokens); agent loops (8 calls use twice the tokens of 4 or more); search fees ($10 per 1,000 on OpenAI and Anthropic, $14 per 1,000 on Google after 5,000 free, $2.50 per 1,000 OpenAI file search calls); cache writes at 1.25 or 2 times input; plan ceilings from n8n Pro 10K to Business 40K, €50 to €667 a month.

Model retirement. Anthropic gives at least 60 days’ notice before retiring a model. It retired Claude Sonnet 4 and Opus 4 on 15 June 2026 and Opus 4.1 on 5 August, and Sonnet 4.5 goes on 30 November 2026 (Anthropic model deprecations). Each switch means rerunning your test questions and fixing answers that changed. Master of Code budgets 15 to 20% of the build cost a year for maintenance; for a small agent we would track hours instead.

The 100k prompt cliff. Haiku 5.5 charges $0.50 per million input tokens instead of $0.10 once a prompt passes 100,000 tokens, on the whole prompt, cache reads included. A 99,000-token prompt costs $0.0099; a 101,000-token prompt costs $0.0505 (our calculation). Pasting a full handbook into every call is how agents cross that line. Retrieving the two or three relevant passages keeps calls near 3,000 tokens.

Agent loops. Every tool call sends the conversation back to the model. An agent that checks the order, then the returns policy, then the calendar pays for the chat history three extra times, so eight calls per chat cost at least twice the tokens of four.

Recurring jobs to budget for, whoever does them:

  1. Update the source content when prices, policies or opening hours change.
  2. Read a sample of conversations each month and fix the instructions where answers went wrong.
  3. Check cost per conversation in your monitoring tool after any model or prompt change.
  4. Switch models before a retirement date, then rerun your test questions.

Chatbot or agent: where the cost jumps

A chatbot that answers from your content is the cheap end: a no-code subscription, or a small model plus hosting. It becomes an agent when it acts in other systems, such as creating a ticket, checking an order or booking a slot. Each action is integration work (build hours) and another model round trip (running cost). If you are deciding whether to buy a platform or build your own, our build vs buy software guide walks through that choice, and business process automation covers the workflow side.

A test to run before you pay for any build

Take 50 real customer questions from your inbox. Run them through two cheap models (Haiku 5.5 and Gemini 3.1 Flash-Lite, for example) and one mid-priced model, with your help pages pasted in. Count how many answers you would send unedited. Pick the cheapest model that passes, budget for the mid-priced one in case questions get harder, and multiply your real monthly volume through the table above. That gives you a running-cost figure to hold every quote against.

If the job needs actions in other tools, our AI integration service and the wider custom software and AI page show the kinds of agents we build.

Frequently asked questions

How much does it cost to build an AI agent?

From your own setup time plus a $120-a-month no-code subscription, up to custom builds that Master of Code puts at $15K to $350K. Running costs come on top: in our example of 1,000 support chats a month, model tokens alone cost $1.80 to $144 depending on the model.

How much does an AI agent cost per month?

Add the platform or server (Chatbase from $120 billed yearly, n8n from €20, or a €5.99 server for self-hosting), model tokens at your volume, search or vector storage fees, and monitoring. Under about 10,000 chats a month, the platform is usually the biggest line.

How much does it cost to maintain an AI agent?

Expect recurring hours for content updates, monthly conversation reviews and model switches. Model retirement alone forces work: Claude Sonnet 4.5 retires on 30 November 2026, about two months after Anthropic deprecated it.

Is an AI agent more expensive than a chatbot?

Yes, on both bills. Each action it takes in another system is integration work to build, and each tool call adds a model round trip, so eight calls per chat cost at least twice the tokens of four.

What are the hidden costs of an AI agent?

Model retirements, prompt-size price tiers (Haiku 5.5 charges five times more per token above 100,000-token prompts), web search at $10 to $14 per 1,000, cache-write premiums, and plan caps such as n8n’s jump from 10,000 to 40,000 executions.

Can an AI agent be free?

Not fully. n8n’s Community Edition is free to self-host and Pinecone Starter and Langfuse Hobby have free tiers, but you still pay for the server (Hetzner lists CX23 at €5.99 a month excluding VAT, shown as unavailable on 23 November 2026) and for model tokens: $1.80 a month on Claude Haiku 5.5 in our 1,000-chat example.

How long does it take to build an AI agent?

It depends mostly on integrations: an agent that only answers from your pages is far quicker than one that writes to a CRM and books appointments.

Which AI model is cheapest for an AI agent?

Of the models we compared in November 2026, Claude Haiku 5.5 had the lowest list price at $0.10 per million input tokens and $0.50 per million output for prompts up to 100,000 tokens. Gemini 3.1 Flash-Lite came next at $0.25 and $1.50. The cheapest model that answers your test questions correctly is the one to use.

Get a cost estimate for your agent

If you have the job, the monthly volume and the list of systems written down, talk to us. We will tell you which route fits, what the monthly bill looks like at your volume, and where the build hours go.

✦ ✦ ✦
Sudeep
Wingflows
Work with us →

Keep reading

All articles →
Build vs Buy Software: A Checklist and 3-Year Cost Method
Custom Software & AI

Build vs Buy Software: A Checklist and 3-Year Cost Method

E-Way Bill Limit: ₹50,000 Rule, State Limits and Exceptions
Invoicing & GST

E-Way Bill Limit: ₹50,000 Rule, State Limits and Exceptions

Webflow Pricing: What Each Plan Really Costs
Websites

Webflow Pricing: What Each Plan Really Costs