Skip to content

operationalwrocław--:-- cet

RITE NRG

∕ insights / how-to-build-agentic-ai.md

Agentic AI Development

How to Build Agentic AI: Plan, Ship and Run It

Learn how to build agentic AI for production: plan, design, test and deploy with measurable outcomes and senior engineering control.

>_article.meta

published
2026-11-23
reading_time
17 min read
topics
agentic AI development, AI agents, AI agent architecture, agent testing, AI governance

#01/article

How to Build Agentic AI: Plan, Ship and Run It

An AI agent can beat a human expert four times over on a two-hour task, then lose to that same expert two to one when the clock runs to 32 hours. That's not a vendor slide. On RE-Bench, launched in 2024 to assess complex tasks associated with AI agents, leading systems scored four times higher than human experts under a two-hour budget, and when the available time rose to 32 hours, humans outscored the systems two to one, according to Stanford's 2025 AI Index.

Same models. Different time horizon. Opposite verdict.

Which means the key question in how to build agentic AI isn't whether your agent can do impressive work in a demo. It's whether you know exactly where it stops being reliable, and whether you've built the machinery to catch it there. Judge an agent by how well you can stop it, audit it and reverse it, not by how many tasks it finishes without a human. Then tie every build decision to a number the business already cares about.

The Four Stages From Idea to Production Agent

A production agent needs four things before it earns a place in a business process: a measurable reason to exist, bounded permissions, evidence that it handles failure, and an owner after launch. Without those, a technically impressive build can still miss the business need or create risks no one is prepared to manage.

Use four stages: Discover, Design, Build and prove, and Operate. Each ends with evidence and a named person accountable for the decision to proceed.

Stage Core question Output you must have Gate to move on
Discover Is this process worth an agent? Process map, baseline metrics and data access check Named business owner and a measurable target
Design What can the agent touch, and when must a human decide? Tool list, permission model and escalation rules Risk owner signs off on permissions
Build and prove Does it hold up under failure and perturbation? Evaluation suite, replayable traces and rollback plan Stable results across repeated trials and faults
Operate Is it still safe and valuable after launch? Monitoring dashboard, incident process and review cadence Metrics reviewed and ownership confirmed each cycle

Treat the gates as production controls, not meeting milestones. Discover is complete when a business owner can point to the baseline and target, and the team has confirmed that required data exists, is accessible and is usable. That evidence keeps the project tied to an outcome rather than a preferred model or framework.

Design is complete when a risk owner approves the permissions and escalation rules. Build and prove is complete when the evaluation suite produces stable results across repeated trials, perturbed inputs and an injected infrastructure fault. Operate continues after release: review performance, exceptions and ownership on a defined cycle, then renew the agent's mandate or retire it.

Choose AI where it earns its place

An agent is the wrong choice when conventional software can meet the same outcome more safely or economically. Use AI when it creates measurable value. A deterministic rules engine is a better fit than a language model when the process requires predictable behavior and the model's occasional mistakes would cause harm.

Set governance alongside the architecture. NIST's Generative AI Profile organizes risk work around govern, map, measure and manage, and covers data provenance, monitoring, incident response, change management and decommissioning. Public disclosure of formal safety policies and external safety evaluations remains limited. That makes operational evidence more important: define who can approve changes, who responds to incidents, and how the system is stopped or retired.

The gate rule: no stage closes on enthusiasm. If no name is attached to the evidence, the stage isn't finished.

How to Scope the First Agent Around a Business Outcome

Start with the queue, not the model. A support team whose ticket volume grows faster than its headcount has a scoping problem an agent might solve. An order desk that loses two days on every approval because a person has to rekey a PDF has the same shape of problem. Pick the one that costs the most money and irritates the most customers.

Then write the scope down and get it signed. A scope that lives in a slide deck gets renegotiated the first time the model disappoints.

A flowchart detailing six clear steps for scoping and deploying the first AI agent for business success.

Six steps from business problem to signed scope

  1. Name the process and the outcome in one measurable line. "Cut average handling time on tier-one tickets by a third" is a scope. "Improve support with AI" is a wish.
  2. Record the baseline before anything gets built. Volume, cycle time, error rate, cost per case. Without those four numbers you can't prove the agent worked, and you can't separate a real improvement from a busy quarter.
  3. Name the business owner who signs for the target. Not a sponsor who likes the demo. Someone whose own metrics move if the agent fails.
  4. List the data sources and confirm access and quality early. Weak data kills more agent projects than weak models do. If the process depends on external feeds, say a stream of public-sector opportunities such as those that AI for Government Contracts surfaces, validate that source before design starts.
  5. Sort every action into three buckets. The agent may do it alone, the agent may do it with approval, or the case goes to a person. Name the approver for everything in the middle bucket.
  6. Set a cost and latency budget per task. A per-task ceiling on tokens, tool calls and seconds keeps the economics visible from the first pilot instead of the first invoice.

