Self-Hosting Pays Off Past a Few Hundred Users
Open-source AI agent tools cost less once you pass a few hundred users. Commercial platforms cost less to launch, because the vendor runs the servers and handles the upgrades. So a 50-person company usually saves time with a commercial seat. A 500-person company with one engineer to spare usually saves money by self-hosting.
We reached that answer by pricing one internal agent on each path in Python. At 50 staff, the self-hosted path cost $1,202 a month against $1,050 for Gemini Enterprise Business seats. At 500 staff, self-hosting cost $5,420 against $10,500. The full model, with every assumption, sits further down.
However, price is only one test. The license decides what you may do with the code. Also, the security work moves to your team the day you self-host. We cover each of those, with real projects and their published terms.
This page is about business platforms for a team. Running agents on your own laptop is a different job. For that, our guide to AutoGPT alternatives for local AI agents covers local models, hardware and power costs.

Read the License Before You Call a Tool Open Source
Many agent tools publish their code on GitHub. But public code is not always open source. The license sets the rules, and some popular tools use licenses with real limits. We compiled the license of each major project from its repository and our directory listings.
| Project | License | Can you sell a hosted service built on it? | Typical use |
|---|---|---|---|
| — | — | — | — |
| CrewAI | MIT | Yes | Role-based agent teams in Python |
| LangGraph | MIT | Yes | Stateful agent graphs with approvals |
| OpenHands | MIT | Yes | Coding agents |
| Microsoft Agent Framework | MIT | Yes | .NET and Python agents |
| OpenAI Agents SDK | MIT | Yes | Small agents with handoffs |
| Google ADK | Apache 2.0 | Yes | Multi-agent apps on any model |
| Mastra | Apache 2.0 | Yes | TypeScript agents and workflows |
| Flowise | Apache 2.0 | Yes | Visual chat and agent flows |
| Goose | Apache 2.0 | Yes | Desktop agent with MCP |
| Dify | Dify Open Source License, based on Apache 2.0 | Only with the extra conditions met | Team apps with knowledge bases |
| n8n | Sustainable Use License | No, without a commercial deal | Business workflows with AI agents |
| AutoGPT Platform | Polyform Shield | No, if it competes with the maker | Block-based agents |
Permissive Licenses You Can Build a Product On
MIT and Apache 2.0 are permissive licenses. You can change the code and sell products built on it. You keep the copyright notice, and Apache 2.0 adds a patent grant. So CrewAI, LangGraph and Google ADK carry no license fee at any scale.
Still, permissive code is a toolkit. You write Python or TypeScript, and you run the servers. For example, the OpenAI Agents SDK installs with one pip command, but you host and monitor every agent yourself.
Fair-Code and Source-Available Licenses With Limits
n8n uses its own Sustainable Use License. It lets you run n8n for your company’s internal work for free. However, it does not let you resell n8n as a hosted service without a deal. n8n calls this model fair-code. It is not an open-source license under the usual definition.
Dify builds on Apache 2.0 but adds conditions. For instance, running it as a multi-tenant service for outside customers needs written permission. AutoGPT’s platform uses Polyform Shield, which bars use in a product that competes with the maker. So read these three closely before you build a product for clients on top.


Published Seat and Credit Prices on Five Commercial Platforms
Commercial platforms bundle hosting and security paperwork into the price. Most charge per seat, per credit or with a mix of the two. We took each price from the vendor’s own pricing page or our directory listing.
| Platform | Billing model | Published price |
|---|---|---|
| — | — | — |
| Gemini Enterprise | Per seat | Business $21 per user a month for 1 to 500 users; Standard and Plus $30 |
| Microsoft Copilot Studio | Seats plus credits | Microsoft 365 Copilot $30 per user a month, paid yearly; capacity packs $200 for 25,000 credits |
| Agentforce | Credits, conversations or seats | $0.10 per standard action; $2 per conversation; $125 per user add-ons |
| Relevance AI | Plan plus Actions | Pro $19 a month billed annually for 2,500 Actions; extra Actions $80 per 1,000 |
| Lindy | Per active user | Team from $29.99 a month with 3,000 credits per seat |

Each of these includes the model calls up to a limit. That matters for the math. With open source, the model bill arrives on top, from OpenAI, Anthropic or Google.
Also, watch the unused-credit rules. Salesforce says unused Flex Credits do not roll over into the next term. Lindy’s monthly plan credits reset each cycle, although bought top-ups carry over. Copilot Studio capacity packs refill 25,000 credits at the start of each month.

