Back to all postsAI Automation

How to Put an AI Agent Into a Business: Guardrails, Orchestration and the Plumbing In Between

Muhammad Awais12 min read
Three Metaviz AI products set at different depths: GoAI Chat in front, with Medd AI's content generator and the Tree Care platform further back, each one standing for a different part of putting an AI agent into production.

Most agent projects do not fail at the model. They fail at the plumbing: the data the agent is allowed to read, the systems it is allowed to write to, and the moment it should stop and fetch a human.

This post is about that part. Not what an agent is, which we covered in the piece on voice agents and the one on AI-driven SaaS, but the decisions that determine whether one survives contact with a real business. Five of them, in the order they usually come up.

What Makes It an Agent and Not a Workflow

Worth settling the word first, because it is being used for everything. A rule-based automation fires when a condition matches: the keyword, the form field, the date on the calendar. It is predictable, and it breaks the moment reality stops matching the rule.

An agent is handed a goal rather than a trigger, and four things follow from that.

  • It breaks the goal into steps. Our building-code compliance platform runs a permit file through six stages, and the content pipeline produces blogs, then website copy, then emails, then ad copy, then social posts, each off the back of the one before.
  • It uses tools. Tree Care AI reaches five outside services inside one flow. An agent that cannot call anything is a text generator with ambition.
  • It keeps context. GoAI Chat holds the thread, so the fourth question can lean on the first answer instead of starting again.
  • It takes more than text. Butler AI, inside our field-service platform, accepts speech, a photo or typing and returns the same priced quote either way.

That is the whole distinction. A workflow follows a rule somebody wrote. An agent decides inside limits somebody set, and the limits are the difficult part.

Where This Is Already Working

Five places it pays off today. All of them are ours, so the detail is checkable rather than illustrative.

  • Answering the phone. The restaurant reservation agent takes the booking, verifies the slot on the live calendar before confirming, and leaves a complete customer record behind.
  • Qualifying leads. The outbound reactivation agent worked a list of over 500 dormant leads, scored 94% of them correctly by trade and problem, and passed more than 200 to sales with the context attached.
  • Producing the first draft at scale. The content pipeline watches a Google Sheet. A new client row triggers a full pack, blogs through to social posts, formatted and filed in Google Docs by n8n, Cassidy AI and Zapier.
  • Checking work against a standard. The compliance platform grounds every finding it raises in a cited passage from the code book, so a reviewer can verify it instead of trusting it.
  • Writing in a regulated field. Medd AI drafts medical content with in-text citations and a second model auditing the draft before anything ships.

Start With One Task, Not a Strategy

The projects that stall are the ones that begin with “we want AI agents”. The ones that ship begin with a single task somebody is already doing by hand, often enough to be annoying, with a clear right answer.

Pick the one where the volume is high and the judgement is low. Booking, triage, qualification, the same three questions arriving all day. Once that one is live and measured, the second is a far easier conversation internally, because you are no longer arguing about a concept.

Your Data Sets the Ceiling

An agent is only as good as what it can look up. Before the model matters, the knowledge base has to be organised, the CRM has to be clean, and somebody has to be able to say which version of a document is the current one.

This is the least interesting part of the work and the part that decides the outcome. Retrieval over a tidy, current set of documents beats a better model reading a mess, every time. If nobody owns the data, nobody owns the agent either.

Make the Agent Show Its Work

The two guardrails that have earned their keep in our builds are not content filters. One is a second model whose only job is to find fault with the first. The other is a rule that the agent may not assert anything it cannot cite.

Medd AI runs both. It drafts medical content, which is about as unforgiving as generated text gets. Several agents run through LangGraph on a Python and FastAPI service: Gemini writes under strict instructions to embed in-text citations in AMA style, GPT-4o then checks the draft for factual accuracy, citation format and readability, and anything that fails comes back flagged with an issue log instead of quietly shipping. Where a request arrives with no references of its own, Perplexity goes and finds them.

Two screens from Medd AI: the generator where a medical topic, audience and length are chosen, and the library where finished articles sit with their citations attached.