Most agent programmes fail at this stage. McKinsey's 2025 State of AI survey found that 64% of respondents said AI was enabling innovation, yet only 39% reported any enterprise-level EBIT impact, and most of those said AI contributed less than 5% of organizational EBIT. Organizations seeing the most value typically set growth or innovation objectives rather than efficiency alone. An agent that shaves seconds off a task nobody measures won't show up in either column.

That's why every capability on the roadmap gets four attachments: an owner, a baseline, a target and a production measurement. Model and architecture decisions come last, made on evidence, because process economics decide whether the agent is worth building at all.

The go or no-go test: if no owner can name the baseline and the target without opening a slide, the agent isn't ready to build.

Discovery isn't overhead. We worked with Swedish founders on an AI-powered SaaS that cuts construction installation estimates from weeks to minutes. A three-month discovery phase trained a custom AI model to 80% accuracy recognizing water pipes from 2D drawings. Discovery didn't slow the build. It told the team what to build.

If the data question is still open on your side, an AI readiness assessment is a lot cheaper than discovering the gap in production.

Choose the Stack, Team and Build Model

Most advice on how to build agentic AI starts with the framework. Start with the order of decisions instead, because teams that begin at the library usually end up with a stack their scope never asked for.

Decide the build model first. Buy a platform for generic workflows where your data stays under your control. Build on open components where the workflow is your competitive edge or touches systems you can't hand to a vendor. Combine the two when the agent's shell is standard but its domain logic isn't.

Pick the smallest model that passes your own evaluation, not the biggest one you can afford. Route classification, extraction and routing to smaller, cheaper models and reserve expensive reasoning for cases that need it. One set of software-task evaluations found up to 53× variation in estimated cost among systems that received identical perfect scores, and tool-call frequency had no significant correlation with success (r=0.077, p=0.575), according to the benchmark analysis. More reasoning is not an optimization strategy.

Choose the framework last, once you know your state and tool requirements. A durable workflow engine with checkpoints, retries and loop detection often matters more than which agent library is trending. If the agent needs to read and send email, expose it as a scoped tool such as an MCP server for email rather than handing the model credentials and hoping.

Assign roles by name. A business owner for the outcome, a senior architect for design, engineers for integration and tests, a risk owner for permissions, an operator for post-launch monitoring. One person can hold two roles on a small team. No role goes unfilled.

Log each decision and its reason. A short, dated architecture log with the evidence that drove each call. When the evidence changes in six months, the next team revisits the decision instead of guessing why it was made.

AI speeds up delivery. It doesn't lower the bar. Senior engineers stay accountable for architecture, data, security, integration and production quality whichever model sits in the middle, because a model that writes fast code still ships slow bugs.

Designing Agents You Can Stop, Audit and Reverse

The model is the smallest part of your production risk. The controls around it decide whether the thing is safe to run at all, and many teams under-build them.

A professional team reviews an AI agent performance on a laptop screen while holding an audit checklist.

Start narrow. One agent, one small tool set, and a durable workflow with explicit preconditions, postconditions, checkpoints, a maximum step count and loop detection. Add planning, memory, retrieval or a second agent only when your evaluation shows a measurable benefit, not because the architecture diagram looks more impressive in a review.

Control What it does Failure it prevents
Scoped identity Gives the agent its own short-lived, least-privilege credentials Agent acting with a person's full access
Allow-listed tools Exposes only approved functions behind strict input schemas Arbitrary tool arguments reaching live systems
State checkpoints Records progress so work can resume or unwind after a fault Repeated or half-finished actions after a crash
Idempotency keys Makes a retried action run only once Duplicate payments or duplicate records
Policy check before side effects Validates every write against business rules Unauthorized changes passing without notice
Runtime kill switch Halts the agent mid-action and blocks new actions Harm continuing after an alert
Audit log Stores inputs, decisions, tool requests and responses Failures nobody can trace or replay

Design the reversal before the launch