Monthly Cost of One Agent at 50 and 500 Staff
We priced one internal assistant agent for a whole company. Each person runs 10 agent tasks a workday, over 21 workdays. Each task sends 8,000 input tokens and gets 800 output tokens back. These volumes are our assumptions, so swap in your own.
For the self-hosted path, we used Claude list prices. Sonnet 5.5 costs $2 per million input tokens and $10 per million output tokens. Haiku 5.5 costs $0.10 and $0.50 for prompts up to 100,000 tokens. Then we added a server at $50 a month for 50 staff and $200 for 500. Finally, we added engineer upkeep at $90 an hour. We assumed 10 hours a month at 50 staff and 30 hours at 500.
tasks = users * 10 * 21
tokens = tasks * (8000 * input_price + 800 * output_price) / 1_000_000
self_hosted = tokens + server + hours * 90
seats = users * seat_price
| Monthly cost | 50 staff | 500 staff |
|---|---|---|
| — | — | — |
| Agent tasks | 10,500 | 105,000 |
| Gemini Enterprise Business seats at $21 | $1,050 | $10,500 |
| Lindy Team seats at $29.99 | $1,499.50 | $14,995 |
| Microsoft 365 Copilot seats at $30 | $1,500 | $15,000 |
| Self-hosted, Sonnet 5.5 tokens | $252 | $2,520 |
| Self-hosted, Haiku 5.5 tokens | $12.60 | $126 |
| Self-hosted total with Sonnet 5.5 | $1,202 | $5,420 |
| Self-hosted total with Haiku 5.5 | $962.60 | $3,026 |

At 50 staff, the paths land close together. In fact, Gemini Business seats beat the Sonnet self-hosted path by $152 a month. The engineer’s time is most of the self-hosted bill, at $900 of $1,202.
At 500 staff, the picture flips. Seats grow in a straight line with headcount. But upkeep grows slowly, because one well-run server can serve many more people. As a result, the Sonnet path costs about half of Gemini Business seats.
We also worked out a break-even point. At 50 staff, self-hosting with Sonnet beats Gemini Business only if upkeep stays under 8.3 hours a month. With Haiku, the limit rises to 11 hours. Against Microsoft 365 Copilot seats, the limits are 13.3 and 16 hours.
Even so, the seats buy more than one agent. Gemini Enterprise includes enterprise search and Deep Research. Microsoft 365 Copilot includes Copilot Chat across Office apps. So compare the seat price with the work you would drop, as well as the agent.
Read also: Devin vs OpenHands: Paid Coding Agent or Open-Source Alternative
Security Work Moves to Your Team When You Self-Host
Self-hosting gives you full control of the data. But it also gives you every patch. In January, security firm Cyera disclosed a flaw in n8n nicknamed Ni8mare. It was CVE-2026-21858, rated 10 out of 10 on the CVSS scale. It allowed full takeover of unpatched instances. n8n shipped a fix. However, each self-hosted server stayed exposed until its owner upgraded.
So a self-hosted agent needs a named owner. That person watches security notices and tests each upgrade before it goes live. Our upkeep hours in the cost model cover this work.
Commercial vendors take on that job and show paperwork for it. For example, Lindy lists SOC 2 Type II, GDPR and PIPEDA, plus HIPAA with a signed BAA on Enterprise. Relevance AI lists SOC 2 and GDPR on its paid plans. LangSmith, the hosted layer for LangGraph, lists SOC 2 Type 2, ISO 27001 and HIPAA.
Still, a vendor badge does not remove agent risk. Zenity Labs showed a zero-click email attack on a replica support agent built in Copilot Studio. It leaked knowledge files and Salesforce records before Microsoft fixed it in April last year. Prompt injection hits hosted and self-hosted agents alike.
Gartner’s survey of 360 IT application leaders, from September last year, put numbers on the worry. In fact, 74% saw AI agents as a new attack vector. Only 13% firmly agreed they had the right governance in place.
Costs That Rarely Appear on Either Price Page
Sticker prices hide a second layer of cost on each side. We pulled these from vendor terms and our own directory listings.
On the open-source side, the model bill comes first. Every token goes to your provider at list price. Next comes the server, plus backups and a staging copy for testing upgrades. Then there is the time to read release notes. For example, n8n’s move to version 2.0 included breaking changes to security, storage and configuration.
On the commercial side, the extras sit in the fine print. Agentforce’s free Foundations tier needs Salesforce Enterprise Edition or higher. Also, most of its value assumes your records already live in Salesforce. Implementation partners and admin time add to that.
Usage meters bring surprises too. Relevance AI counts an Action each time a tool runs, even when the tool fails. Lindy bills each seat until an admin removes it, with no refund for part of a month. And Copilot Studio needs an Azure subscription before credit billing works.
So add a buffer to each path. We would add at least one extra month of upkeep hours to a self-hosted budget. For a commercial plan, we would price a month at your busiest expected usage.
Open-Core Vendors Sit Between the Two Camps
Several open-source projects now sell a hosted or enterprise layer. This open-core model lets you start free and pay later for hosting, logins and support. We found clear published terms for five of them.
First, n8n sells Cloud Starter at €20 a month on annual billing for 2,500 executions. Pro costs €50 for 10,000. Its Business plan is €667 a month for 40,000 executions and is self-hosted only. Also, the free Community Edition has no vendor execution cap.

Second, CrewAI keeps its framework under MIT. Its hosted AMP Basic plan is free for 50 workflow executions a month. Enterprise is quoted, with SSO, RBAC and PII redaction. CrewAI has changed its hosted pricing often, so get the quote in writing.

