Skip to content

Custom software · 10 min read

Custom AI agent development: process and cost factors

The factors that drive the cost of custom AI agent development, how tool-calling loops and token pricing affect run cost, the six phases from scoping to operation, and how to estimate run cost from your own prototype.

By Published Updated

A rising staircase of five blocks, each with a milestone marker on a dotted route that ends in a flag.

What drives the cost of custom AI agent development?

The cost of custom AI agent development follows ten factors, and the choice of language model is not the biggest of them. The ones that move the total most are how many systems the agent touches, how risky its actions are, how ready your data is, and how rigorous the testing must be. This article names the factors, explains the mechanics behind run cost, and shows how to estimate your own. It gives no prices, ranges or durations, because they depend on your answers to the points below.

  1. Scope and autonomy. A narrow task with fixed steps is cheaper to build and test than an open-ended one. More autonomy means more behaviours to evaluate and more ways to fail.
  2. Number and quality of integrations. Every system the agent reads from or writes to adds access, authentication, error cases, rate limits and tests. Poorly documented systems add more.
  3. Data readiness. If the data the agent needs is scattered, stale or inconsistent, someone has to fix that first. That work sits outside the agent and can decide the whole schedule.
  4. Risk of the actions. Read-only agents are simpler than ones that send messages, change records or spend money, which need approvals, previews and audit trails.
  5. Evaluation rigour. A realistic test set, repeat runs and transcript review take people’s time. Higher stakes justify more of it.
  6. Security and compliance review. Sensitive data, regulated settings and customer questionnaires add effort and calendar time that is not code.
  7. Quality and latency targets. Faster answers or higher accuracy may call for a more capable model, extra checks or a redesigned workflow.
  8. Hosting and environment. Running in your cloud account, inside a private network or under data residency rules is more work than a default setup.
  9. Handover and training. Documentation, runbooks and training for the people who will operate the agent.
  10. Change management. Getting people to trust and use the agent is a project of its own.

Budget build cost and run cost separately. Build cost is mostly people’s time. Run cost is mostly model usage, and it continues for as long as the agent does.

Why does an agent’s run cost grow with every step?

The mechanics explain why. Anthropic’s tool use documentation, checked on 2026-10-14, describes the loop for tools that run in your application. You send a request with your tool definitions. The model replies with stop_reason: "tool_use" and one or more tool_use blocks. Your code runs the operation and sends back a tool_result block. The loop repeats while the stop reason is tool_use and ends on any other stop reason. The model never executes anything itself: it emits a structured request, and your code does the work.

Three cost effects follow from this design, all stated in the same documentation set:

  • Each round trip is a new request. The documentation notes that every tool call is at least one extra round trip, so a task with many sequential tool calls means many model requests.
  • Context accumulates. The context window page says each turn’s input contains the previous conversation history plus the new message, and that everything counts toward the window: the system prompt, messages including tool results, and tool definitions. The page also says accuracy and recall degrade as token count grows, which it calls context rot.
  • Tool overhead is billed. The pricing page says tool use requests are priced on input tokens including the tools parameter, on output tokens, and, for server-side tools, on additional usage-based charges. The extra tokens come from the tool names, descriptions and schemas, from tool_use blocks and from tool_result blocks.

The same pricing page shows how the bill is structured: input and output tokens are priced differently, prompt caching has separate rates for writing and reading the cache, and the Batch API offers a discount for asynchronous work. Rates differ by model and change, so read the pricing page on the day you estimate.

Fewer steps, smaller tool results and stable repeated context all cost less to run, which is one more reason to prefer a workflow where the steps are known.

Build, buy or configure: which should you decide first?

Anthropic’s guidance on building agents recommends the simplest solution possible, notes that a single model call with retrieval and examples is often enough, and says agentic systems often trade latency and cost for better performance.

Option Fits when Watch for
Buy a product The task is common and a vendor already solves it Fit to your data and rules; export and exit terms; fees that grow with seats or usage
Configure a platform You need some customisation and your systems are supported Limits of its connectors and controls; lock-in
Build a workflow Steps are known in advance and a model handles individual steps Cheaper to test and run; less flexible when inputs vary
Build a custom agent The task is open-ended, needs your systems, and no product fits Ongoing token, testing and maintenance cost; error compounding

Custom does not have to mean from scratch: many builds use a model provider’s API, an open standard such as the Model Context Protocol for tool access, and ordinary cloud infrastructure. What is custom is the task logic, the integrations, the guardrails and the evaluation.

What are the phases of custom AI agent development?

1. Discovery and scoping

Turn “we want an agent” into a written task definition: what triggers it, what it receives, what it produces, which actions it may take, and what it must never do. Settle who judges the output and how success is measured. Typical outputs are a task description, an out-of-scope list, a systems inventory, a risk list and a draft evaluation plan.

2. Data and tool access

Credentials, permissions, API access, data quality and the design of the tools the agent calls. If your systems lack clean APIs, building them can be a large share of the work. To expose capabilities through the Model Context Protocol, read what an MCP server is how it differs from a REST API, and how to build one in TypeScript. The protocol’s own introduction describes MCP as an open-source standard for connecting AI applications to external systems.

Tool design deserves real effort. Anthropic’s guidance on writing tools for agents recommends a few purposeful tools over wrapping every endpoint, descriptions written as if for a new hire, unambiguous parameter names, and error messages that say what to fix.

3. Prototype

A prototype proves the model can do the task at all on a narrow slice of real data. It shows how many steps a typical run takes and what the first failures look like.

4. Evaluation

