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:
- The job in one sentence (“answer delivery and returns questions from our help pages, hand anything else to Sam”).
- Monthly volume: chats, emails or tickets.
- 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.
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:
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.
That gives 12 million input and 1.2 million output tokens for 1,000 chats. Multiply by each model’s prices:
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.
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.
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.
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).
Hidden costs after launch
Most quotes stop at go-live. Six costs arrive after it.
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:
- Update the source content when prices, policies or opening hours change.
- Read a sample of conversations each month and fix the instructions where answers went wrong.
- Check cost per conversation in your monitoring tool after any model or prompt change.
- 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.



