Shipping AI agents to production: timeline, testing and error recovery
What it takes to get an AI agent from a demo that works to something you can leave running: how long it takes, how to test it, and what happens when a step fails.
Short answer
A single AI agent typically takes 3–6 weeks to build after a 1–2 week discovery sprint, and a multi-agent system 6–12 weeks. Roughly a third of that time goes on testing and hardening rather than the first working version. To ship safely, test the agent on 20–50 real tasks before launch, grade the outcome rather than the path it took, run each task several times to check consistency, and keep the set as a regression test. For fault tolerance, save the agent's state after every step so a failed run resumes from the last good step, cap retries and iterations, and require a person's approval for any action that is hard to undo.
- Single agent
- 3–6 weeks after discovery
- Multi-agent system
- 6–12 weeks
- Starting test set
- 20–50 real tasks
- Agentic AI projects Gartner expects cancelled by 2027
- Over 40%
On this page
- How long AI agent development takes
- Why agents that work in a demo fail in production
- How to test an AI agent before launch
- Testing against real tools and SaaS APIs safely
- Error recovery and fault tolerance
- Security risks to design for
- After launch: monitoring and improving
- How we ship agents at Sysvoy
- Common questions
How long AI agent development takes
With us, a single agent that runs one workflow with 2–4 tool integrations takes 3–6 weeks after discovery. A multi-agent system takes 6–12 weeks. The first working version usually appears in the first week or two of the build. About a third of the time goes on evaluation and hardening, and roughly another week on a pilot with real users.
| Phase | Duration | What happens |
|---|---|---|
| Discovery sprint | 1–2 weeks | Workflow map, data and tool check, first test cases, fixed quote |
| Build | 1–3 weeks | The agent, tool connectors, approval or admin screens |
| Evaluation and hardening | 1–2 weeks | Test runs on real cases, fixes, guardrails, error handling, logging |
| Pilot and launch | About 1 week | Limited rollout to real users, monitoring, handover |
What makes it take longer
- Waiting for access. API keys, sandbox accounts and security reviews can add weeks. Ask for them on day one.
- No agreed definition of "done". Without test cases that say what a correct result looks like, every review turns into a debate.
- Actions that can't be undone. Sending money, emailing customers or deleting records needs approval steps and more testing.
- Old or awkward systems. Tools with no API, or APIs with strict rate limits, need extra work before an agent can use them.
For prices per phase and running costs, see our AI agent cost guide.
Why agents that work in a demo fail in production
A demo uses a handful of hand-picked inputs and a patient audience. Production brings inputs nobody anticipated, tools that time out, and long chains of steps where one small mistake carries through to the end. In June 2025 Gartner predicted that over 40% of agentic AI projects will be cancelled by the end of 2027, citing escalating costs, unclear business value or inadequate risk controls.
Consistency is the part demos hide. When Sierra published its τ-bench benchmark in 2024, the best agent it tested solved under half of the tasks on average, and in the retail scenario its success rate dropped to about 25% when it had to solve the same task correctly eight times in a row. Models have improved a lot since, but the lesson holds: an agent that succeeds once is not an agent that succeeds every time.
How to test an AI agent before launch
Anthropic's January 2026 guidance on agent evaluation matches what works for us. The steps below are the core of it.
- Start with 20–50 real tasks. Take them from real cases and past failures, not invented examples. Each needs a clear description of a correct result.
- Grade the outcome, not the path. Agents often find a valid route you didn't expect. Check whether the job was done correctly, not whether it followed your steps.
- Mix graders. Use code checks where the answer is exact (a record was created, a field is right), a model-based grader for judgement calls, and people for a sample.
- Run every task several times. For anything customers rely on, measure whether the agent succeeds on every attempt, not just one (often written pass^k).
- Keep two sets. Capability tests show how far the agent can go; regression tests protect what already works. Run the regression set on every change to prompts, tools or models.
- Read the transcripts. Scores tell you something failed; the agent's step-by-step record tells you why.
| Measure | What it tells you |
|---|---|
| Task success rate | How often the job is done correctly, judged against your test set |
| Consistency across repeated runs | Whether success holds up when the same task runs several times |
| Tool-call errors | How often the agent calls a tool wrongly or mishandles its response |
| Hand-off rate | How often it correctly passes a case to a person instead of guessing |
| Cost and time per task | What each run costs in model usage, and how long users wait |
Tooling helps once the test set exists. OpenAI's agent evaluation tools grade individual runs and then datasets of runs, and LangSmith supports both offline tests before release and evaluators running on live traffic.
Testing against real tools and SaaS APIs safely
Agents are only as safe as the tools they can call. Test them against systems that behave like production without the consequences.
- Sandbox accounts first. Many SaaS platforms, including CRMs, payment providers and help desks, offer test or sandbox environments. Use them for every build and test run.
- Read-only before write. Launch with the agent reading and drafting, and a person doing the final action. Grant write access tool by tool once the results justify it.
- A dry-run mode. Let the agent plan and record the actions it would take without executing them, then compare the plan with what a person would do.
- Idempotent actions. Give every write a unique key, so a retried step can't create a second invoice or send a second email.
- Production-like data, with personal data removed. Test on realistic records, anonymised, so edge cases show up before customers find them.
Error recovery and fault tolerance
Something will fail: a tool times out, a model returns something unusable, a server restarts mid-task. A production agent needs a planned response for each case.
- Save state after every step. LangGraph's checkpointers store the agent's state at each step, so a failed run can restart from the last successful step, and a person can review or edit before it continues. Use a database-backed store such as Postgres in production.
- Use durable execution for long tasks. Workflow engines such as Temporal resume a run automatically after a crash and can pause for days while waiting for human approval.
- Retry with limits. Retry temporary failures with increasing waits, then stop and escalate instead of looping.
- Cap iterations and spend. Set a maximum number of steps and a budget per task, so a confused agent stops rather than running up a bill.
- Fall back gracefully. If the main model is down or unsure, switch to a backup model or hand the case to a person with the context gathered so far.
| Failure | What the agent should do |
|---|---|
| A tool times out or returns an error | Retry with backoff a set number of times, then pause and alert |
| The model returns invalid output | Validate against a schema, retry once, then hand off |
| The server restarts mid-task | Resume from the last saved step, not from the beginning |
| The agent is unsure of the right action | Ask for confirmation or route to a person |
| The agent keeps looping | Stop at the step or budget limit and report what it tried |
Security risks to design for
OWASP publishes two lists worth checking a design against: the Top 10 for LLM Applications (2026 edition) and the Top 10 for Agentic Applications (2026). For agents, the risks that come up most in our work are these:
- Prompt injection and goal hijacking. Instructions hidden in an email, web page or document can redirect the agent. Treat everything the agent reads as data, never as instructions.
- Excessive agency and tool misuse. An agent with more permissions than its job needs can do more damage when it goes wrong. Give each tool the narrowest access that works.
- Sensitive information disclosure. Agents can reveal data from one user or document to another. Apply access rules before anything reaches the model.
- Unbounded consumption. Loops and huge inputs can run up costs or take a service down. Set limits per request, per task and per user.
- Cascading failures. In multi-agent systems, one agent's mistake becomes the next agent's input. Validate hand-offs between agents, not just final answers.
For governance, NIST's Generative AI Profile (NIST AI 600-1) applies its AI Risk Management Framework to generative AI, and is a useful checklist for larger organisations.
After launch: monitoring and improving
- Log every run. Keep the full trace of steps, tool calls and outputs, with personal data redacted, so any complaint can be traced to its cause.
- Evaluate live traffic. Run automated checks on a sample of real runs to catch quality drifting before users report it.
- Alert on cost and errors. Spikes in spend, failed tool calls or hand-offs usually mean something changed upstream.
- Turn failures into tests. Every real failure becomes a new case in the regression set, so it can't quietly come back.
- Re-test before upgrading models. A newer model can be better overall and worse at your task. Run the full test set before switching.
How we ship agents at Sysvoy
Every agent we build starts with a test set agreed in discovery, runs against sandbox systems during the build, and launches to a small group of users first. Risky actions need approval until the results show they don't, and every run is logged. See our AI agent development and multi-agent systems services, or book a call to talk through your workflow.
Want a fixed quote for your project?
Tell us what you are building. We reply within one working day, and a discovery sprint turns your idea into a firm price and plan.
Common questions
How long does AI agent development take?
With us, a single AI agent takes 3–6 weeks after a 1–2 week discovery sprint, and a multi-agent system 6–12 weeks. The first working version appears early; about a third of the time goes on evaluation and hardening, and roughly another week on a pilot with real users.
How do you test an AI agent before it goes live?
Build a set of 20–50 real tasks with clear correct results, grade whether each job was done correctly, run every task several times to check consistency, and read the transcripts of failures. Keep the set as a regression test and run it whenever prompts, tools or models change.
What does pass^k mean in agent evaluation?
It's the share of tasks the agent gets right on every one of k attempts. It matters for customer-facing agents, where succeeding once isn't enough: users expect the same correct result every time.
How do you make an AI agent recover from errors?
Save its state after every step so it can resume from the last good step, retry temporary failures a limited number of times, validate model output against a schema, cap steps and spend per task, and hand the case to a person when it can't recover.
How do you stop an agent from taking a harmful action?
Give each tool the narrowest permissions that work, treat anything the agent reads as data rather than instructions, require human approval for actions that are hard to undo, and launch with read-only access before granting write access tool by tool.
Which tools do you use to evaluate agents?
It depends on the stack. LangSmith works well with LangGraph agents, OpenAI provides evaluation tools for its agent platform, and Langfuse is a good open-source option. The tool matters less than having a test set built from real tasks.
Sources
- Demystifying evals for AI agents (Anthropic, January 2026)
- Building effective agents (Anthropic)
- Evaluate agent workflows (OpenAI)
- Evaluation (LangSmith documentation)
- Checkpointers (LangGraph documentation)
- Durable AI (Temporal documentation)
- OWASP Top 10 for LLM Applications 2026
- OWASP Top 10 for Agentic Applications 2026
- Gartner predicts over 40% of agentic AI projects will be canceled by end of 2027 (Gartner, June 2025)
- τ-bench: benchmarking AI agents (Sierra, 2024)
- NIST AI 600-1: Generative AI Profile
Have something to build?
Tell us where things stand and what you need. A short message is enough to start.