Our building-code compliance platform takes the citation rule further, because a permit file has to stand up to an auditor. Every finding the system raises is grounded in a real code passage pulled by ChromaDB vector search from indexed FBC, IBC and NFPA standards, so a finding reads like “FBC Plumbing 2023, Section 712.1” rather than an opinion. The agent cites, it does not guess, and a reviewer can check it in seconds.

Two things on that build are worth copying whatever your industry is. Reviewers can edit any field the system extracted and re-run the checks, so the human sits inside the loop rather than rubber-stamping the end of it. And every document carries an up-front cost estimate with a hard ceiling, which is the guardrail nobody mentions until the first surprising invoice.

Decide Which Agent Takes Which Job

Once there is more than one agent, something has to route the work. That is what people mean by orchestration, and it is less exotic than it sounds: a layer that reads the request and decides who handles it.

GoAI Chat does this at the model level. No single language model is best at everything, so it scores each query and picks the model and agent combination most likely to answer it, then keeps the thread coherent with LangGraph and MemorySaver holding the history. LangChain, OpenAI, Gemini and FastAPI behind a React front end, with JWT authentication, OTP verification and role-based access on the conversation data.

On the left GoAI Chat offering to connect the user with the right AI tool for the job; on the right the Tree Care platform, where a plant identification API, a chatbot and several data services meet in one flow.

The useful shift here is to stop designing one clever agent and start designing several narrow ones that are easy to test. A narrow agent can be evaluated. A general one can only be argued about.

The Integration Layer Is the Work

An agent that cannot write to your systems is a demo. Most of the build is wiring, and most of the surprises live there.

Tree Care AI looks like a small product and has five third-party services behind it. Somebody uploads a photo of a tree: Plant.id identifies the species and condition, AccuWeather, RentCast and Google Maps data feed a cost estimate for trimming or removal, and the Yelp API ranks nearby arborists by rating, distance and availability. A LangChain and Gemini chatbot walks the user through identify, diagnose, estimate and book, because that flow was where people were dropping out. React front end, with FastAPI, Node.js and MongoDB behind it.

None of that is visible to the person who uploaded the photo, which is the point. The measure of a good integration layer is that nobody notices it.

What an AI Agent Stack Is Made Of

Take the marketing off and every agent we have shipped is the same six layers. Worth knowing before you buy anything, because a vendor usually sells you one layer and leaves you holding the other five.

  • The reasoning layer. The model that reads the request and decides what happens. Rarely one model for everything: Medd AI writes with Gemini and checks with GPT-4o, GoAI Chat scores each query and picks the pairing, and the field-service app routes Claude for reasoning, GPT-4o for vision and Groq for speed.
  • The orchestration layer. What decides which agent runs, in what order, and what happens when one fails. LangGraph and LangChain where that logic belongs in code, PydanticAI on the field-service build, and n8n, Make.com or Zapier where it belongs in a workflow somebody non-technical can still read.
  • Retrieval. The part that points the model at your material instead of its training data. ChromaDB over indexed FBC, IBC and NFPA standards on the compliance platform; pgvector over previous quotes and jobs in the field-service app. Memory sits beside it, which is what MemorySaver does for a GoAI Chat thread.
  • The integration layer. The APIs into whatever already runs the business: Google Calendar, Square CRM, Folk CRM, Calendly, Supabase, Google Sheets and Docs, Stripe. This is the largest line in most of our estimates and the one clients expect to be the smallest.
  • Voice infrastructure. Only if the agent answers a phone. Retell AI runs the call, 11Labs provides the voice, Twilio SIP trunking provides the line, and on-device Sherpa-ONNX covers the case where audio is not allowed to leave the device at all.
  • The cost and safety layer. The one nobody puts in a brief. A cost estimate per request with a hard ceiling, duplicate work rejected before it is billed, an alert when a job approaches its limit, and a defined route to a human.

Platforms like n8n, Make and GoHighLevel now ship agent features of their own, which covers the orchestration layer and part of the integration layer. What they do not cover is retrieval over your own documents, a check on the answers, or a ceiling on spend. That gap is where custom work earns its money, and where a bought tool quietly becomes your problem.