Build a set of realistic tasks from your cases, each with a verifiable outcome, and run the agent against it repeatedly. The same Anthropic guidance recommends tracking accuracy alongside runtime, total tool calls, token consumption and tool errors, reading raw transcripts, and using held-out test sets to check for overfitting. Evaluation is easy to underestimate in a plan, and it is the evidence you will use to decide whether to launch.

5. Hardening and guardrails

This turns a prototype into something safe to run:

  • Permissions. A scoped identity with the narrowest access that works.
  • Approvals. Human sign-off before irreversible or high-impact actions.
  • Limits. Anthropic’s agent guidance advises stopping conditions such as a maximum number of iterations, and extensive testing in sandboxed environments.
  • Input handling. Defences against prompt injection when the agent reads untrusted content.
  • Logging and audit. A record of what the agent did, usable for debugging and review.
  • Error handling. What happens when a tool fails or a model is unavailable.

The OWASP Top 10 for LLM Applications is a practical checklist here. Its 2025 edition, as listed on its page on 2026-10-14, includes prompt injection, sensitive information disclosure, improper output handling, excessive agency and unbounded consumption.

6. Launch and operation

Launch is the start of the cost, not the end. Plan for monitoring, failure handling, model and provider changes that alter behaviour, re-running the test set after each change, and a way for users to report bad results. NIST’s AI Risk Management Framework, which its page describes as intended for voluntary use, is one reference for structuring ongoing governance.

How can you estimate run cost without guessing?

Estimate from your own prototype, not a rule of thumb:

  1. Run your test set and record, per task, total input and output tokens across all model calls, including tool definitions and tool results. Each response reports its token use in a usage field.
  2. Take the average per task and the spread, since a few long runs can dominate.
  3. Multiply by the provider’s input and output rates for the model you plan to use.
  4. Multiply by your expected tasks per month.
  5. Test sensitivity: a cheaper model for simple steps, caching for repeated context, batch processing for work that is not urgent.
  6. Add anything else per run, such as server-side tool charges and your own hosting.

What drives the timeline?

Timeline is not a function of the model either. It follows access lead time (credentials, security approvals, data-sharing agreements), decision speed on edge cases, assembling evaluation data with people who know the task, the number of iteration rounds, and dependencies such as APIs that must be built first. Instead of asking for a delivery date up front, ask for a time-boxed discovery or pilot with defined outputs.

Which pricing models will vendors offer?

Vendors usually mix these, and they allocate risk differently.

  • Fixed-scope pilot. A set deliverable for a set fee, good while scope is narrow.
  • Time and materials. You pay for effort. Flexible when scope is uncertain, but needs oversight.
  • Retainer or managed service. A recurring fee for operation, monitoring and improvements.
  • Usage pass-through. Model and infrastructure costs billed separately, ideally in your own provider accounts so you can see and control them.

Whichever you pick, ask who holds the model-provider and cloud accounts, and who owns the code, prompts and test set. The buyer’s guide to choosing an AI agent development company lists the questions to put to each vendor. When the agent depends on pipelines feeding it data, the data engineering services guide covers that scope.

If you want this built

Vexio builds custom AI agents, MCP servers and supporting cloud software as custom engagements. The custom AI agent development page describes the work, and you can request a demo or a call to talk through a task you have in mind.

Sources

Checked on 2026-10-14.

FAQ

Questions this guide answers.

There is no honest single figure, because the same label covers very different work. Cost follows scope and autonomy, the number and quality of integrations, data readiness, the risk of the agent's actions, evaluation rigour and security review. Build cost is mostly people's time; run cost is mostly model usage and hosting.

It depends on access lead time, how quickly decisions are made, how long a realistic test set takes to assemble, how many iterations are needed, and whether integrations must be built first. Rather than ask for a date up front, ask for a time-boxed discovery or pilot with defined outputs.

Typically: scoping the task, getting access to data and tools, building a prototype, evaluating it against realistic cases, hardening it with guardrails such as permissions, approvals and limits, and then launching and operating it, with monitoring and re-testing after model or system changes.

Mainly model usage, billed per token with input and output priced differently, plus hosting, monitoring, maintenance and re-running evaluations after changes. Tool definitions, tool calls and tool results all count as tokens. Estimate from your prototype by measuring tokens per task.

Start by checking whether an existing product solves a common task, or whether a single well-prompted model call with retrieval would do. Anthropic's guidance recommends the simplest solution that works. Build custom when the task is open-ended, depends on your systems, and no product fits.

Further reading
  • Custom software · 14 Oct 2026 · 9 min

    How to choose an AI agent development company

    A buyer's checklist for hiring an AI agent development company: six things to ask for in the first call, a score sheet, questions on evaluation, security and IP, red flags, and how to scope a pilot.

    Read the article →

  • AI agents and MCP · 14 Oct 2026 · 9 min

    What is an MCP server? A plain-English explanation

    An MCP server lets an AI assistant reach a system it cannot see on its own. See what it exposes, how a tool call flows, how local and remote servers differ, and what the specification says about security.

    Read the article →

  • Custom software · 14 Oct 2026 · 9 min

    Data engineering services: what you get and how to buy

    What you receive when you buy data engineering services, what an engagement should cover, the common ways to buy it, how to evaluate a provider, and what vendor documentation says about warehouses, orchestration and security.

    Read the article →

  • AI agents and MCP · 14 Oct 2026 · 8 min

    Build an MCP Server in TypeScript (Tested Step by Step)

    A tested tutorial for building an MCP server in TypeScript with the official SDK: define a tool with Zod, serve it over stdio and Streamable HTTP, test it with the Inspector, register it in Claude Code, and see what to add before production.

    Read the article →

Talk to us

Want this applied to your own case?

Tell us what you run or want to build. We reply by email to arrange a demo or a scoping conversation.

WhatsApp
Message us
Web
vexio.ai