Third, OpenHands keeps its core under MIT. Its Teams plan costs $500 a month for up to 10 users. Model usage is billed separately by your model provider.
Fourth, LangGraph is free under MIT. LangSmith, its hosted tracing and deployment layer, has a free Developer seat. The Plus plan costs $39 per seat a month.
Finally, Mastra is free under Apache 2.0. Its hosted platform has a free Starter plan and a Teams plan at $250 a month. Mastra raised a $22 million Series A led by Spark Capital in April this year.

The open-core path lowers the exit cost. If the hosted price rises, you can move the same code to your own servers. That option is weaker with fully closed platforms, where agents live in the vendor’s builder.
Lock-In, Data Control and Model Choice
Lock-in shows up in three places. First, the agent logic. Agents built in Agentforce Builder or Copilot Studio stay in those tools. In contrast, a CrewAI or LangGraph agent is plain code you can move.
Second, the model. Open-source frameworks work with many providers. For instance, CrewAI connects to many LLM providers and MCP tools, so you can swap models when prices change. Commercial platforms choose or limit the models for you.
Third, the data. A self-hosted n8n or Dify server keeps prompts and records on your network. A hosted platform keeps them in the vendor’s cloud, under its retention terms. Even so, many vendors promise not to train on customer data. Lindy states this, and so does LangSmith.
Besides, check the cloud you already pay for. Copilot Studio needs an Azure subscription for credit billing. Agentforce needs your data in Salesforce for most of its value. Those facts can decide the question before price does.
A Decision Table for Your First Agent Platform
We turned the cost model and license review into a table. Find your situation in the first column.
| Your situation | Path we would pick | Why |
|---|---|---|
| — | — | — |
| Under 100 staff, no spare engineer | Commercial seats | Upkeep hours would exceed the seat savings |
| Over 300 staff, one engineer free | Self-hosted MIT or Apache 2.0 tool | Seat costs grow faster than upkeep |
| You will resell agents to clients | MIT or Apache 2.0 code | n8n, Dify and AutoGPT licenses limit resale |
| Strict data residency rules | Self-hosted, or a vendor with regional hosting | Data stays where you choose |
| Data already lives in Salesforce or Microsoft 365 | Agentforce or Copilot Studio | Permissions and records are already there |
| You want to start free and scale later | Open-core, such as n8n or CrewAI | The same code moves to paid hosting |
| You need HIPAA with a signed BAA | Commercial plan that offers a BAA | Lindy offers one on Enterprise |
For a wider view of the code route, see our ranking of AI agent frameworks. For hosted tools without code, see our list of no-code AI agent builders. Our open-source AI agents category lists every open tool in our directory.
Buyer Doubts About Self-Hosted and Hosted Agents
Is n8n Open Source?
Not under the usual definition. n8n’s code is public, but its Sustainable Use License limits commercial resale. You can self-host it free for your own company’s work. n8n calls this fair-code.
Are Open-Source AI Agents Free?
The license is free, but running them is not. You pay for model tokens, servers and the time to maintain them. In our model, upkeep was $900 of a $1,202 monthly bill at 50 staff.
Which Is Safer, Open-Source or Commercial Agents?
Neither is safe by default. Self-hosted tools depend on how fast you patch, as the Ni8mare flaw showed. Commercial tools carry audits such as SOC 2, but prompt injection still affects them. So the safer choice is the one your team can monitor.
Which Open-Source Agent Frameworks Have the Largest Communities?
GitHub stars give a rough guide. In our directory research, the OpenAI Agents SDK had about 30,400 stars and Mastra about 29,000. Google ADK had about 22,000, and Microsoft Agent Framework had more than 14,000. n8n gained 112,400 stars in a single year, the most of any project in the JavaScript Rising Stars ranking.
Can I Move From a Commercial Platform to Open Source Later?
Yes, but plan for a rebuild. Agents made in Agentforce or Copilot Studio do not export as code. Write down each agent’s instructions, tools and test cases from day one. Then a later move to CrewAI or LangGraph becomes a planned rewrite.
What Is the Cheapest Way to Run an AI Agent for a Small Team?
For a few users, a hosted plan is usually cheapest once you count your time. n8n Cloud Starter costs €20 a month, and Relevance AI Pro costs $19 a month on annual billing. Self-hosting n8n is free, but you take on the server and the patches.
Related AI Agents
Read also: AI ISA vs Human ISA: What Each Really Costs a Real Estate Team
Explore Agent Categories
Related Articles
ComparisonsDevin vs OpenHands: Paid Coding Agent or Open-Source Alternative
GuidesAI Agent Security Risks in Enterprise Applications
GuidesBest Outreach AI Alternatives: Platforms, AI SDRs and Stacks
ComparisonsLindy vs Relevance AI: Which AI Agent Platform Fits Your Team?
ComparisonsHarvey vs Legora: Which Legal AI Platform Suits Your Firm?
GuidesBest CAMEL AI Alternatives and What They Cost