Autonomy is a budget you spend on actions you can take back. Classify every action as reversible, compensable or irreversible, then work through the rest:

  1. Irreversible actions get two-person approval and a transaction preview. Payments, deletions, permission changes and customer-facing commitments are not places for a confident model to act alone.
  2. Compensable actions get a written compensating action, tested before launch, not sketched on a whiteboard during the incident.
  3. The kill switch gets tested in staging with a live example, by the person who will need it at 2am.
  4. The recovery drill runs before launch and you time it. An untimed rollback plan is a hope with a runbook attached.

The distance between what teams believe and what they can do is measurable. A 2026 survey found that 49.8% of organizations had confirmed or suspected an agent taking an unintended, unexpected or unauthorized action, and among affected organizations 53.9% reported external API calls or transactions, 49.7% reported configuration or permission changes, and 41.9% reported data modification or deletion. Only 17.5% said they could automatically stop an agent mid-action in production, according to Campus Technology's report on the survey.

Controls only count if the team can run them under pressure. This walkthrough is worth twenty minutes before your design review.

OWASP's 2025 Top 10 for LLM Applications treats excessive agency as a first-order risk and names the fix: give the application its own API tokens, implement functions in code rather than exposing credentials to the model, enforce authorization in the downstream system instead of trusting the model to decide, and require human approval for high-impact actions. Complete mediation applies here. Every request to a downstream system gets validated against policy, every time.

If your agent touches money, read up on permission limits on financial AI agents before you decide what it may approve on its own.

We build this as an architecture with one accountable team across AI design, software architecture, integrations, security, evaluation and operational delivery. Where data sensitivity, regulation or cost demands it, private or local deployments keep clear boundaries between the client's environment and any external service. After launch, model operations, documentation, and ownership and escalation mapping get named owners the same way the build did. Our AI agent guardrails material covers the specifics.

A narrow agent that abstains and asks for help is worth more than a brilliant one that occasionally deletes a record. Measure autonomy by containment and recovery, not by how few humans touched the workflow.

The architect signs this design before any code is written. A weak control isn't fixed later with a better prompt.

How to Test Agents Before Anyone Relies on Them

One good run proves nothing. A demo that works on the cases you chose is a demo, and the failures that reach production are the ones nobody scripted.

So test like a systems engineer, not a user. Run repeated trials over the same scenario set and report the spread, because variance is what bites you. Then stage the rollout: sandbox against live-like data first, then a small canary share, widening only while the gate holds and leaving approval in place for payments, deletions, privilege changes and customer commitments.

Metric How to measure it Why it matters
Task success Pass rate across repeated trials, not a single run A single demo hides variance
Invalid tool calls Count of calls that fail schema or policy checks Shows weak tool design
Recovery success Share of failures the agent repairs without a human Tests real production behavior
Unauthorized-action rate Actions outside scope per 100 runs Direct measure of containment
Cost and latency per task Tokens, tool calls and seconds per completed task Reveals inefficiency that looks like progress
Degraded-scenario score Pass rate under perturbed inputs and infrastructure faults Shows whether results survive real conditions

Five steps to a release gate that holds

  1. Build the scenario set from real cases. Pull actual tickets, orders, contracts or errors, then add the edge cases your team argues about and the adversarial inputs someone will try in month two.
  2. Run each scenario repeatedly and record the spread. Ten runs of the same case tell you more about reliability than a hundred cases run once.
  3. Replay traces to find where failures start. The tool call that broke the workflow is rarely the last one. Traces show you the first wrong decision.
  4. Test under perturbation and infrastructure faults. Slow dependencies, timeouts, malformed responses, a database that returns a constraint error.
  5. Gate on stability, not on your best score. A release that depends on one clean run is a release you can't defend in an incident review.

Recovery design separates a toy from a system. In one deterministic benchmark, parser-and-repair mechanisms lifted task success to 76.7% with 73.6% conditional recovery success, against 15.8% task success when recovery was disabled, per the REALM 2026 study on reliable agent evaluation. The same work reports agents falling from 96.9% pass@1 in an ideal setting to 88.1% under modest task perturbation. A clean lab result is not a release decision.

