What is a custom AI agent?
A custom AI agent is software that completes a job across your existing tools: it reads a request, looks up the facts, decides what to do, acts through your systems' APIs and reports back. Unlike a chatbot it changes things, so it works inside permissions, limits and approval steps you define.
It suits operations and support teams with a steady stream of rule-bound work: refund tickets, order changes, account updates, invoice chasing. Take a refund desk. The agent reads 'the mug in order 1042 arrived cracked', finds the order in Shopify, checks your policy, refunds up to your limit on its own and sends larger amounts to a lead with the proposal ready to approve. If a person spends six minutes on each ticket at $22 an hour, that is $2.20 of their time; the agent's model calls on the same ticket cost cents.
You can build agents for your own operations or build them into a product other companies buy. This page prices one production agent for one business: the orchestrator, specialist models and MCP harness, an approval console, and connections to Shopify, your helpdesk and Slack. Packaging it for many customers is an add-on.
Routine tickets closed before anyone opens them, and a short queue of proposals to approve, each with the evidence and the exact action attached.
A refund or fix without waiting for someone to reach the ticket, and a reply that states the amount and when it will arrive.
Every action traceable to a run, an approval and a cost, with credentials and spending caps held by the harness, not the model.
What features does a custom AI agent need?
A custom AI agent needs 8 core features: one orchestrator owns the plan, specialists for each step, one harness for every call, limits enforced in code, approvals bound to the action, no double refunds, logs you can replay and shadow mode before autonomy.
One orchestrator owns the plan
Code, not the model, decides which step runs next and saves the state after each one, so a crash resumes mid-task instead of starting over.
Specialists for each step
A small fast model triages, a stronger one reasons over the order and the policy, and a checker confirms the reply matches what was actually done.
One harness for every call
The MCP harness holds the credentials and checks each call's permissions and arguments before anything reaches Shopify or your helpdesk.
Limits enforced in code
A refund cap, allowed actions per step and a cost ceiling per task are checked on the arguments, so an injected instruction cannot raise them.
Approvals bound to the action
Risky calls pause for a person in Slack or the console, and the approval covers that exact amount and order and expires if unused.
No double refunds
Each write carries an idempotency key saved before it runs, so a retry after a timeout never repeats the refund.
Logs you can replay
Every call is journaled with its inputs, result, latency and cost, and past runs replay as tests when you change a model or a prompt.
Shadow mode before autonomy
For the first weeks the agent proposes and people decide; actions switch to automatic only for ticket types it gets right almost every time.
What screens does a custom AI agent have?
It is built around 3 screens: run timeline, approval in chat and today's totals.
- 1Run timelineOne refund request moving through triage, order lookup, policy check, refund and reply, with each step's result and cost.
- 2Approval in chatA refund above the automatic limit waiting for a lead on their phone, with the order, the amount and approve or reject buttons.
- 3Today's totalsTasks closed by the agent, sent for approval and escalated today, with the average cost per task.
How does a custom AI agent work?
End to end, in 5 steps: a task arrives, specialists do their steps, the harness checks every call, it acts, or a person approves and it reports and learns.
- 1
A task arrives
A new helpdesk ticket, a form or a scheduled job starts a run. The orchestrator opens a record for it and picks the plan template for that kind of task.
- 2
Specialists do their steps
A fast model classifies the request and pulls out the order number. A stronger model reads the order, the refund history and your policy, then proposes an action with an amount.
- 3
The harness checks every call
Before any tool runs, the harness checks the step's permissions, the arguments against your limits and the task's remaining budget. Anything outside the rules is blocked or sent for approval.
- 4
It acts, or a person approves
A small refund goes through with an idempotency key. A larger one waits in the console or in Slack and runs only with the exact amount the lead approved.
- 5
It reports and learns
A checker confirms the reply matches the refund receipt before it is sent. The run, every call and its cost land in the journal, and failures become test cases.
What is the architecture and tech stack of a custom AI agent?
It has 7 layers: orchestrator (Your own state machine in TypeScript on Temporal or Inngest, or LangGraph), models (Claude Haiku 4.5 for triage and checks, Claude Sonnet 5 for reasoning), tool harness (Your own MCP servers behind one gateway, official TypeScript or Python SDK), business systems (Shopify Admin API, Zendesk or Intercom, Slack), journal (Postgres), evals and tracing (Langfuse or LangSmith, plus a golden set of real tickets) and console and hosting (Next.js on Vercel, workers on AWS or Railway). The diagram shows how a request moves through them.
| Layer | What we use | Why |
|---|---|---|
| Orchestrator | Your own state machine in TypeScript on Temporal or Inngest, or LangGraph | The plan and state live in code and survive crashes, so a refund step is never skipped or run twice. |
| Models | Claude Haiku 4.5 for triage and checks, Claude Sonnet 5 for reasoning | Cheap, fast calls where the job is simple, and the stronger model only on the step that needs judgment. |
| Tool harness | Your own MCP servers behind one gateway, official TypeScript or Python SDK | One place to hold credentials, enforce limits and approvals, and log every call, whichever framework runs the plan. |
| Business systems | Shopify Admin API, Zendesk or Intercom, Slack | The agent works where your team already works, through the same APIs their tools use. |
| Journal | Postgres | Runs, steps, tool calls, approvals and costs in tables you can query, which is what makes audits and replay possible. |
| Evals and tracing | Langfuse or LangSmith, plus a golden set of real tickets | A new model or prompt is tested against past tickets before it touches a live one. |
| Console and hosting | Next.js on Vercel, workers on AWS or Railway | Approvals and run history in a web app, with long-running workers on infrastructure you own. |
How much does it cost to build a custom AI agent?
A launch-ready custom AI agent costs $27,000 to $57,000 to build and takes 7 to 12 weeks. A clickable demo costs $3,300 to $7,000 (2 to 5 weeks), and running it costs $260 to $810 a month at the usage below. You start at $0 and pay per checkpoint you accept.
Priced with the same model as our AI product cost estimator, from the features above. Your price is fixed in writing after a 20-minute call, before any work starts.
| Version | Build cost | Timeline | What it is |
|---|---|---|---|
| Clickable demo | $3,300 to $7,000 | 2 to 5 weeks | Clickable and real where it matters, on test data. Built to show users and investors, not to carry production traffic, so compliance work starts at launch. |
| Launch-ready | $27,000 to $57,000 | 7 to 12 weeks | Production architecture, tests on the risky paths, monitoring, and a handover your team can run. |
| Enterprise-grade | $35,500 to $74,000 | 8 to 15 weeks | Load tested, highly available, audited and documented for a larger team. |
What it costs to run
About 6,000 agent tasks a month, such as refund tickets, each a handful of model calls on Claude Sonnet 5, plus hosting and monitoring.
| Line | Per month | Assumes |
|---|---|---|
| Hosting and database | $45 to $120 | Vercel + managed services, sized for 100 monthly users |
| Model usage | $220 to $540 | Claude Sonnet 5, 60 requests per user a month |
| Email, monitoring, analytics | $0 to $150 | Free tiers cover most products at launch |
| Total | $260 to $810 | List prices, before any volume discount |
Build at $0: how you pay
$0 is when you pay, not what you pay. The launch-ready build is split into checkpoints with acceptance criteria agreed before work starts, and each one is invoiced only after you have seen it and accepted it.
- 1Scope and acceptance criteriaBefore work startsA call, then a written plan: every checkpoint with acceptance criteria you agree to before work starts.$0
- 2Architecture and first flowBy week 2Data model, service boundaries and one real flow working end to end.$5,500 to $11,500
- 3Core productBy week 6The main flows on production architecture, with a demo at the end of every week.$8,000 to $17,000
- 4AI on your real dataBy week 10Models, agents or voice working on real inputs, with evals and guardrails in place.$8,000 to $17,000
- 5Launch and handoverBy week 12Deployed on your accounts and documented, with 30 days of defect correction included.$5,500 to $11,500
What can you add to a custom AI agent after launch?
The additions most teams make next: more agents on one harness, sell agents to other companies, voice or chat front end and browser steps for portals.
More agents on one harness
Returns, address changes or invoice chasing reuse the orchestrator, harness and journal, so each new agent costs less than the first.
Sell agents to other companies
Tenant isolation, per-customer credentials and usage billing turn your agent into a product you charge for.
Voice or chat front end
Customers start the same task by phone or chat, and every action still passes through the same harness and limits.
Browser steps for portals
Where a supplier or carrier has no API, a sandboxed browser specialist can do that step under the same approval rules.
What are the risks when building a custom AI agent?
Three things decide whether it works in production: limits belong in code, retries that repeat side effects and measure before autonomy.
Limits belong in code
A prompt that says 'never refund more than $50' can be talked out of it, which OWASP lists as excessive agency. Check amounts, scopes and order ownership on each call's arguments, and fail closed when a check cannot run.
Retries that repeat side effects
Timeouts happen, and without an idempotency key saved before each write, a retry refunds twice. Pass the key to the API where it accepts one, and keep your own record for approvals that wait over a weekend.
Measure before autonomy
An agent can pass a demo and still get the same ticket wrong on a second try. Replay real tickets several times each, run two weeks in shadow mode, and automate only the ticket types leads accept unchanged.
Where can you read more before you build?
- Build an AI Agent That Does Real Work: Orchestrator, Specialist Agents and One MCP Harness
- The Agent Loop, For Real: Termination, Budgets, Idempotency, and What Actually Breaks
- MCP in Production: Gateways, Tool Budgets, and What Changed in the 2026-07-28 Spec
- AI Product Development: the service behind this build




