The true cost of in-house
Most companies do the math wrong. They compare a $50K agency project to a $200K base salary and conclude in-house is cheaper. That math misses about 60% of the real cost.
Here's the loaded cost of a senior ML engineer in the US in 2026:
- Base salary: $260K-320K (Levels.fyi, US senior median, April 2026)
- Equity: 15-25% of base in private companies, vests over 4 years
- Benefits, payroll tax, health: 25-30% of base
- Equipment, software, AI tooling subscriptions: $5K-15K per year
- Recruiter fee: 15-25% of base on first hire ($40K-80K)
- Training and conferences: $5K-15K per year
- Manager time on hiring, onboarding, performance: ~10% of a manager\'s salary equivalent
Loaded year-one: $400K-550K for one senior US hire. Year two drops to $360K-450K (no recruiter fee). EU is roughly 60% of these numbers. India roughly 40%.
Then there's the time cost. From kickoff "we should hire" to first production deploy: 6-9 months. Two months hiring, three months ramp, two months first build. The financial cost of that delay (delayed revenue, delayed ops savings) is rarely modeled but it's real.
The true cost of an agency
For boutique studios shipping a single AI agent or automation system:
- Discovery: typically free or capped at $2K-5K
- Build: $15K-80K fixed price for boutique tier, $80K-300K for mid-tier
- Ongoing: $0 to $5K/month optional retainer for maintenance
- Time-to-value: 4-12 weeks from kickoff to production
The hidden costs that buyers miss:
- Internal time on calls, reviews, decisions: ~10-20 hours over the project
- Maintenance after handover: depends on the build, $0-2K/month
- Platform / API costs: tokens, vector DB, hosting, $50-2,000/month
- Iteration after launch: small change requests, ~$2K-10K total in year one
Year-one all-in for a single agent: $25K-110K boutique, $90K-400K mid-tier. Compare to $400K-550K loaded for one in-house engineer who's still ramping in month four.
When in-house actually wins
Three situations make in-house the right call regardless of cost:
One: AI is the product. If you're selling AI as your core offering (not as a feature inside a larger product), you need ownership of the system, the model strategy, and the iteration loop. An agency can ship version one, but they can't be the engineering team that ships version twenty.
Two: continuous build over 18+ months. Single-system project, agency wins. Building five systems over two years, in-house starts winning around system three.
Three: data sensitivity blocks vendor access. Some healthcare, defence, and government work has data classifications that no external vendor can touch. In that case the question isn't cost, it's permission.
The hybrid model
Most mature teams end up here. Agency builds the system, hands over documentation, trains your team, then sticks around for 30-60 days of post-launch support. After that, a single mid-level engineer (or even a senior ops person who knows the workflows) maintains it.
Year-one cost: $40K-120K for the build plus $80K-130K for the maintainer. Total $120K-250K. Compare to $400K+ for full in-house. You capture 80% of the strategic value at 30-50% of the cost.
The key is picking a vendor that documents properly and uses a stack you can hire for. n8n, Claude API calls, standard Next.js, standard databases. If the agency hands you a niche framework that only they understand, the hybrid model breaks.
Decision framework
Five questions to answer before deciding:
- Is AI the product, or is AI a feature inside the product? Product, in-house. Feature, agency or hybrid.
- Will you build one system or five over the next 18 months? One, agency. Multiple, evaluate hybrid or in-house.
- Do you have data classification that blocks external vendors? Yes, in-house. No, agency or hybrid.
- Can you hire a senior ML engineer in your geography in under 90 days? No, agency. Yes, all options open.
- What's your time-to-value tolerance? Under 90 days, agency. 6+ months acceptable, in-house viable.
For most SMB and mid-market teams, the answers point to agency or hybrid. Enterprise and AI-native companies usually answer toward in-house. Both can be right. The wrong answer is the one made on assumptions instead of math.