Traceability belongs in the test plan, not in the debugging backlog. A 2026 enterprise survey found that 70% of respondents could not trace a multi-agent failure back to the responsible agent, while 79.4% of consequential agent actions required manual reversal, and 93.2% of those reversals were considered moderately or very costly (Kore.ai's research on the agent governance gap). If you can't attribute a failure to one agent, one tool and one input, your test results won't tell the team what to fix.

Public benchmarks are directional. Your scenarios make the release call, and your engineers own it. When AI accelerates implementation, senior engineers remain accountable for data, security, integration and production quality, and that includes the decision to hold a release that looks good on paper.

Warning Signs in Production and How to Fix Them

The most dangerous production failure can look like success. Tasks finish, dashboards stay green, and outputs still violate business rules because no one validates them. Add checks that test each output against the rules the workflow must satisfy. A completed task is not a successful outcome until it meets those checks.

Speed can hide a second problem. Google Cloud's 2024 DORA report found that a 25% increase in AI adoption was associated with a 7.5% improvement in documentation quality, a 3.4% improvement in code quality and a 3.1% improvement in code-review speed. The same analysis associated increased AI adoption with a 1.5% decrease in delivery throughput and a 7.2% reduction in delivery stability. Track delivery quality alongside speed, and do not treat faster reviews as evidence that a release is safer.

Symptom Likely cause Fix
Tasks finish but outcomes are wrong No validator checks outputs against business rules Add schema, database and business-invariant validators
Same tool called in a loop Missing loop detection and step limits Set maximum steps and terminate repeated sequences
Costs climb with no better results Extra reasoning and tool calls used as a crutch Set per-task budgets and route simple subtasks to smaller models
Duplicate records or payments Non-idempotent retries Add idempotency keys and compensating actions
Incidents rise after launch Changes shipped without evaluation gates Add release gates and track reversal rates
No one can say which agent caused a failure Missing traces and shared agent identities Assign distinct identities and keep replayable traces

Treat the fixes as release work, with their effort and dependencies visible. Step limits, idempotency keys and per-task budgets can be configuration changes. Distinct agent identities, replayable traces and a validator layer may require architecture changes measured in weeks. Put those controls in the release plan before launch, rather than leaving them in the backlog.

Judge an agent by how safely it can be stopped and recovered, not only by how many tasks it completes without human help. Review reversal rates, incident severity and human override frequency every month. For that review to drive decisions, teams need logged data on agent actions, costs and escalations. Use AI agent observability as a guide to the records needed to understand what an agent did and where human intervention occurred. Tie each fix to a measurable business outcome, then check whether it improves that outcome without making failures harder to contain.

Confirm the First Agent Scope Before You Build

Before anyone writes code, get one workflow, one business owner, one baseline and one approval path onto a single page. A good first agent is a small, owned, measurable workflow, not a platform.

Take five items into the next planning meeting:

  • The outcome with a measured baseline and a target date. Volume, cycle time, error rate, cost per case, plus the date by which the number has to move.
  • The named owner who signs for the result. One person, with the authority to stop the project.
  • The tool and permission list, with every action marked reversible, compensable or irreversible.
  • The escalation path, with named people for every stop and every approval, not a distribution list.
  • The evaluation plan and its release gate: repeated trials, degraded-scenario results and a canary stage.

Human oversight is a designed process, not a promise that someone will glance at the output. NIST's Generative AI Profile recommends acceptable-use policies and formal human-AI teaming guidance, with defined responsibility for the people who oversee system performance. That means named accountability, documented policies, evaluation criteria and escalation paths, plus evidence that the controls work.

We deliver an AI opportunity assessment, readiness review or roadmap for a fixed fee priced by complexity, and our senior engineers stay accountable for data, security, integration and production quality throughout. The same team can run the agent after launch, covering monitoring, model operations and escalation mapping, and can stand up a dedicated R&D centre if the programme becomes ongoing. Related services include AI Consulting & Automation, Technology Talent & Teams, and Managed Technology Services.

Bring the scoped workflow to Rite NRG for a review. The first decision, the one worth making this week, is which single workflow you'll contain and measure.


Rite NRG designs, builds and operates agentic AI for teams that need it running in production, not sitting in a demo. We start with your business process, prove value against a baseline, then build with the permissions, evaluation and rollback controls that make an agent safe to leave switched on. Bring us the workflow you want to scope and we'll tell you plainly whether it should be an agent at all: visit Rite NRG.

/ about the author

Written by the RITE NRG editorial team — the architects, engineers and delivery leads who build and operate AI-era software for our clients.

Technology Talent & Teams

IT Partnership Models: How to Choose the Right One

A decision-maker's guide to IT partnership models: what each model actually transfers to the partner, what it costs beyond the rate card, and how to match the model to your situation.

More guidance: all insights articles

Get a Free 30-Minute Scoping Call

Tell us about the system or idea behind this article. We tell you honestly if it is a fit — and what a fixed-scope delivery could look like.