AI execution layer

Build your own AI agents vs buy: what a DIY agent stack really needs

Deciding whether to build your own AI agents vs buy comes down to one question: is running agent infrastructure part of your business? If agents are your product, or you have engineers and a process nobody else serves, build. If you are an operator who wants the work done, buy the layer and build only the edges.

Hands connecting colorful puzzle pieces together
Photo by Alan Aprilio on Unsplash

Part of our guide to What is an AI execution layer? A plain-English guide for operators

On this page · 7 sections
  1. The components of a DIY agent stack
  2. Costs that DIY budgets usually miss
  3. When building is the right call
  4. When buying is the right call
  5. The middle path: buy the layer, build the edges
  6. Questions to settle before anyone writes code
  7. Frequently asked questions

A working prototype takes an afternoon: a model API, a prompt, a couple of tool functions, and the agent drafts an email. That afternoon is why so many businesses think they should build. The trouble starts in week three, when the agent needs to remember a client's rules, wait for approval, call a customer, recover from an API change and show you what it did yesterday. That is the part of an AI execution layer that takes the real effort.

This is a fair comparison, written by people who build agent infrastructure for a living. We think most operators should buy. Some should build, and we explain who.

The components of a DIY agent stack

Here is what a production agent stack for a small business needs, beyond the model call. Each row is a real piece of engineering with its own failure modes.

What you would be building (general components, not a specific product)
ComponentWhat it doesTypical DIY approachWhat goes wrong
Model accessCalls one or more LLMsProvider APIs such as Anthropic or OpenAIModels are retired; prices and limits change
Tool connectorsLets agents read and write email, CRM, files, accountingVendor APIs, or servers using the Model Context ProtocolAuth tokens expire; APIs change shape
Memory and stateRemembers rules, clients and task historyDatabase plus retrievalStale or conflicting memories
Identity and permissionsScopes what each agent can touchService accounts, OAuth scopesOver-broad access, shared logins
ApprovalsHolds outward actions for a human OKCustom queue and UIApprovals so slow people bypass them
OrchestrationSplits requests, runs tasks in parallel, assigns ownersAgent framework plus job queueStuck tasks, duplicate work
ChannelsLets you work from Telegram, WhatsApp or SlackEach platform's bot or business APIPlatform policy and rate-limit changes
Telephony and SMSInbound and outbound calls, textsSIP trunk or carrier API plus a voice stackLatency, compliance, number management
Logging and auditRecords who asked, what was read and changed, who approvedStructured logs and storageLogs that exist but nobody can read
Evaluation and monitoringChecks quality and catches regressionsTest sets, alerts, dashboardsSilent quality drift after a model change
Cost controlCaps spend per task and per dayBudgets and timeoutsA retry loop that runs overnight

None of these is exotic. Together they are a product, and someone has to own it.

Costs that DIY budgets usually miss

Model lifecycle maintenance

Model providers retire old models on a schedule. Anthropic, for example, publishes a model deprecations page and commits to at least 60 days' notice before retiring publicly released models; on 30 September 2026 it notified developers that Claude Sonnet 4.5 would be retired on the Claude API on 30 November 2026. Every retirement means re-testing your prompts and tools on the replacement. If you run agents across several providers, multiply that work.

Integrations that drift

Your CRM ships an API change, your mailbox provider tightens OAuth rules, a chat platform changes its bot policy. Each one breaks something at an inconvenient time. Someone has to notice, fix and redeploy.

Security review

An agent that reads email can be manipulated by what it reads. Defending against prompt injection, scoping permissions and keeping secrets out of prompts is ongoing work, not a one-off. Our security team's guide to least-privilege access for AI agents is a good checklist whether you build or buy.

Being on call

When the agent that receipts payments stops at 6pm on a Friday, who gets the alert? In a DIY stack, it is whoever built it.

When building is the right call

Build if most of these are true:

  • Agents are part of the product you sell, so the infrastructure is a competitive asset.
  • You have engineers with ongoing capacity, not a contractor who leaves after launch.
  • Your core process is unusual enough that no product models it well.
  • You need to run inside a specific environment (your own cloud account, an air-gapped network) that vendors can't meet.
  • You are willing to own monitoring, model upgrades and security review indefinitely.

When buying is the right call

  • You are an owner-operator or small team whose product is something else: property management, therapy, trades, consulting.
  • The work is common business admin: email, CRM, invoicing prep, follow-ups, research, calls.
  • You want approvals, logs and channel access on day one, not in month four.
  • Nobody in the business wants to be paged when an integration breaks.

Buying has its own risk: you depend on a vendor. That is manageable if you can export your data and instructions and leave on short notice. Our AI vendor lock-in checklist covers what to confirm before you sign up anywhere.

The middle path: buy the layer, build the edges

For most businesses the best answer is both. Use a platform for the shared layers (orchestration, approvals, channels, memory, logging, telephony) and build the parts that are unique to you: a connector to your industry system, an internal dashboard, a custom report. In Cortex, Fulcrum Code does exactly this kind of edge work from a chat request: it builds the integration or internal tool, deploys it and reports back. Our software writers cover the process in building software with an AI coding agent.

I'm building and running RiideStar's tech myself, with my Cortex agent. I'm not a developer. I tell it what I need from my mobile phone, sometimes with one line or a photo from the tablet. It builds the change, deploys it and reports back the same day.

Tony Hollis, founder, RiideStar

Individual results vary. The pattern is what matters: the founder owns the direction and the approvals, and doesn't own the infrastructure.

Questions to settle before anyone writes code

  1. Which five tasks will the agents do first, and what does done look like for each?
  2. Which of those actions must wait for a human approval, and who approves?
  3. Who owns the stack after launch, including nights and weekends?
  4. How will you know quality has slipped after a model change?
  5. Where are logs kept, for how long, and who can read them?
  6. What does it cost per month at your expected volume, including model usage, hosting, telephony and the engineer's time?
  7. How will you measure whether it is working? (Our hours-saved method is a starting point.)

If questions 3 and 6 make you uncomfortable, that is your answer. Look at what the Cortex platform already provides and build only what is left over.

Frequently asked questions

Is it cheaper to build my own AI agents?

The model usage can be cheap. The total cost usually isn't, once you add integrations, approvals, monitoring, telephony, security review and someone on call. For most small businesses, buying the shared layers and building only unique pieces is cheaper over a year.

What do I need to build an AI agent for my business?

At minimum: model access, connectors to the tools the agent will use, memory of your rules, scoped permissions, an approval step for outward actions, logging and monitoring. Add channels and telephony if the agent talks to people.

Can I build AI agents without coding?

You can build simple ones with no-code automation platforms that now include agent steps. For agents that act across several systems with approvals and audit logs, you will either need engineering help or a platform that provides those layers.

What happens when an AI model I use is retired?

Requests to a retired model fail, so you must move to a replacement and re-test your prompts and tools before the retirement date. Providers such as Anthropic publish retirement schedules and give notice; a platform vendor should handle this migration for you.

Sources

  1. Model deprecations · Anthropic
  2. Model Context Protocol · Model Context Protocol

General information only, not legal, financial or professional advice. Check the source for your circumstances.