Build or Buy

  • Buy when the task is generic. Scheduling, a support widget, a standard chat flow. Paying for a solved problem is cheaper than solving it again.
  • Build when the workflow is yours. If the agent has to follow rules only your business has, a platform will fight you at every step.
  • Build when the data cannot leave. Healthcare, finance and legal usually settle this question on their own.
  • Buy first, build later, often. A bought tool that proves the demand is a cheap way to justify the custom one.

Measure It From the First Day

Agree what you are counting before the agent goes live, because afterwards everyone remembers the number that suits them.

  • Containment. The share of cases that finished without a person. This is the headline figure.
  • Completeness. Whether the record it left behind is usable. An interaction that ends with no data is half a job.
  • Escalation quality. When it handed over, did the person receive the context or start again from nothing.
  • Time returned. Hours that stopped being spent, which is the number a finance team will actually accept.

The market is moving quickly enough that the pressure to act is real. Grand View Research puts the AI agents market at $7.6 billion in 2025 and $10.9 billion in 2026, heading for $182.9 billion by 2033. Read that as one firm's model rather than a measurement: other houses put 2026 anywhere between $7 billion and $15 billion, depending entirely on what they are willing to call an agent.

What Clients Ask in the First Meeting

How do we stop it saying something wrong?

Make it cite, and make something check it. A confident wrong answer with no source is the failure mode that costs you trust, and trust is expensive to win back.

Will it work with the software we already run?

Usually yes, through APIs. Budget for that work as the bulk of the build rather than an afterthought, which is where most timelines go wrong.

What does multi-agent orchestration actually mean?

Several narrow agents instead of one that tries everything, with a layer deciding who gets each request. GoAI Chat picks the model and agent per query; Medd AI runs its agents in sequence through LangGraph.

How much human oversight does it need?

Enough that there is always a route out, and enough that a person can correct the input rather than only reject the output. Design the escalation path before the happy path, because the happy path is the easy half.

What does it cost to run?

More than the pilot suggests, and the variable part is token usage. Put a ceiling on it per document, per conversation or per day, and show that number to whoever is accountable for it.

What does it cost to build?

Four things move the number, and none of them is the model. How many systems it has to read from and write to. How much judgement the task carries, because every exception is more logic and more testing. Whether it answers a phone, which adds telephony and a latency budget. And how much proof you need before it faces a customer: our tax-practice receptionist carries 447 automated tests, which is a different kind of project from one booking flow into a calendar.

Is it reliable enough to put in front of customers?

It is, when the reliability is engineered rather than hoped for. What that looks like in ours: the tax-practice receptionist is tested like software, 447 automated tests and 87 acceptance scenarios before it took a live call; the restaurant agent leaves complete records on 99.2% of calls because the fields are checked, not assumed; Medd AI never ships a draft that a second model has not audited. The common factor is that each one has a route out to a person, designed before the happy path.

Five Decisions, In Order

Name the task, tidy the data it needs, decide what it may write to, agree the number you will judge it by, and cap what it can spend. Five decisions, and the technology follows them rather than the other way round.

If you want to work through those five, we run free 30-minute consultations, and our AI automation and AI agents page sets out how a build runs. Across 34 case studies in 16 categories and 103 reviews on Upwork, our average job feedback is 4.99.

One for the comments: what is the first task you would hand over, and what is actually stopping you, the technology or the data behind it?

  • #AIAgents
  • #AIAutomation
  • #AgenticAI
  • #Guardrails
  • #LangChain
  • #LangGraph
  • #MultiAgentSystems
  • #RAG
  • #WorkflowAutomation
  • #HumanInTheLoop
Muhammad Awais
Muhammad AwaisFounder & CEO

Building AI-Powered SaaS Products, Mobile Apps & Business Automation | Trusted by Clients in 20+ Countries

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment

Protected by reCAPTCHA. Google's Privacy Policy and Terms of Service apply.