Building a Production AI Agent System for Customer Support

decagon · Tech · 2023 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Enterprise customer support automation

Decagon wanted enterprise support agents that could answer across channels, reason over unstructured support knowledge, execute workflows and actions, route to humans when needed, and improve through admin and QA feedback without damaging brand trust or compliance posture.

Constraints:

Architecture

Decagon built an AI agent engine around five connected pieces: a core AI agent brain loaded with enterprise knowledge, actions, workflows, and tools; routing to decide whether conversations stay with AI or go to humans; agent assist as a copilot for human support agents; an admin dashboard for configuration, rollout, metrics, and monitoring; and a QA interface for granular conversation review and continuous improvement.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  customer-channels[Customer channels] --> core-ai-agent-brain[Core AI agent brain]
  customer-channels --> routing-product[Routing product]
  core-ai-agent-brain --> knowledge-sources[Knowledge sources]
  core-ai-agent-brain --> action-and-tool-library[Action and tool library]
  action-and-tool-library --> guardrail-layer[Guardrail layer]
  core-ai-agent-brain --> workflow-library[Workflow library]
  core-ai-agent-brain --> routing-product
  routing-product --> human-support-agent[Human support agent]
  core-ai-agent-brain --> agent-assist[Agent assist]
  agent-assist --> human-support-agent
  core-ai-agent-brain --> admin-dashboard[Admin dashboard]
  admin-dashboard --> qa-interface[QA interface]
  qa-interface --> human-support-agent
  admin-dashboard --> guardrail-layer
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Customer channels Chat, email, SMS, voice, and other entry points where users ask support questions. Core AI agent brain, Routing product
Core AI agent brain Enterprise-specific agent logic loaded with knowledge, workflows, actions, and tools. Customer channels, Knowledge sources, Action and tool library, Workflow library, Routing product, Agent assist, Admin dashboard
Knowledge sources Articles, help-center content, internal knowledge bases, SOPs, data, and historical human-agent conversations. Core AI agent brain, Admin dashboard
Action and tool library Functions for actions such as refunds, credits, order lookup, product details, or reshipping. Core AI agent brain, Guardrail layer
Workflow library Customer-specific workflows derived from SOPs and configured for AI execution. Core AI agent brain, Admin dashboard
Guardrail layer Customer-defined policy, compliance, injection/manipulation detection, and dangerous-action controls. Action and tool library, Routing product, Admin dashboard
Routing product Dynamic criteria for when a conversation stays with AI, routes to a human, or uses agent assist. Customer channels, Core AI agent brain, Human support agent, Guardrail layer
Agent assist Human-support copilot that reuses the agent brain while leaving final message and action approval to a human. Core AI agent brain, Human support agent
Human support agent Escalation destination and reviewer for cases that need human judgment, approval, or intervention. Routing product, Agent assist, QA interface
Admin dashboard Customer-facing configuration, testing, rollout, metrics, monitoring, and insight surface. Core AI agent brain, Knowledge sources, Workflow library, Guardrail layer, QA interface
QA interface Quality-management surface for reviewing conversations, taxonomizing issues, and feeding improvements back into the agent. Admin dashboard, Human support agent

Data flow

A customer contacts support through chat, email, SMS, voice, or another channel. The core agent brain uses company knowledge, workflows, and tool/action permissions to respond or act. Routing decides whether to keep the case with AI, hand it to a human, or let a human use agent assist. Conversation data from AI and human handling flows back into the admin dashboard, where customers configure knowledge, workflows, brand behavior, tests, rollout, metrics, and QA taxonomies for ongoing improvement.

4 supporting quotes
“we build AI agents uh for customer support and what that means is not just the agent that is responding to the humans”transcript, stated
“there's a core AI agent then there's routing then there's agent assist then there's an admin dashboard and then there's the QA interface”transcript, stated
“this brain is something that gets loaded with knowledge so any you know articles information data that the company wants to provide”transcript, stated
“human agent handle some of it all that data from both the AI agent and the human agent is able to flow back into our admin dashboard and so this is where our customers will spend a lot of their time so our customers when we are working with them to you know deploy”transcript, stated

Why this architecture

Decagon uses a full agent-engine loop because enterprise support needs more than answer generation. A reusable brain centralizes knowledge, workflows, and actions; channel adapters handle different timing expectations; routing and agent assist keep humans in the loop; the admin dashboard gives customers brand/configuration control; and QA/test loops catch distribution drift and edge cases after launch.

4 supporting quotes
“the core workflow of issuing an order refund or looking up um like product details or um you know checking the distance to the nearest bank might be the same workflow wise”transcript, stated
“there's a lot of these product constraints uh across different modalities that that need to be taken into account”transcript, stated
“because it's essentially a representation of their brand and their image and their company and so uh what you really don't want is an AI agent going off the rails and saying something that would hurt the Brand's reputation or make the company look bad and so when”transcript, stated
“ml how your data distribution looks like in the wild is not going to look like what's in your test set and also that data distribution will change over time as users are asking about different things um so if you think about you know writing into support for a you know”transcript, stated

Models used: LLMs · AI agents · evaluation agent · voice model/API

Scale

Alternatives considered (roads not taken)

Use hard-coded decision trees for support

Rejected because: Customers who do not match a predefined happy path fall through and have a poor experience.

“unless you were following along the very happy path of a hard-coded workflow you would probably fall off the cracks”transcript, stated
“unless you perfectly are matched to a workflow that is built off of a decision tree you're going to have a bad support experience”transcript, stated

Build only a simple ReAct loop

Rejected because: Decagon uses an ecosystem of agents that can perform extra steps, review each other's work, and abstract that complexity into a unified brain.

“you can have very very simple agents that do that and you can have um more complex agents that do additional steps”transcript, stated
“also have multiple different types of agents that all work together um and are sort of like reviewing each other's work or like looking for specific you know qualities um and so the way that uh we've been building AI agents internally is sort of this like whole ecosystem of”transcript, stated

Let AI handle all escalated interactions after handoff

Rejected because: Customers choose whether human handoff is final or whether the AI can re-enter after a configurable threshold.

“customer basis so some customers really prefer that you know once it goes to a human um that's the final layer but we also work with folks who where if the human agent is managing like multiple you know conversations at once and after a certain time thresold has passed uh if”transcript, stated
“the AI if the AI agent can you know jump in and help out like some that's a configurable you know behavior that our customers can work with us for you've mentioned like adjusting the agent to the customer a few times like what does that process look like is that like yaml”transcript, stated

Rely only on pre-deployment tests

Rejected because: Real support traffic changes over time and contains unexpected questions, requiring continuous test creation and QA.

“ml how your data distribution looks like in the wild is not going to look like what's in your test set and also that data distribution will change over time as users are asking about different things um so if you think about you know writing into support for a you know”transcript, stated
“are there net new tests we need to create are there ways that people are sort of uh interacting with the agent that we didn't expect”transcript, stated

Patterns

multi-agent-orchestration (agent-engine)

Decagon abstracts multiple cooperating agents that can do additional steps, review each other's work, and look for specific qualities into one enterprise support brain.

“multiple different types of agents that all work together um and are sort of like reviewing each other's work”transcript, stated
“this like whole ecosystem of Agents um which then we abstract away into just like the agent brain”transcript, stated

tool-use-orchestration (actions)

The agent brain gets a library of tools/actions such as refunds, order status lookup, credits, and reshipping, with customer-defined execution criteria.

“you probably have this library of um tools and actions instead that you want to provide your um AI agent”transcript, stated
“Define exactly the scenarios in which you want to execute an order refund”transcript, stated

human-in-the-loop-gate (escalation)

Routing and agent assist move cases to humans when risk, missing workflows, or customer policy requires review and approval before messages or actions are issued.

“there are certain cases where you'll always want to route to a human”transcript, stated
“they still have this uh extra layer of review and approval before they send out the message or issue any actions”transcript, stated

safety-policy-enforcement (guardrails)

Decagon builds guardrails for prompt injection, manipulation, compliance requirements, dangerous tools, and enterprise security around executed actions.

“we do a lot of work around building out the specific um guard rails to detect um potential like injections manipulation”transcript, stated
“Enterprise grade um security around all the actions that we execute as well”transcript, stated

eval-driven-development (quality)

Decagon uses pre-deployment conversation test sets, evaluation criteria, score-returning evaluation agents, online metrics, and QA taxonomies for continuous improvement.

3 supporting quotes
“there's sort of two phases of testing that we generally do one is pre- deployment”transcript, stated
“there will be like an agent that is like doing this evaluation”transcript, stated
“create a QA taxonomy like maybe you're evaluating for um you know accuracy”transcript, stated

canary-rollout (deployment)

The QA process includes rolling the agent to a small percentage of users, reviewing conversations, and iterating before broader deployment.

“you roll out your AI agent to 5% of users you gather the conversation data”transcript, stated
“quick you know QA iteration Loops uh before rolling out the agent like more broadly”transcript, stated

Tradeoffs

Centralize enterprise support logic in one agent brain

Chose A reusable core agent brain across channels over Separate bespoke bots for every support channel.

Rationale: The same workflows and tools can serve chat, email, SMS, and voice, with channel-specific presentation and latency adaptations.

“all of that logic can be stored and built up in the same way”transcript, stated
“building out a chat agent can get all of that work essentially for free and transfer that to like a voice agent”transcript, stated

Route some cases to humans

Chose Dynamic routing plus agent assist over Forcing every support interaction through full automation.

Rationale: High-risk industries, missing workflows, and customer adoption appetite require configurable human review paths.

“healthare Financial Services uh like legal there are certain cases where you'll always want to route to a human”transcript, stated
“some have more or less of an appetite to adopt gen and um like you know start with AI as their first line of defense”transcript, stated

Customize brand behavior per enterprise

Chose Customer-specific tone, brand, structure, and workflow configuration over A generic support-agent personality.

Rationale: The agent represents the customer's brand and can damage reputation if it speaks or acts incorrectly.

“being able to be very customized with their AI agent because it's essentially a representation of their brand”transcript, stated
“what you really don't want is an AI agent going off the rails and saying something that would hurt the Brand's reputation”transcript, stated

Combine quantitative metrics with qualitative QA

Chose Deflection/CSAT metrics plus conversation review and taxonomies over Only tracking aggregate automation metrics.

Rationale: Aggregate metrics show performance, but granular QA reveals edge cases and concrete changes to make.

“the main metrics that people care about especially in the customer support space uh is first deflection”transcript, stated
“to get really granular um deep feedback on how people are actually interacting with the agent you still need someone to go through”transcript, stated

Gotchas (what bit them)

Human SOPs do not translate directly into tool-calling instructions.

Root cause: Human manuals describe behavior differently than function/tool calling specifications.

Resolution: Build explicit tool/action libraries and AI-specific workflow instructions.

“the instructions that you have for that are going to be very different uh in like a human training manual versus like how you're going to um tell the AI agent”transcript, stated
“you probably have this library of um tools and actions instead that you want to provide your um AI agent”transcript, stated

Voice, chat, and email cannot share the same product latency assumptions.

Root cause: Users expect different response timing and presentation by channel.

Resolution: Reuse core workflow logic but adapt presentation, timing, and modality-specific behavior.

“when you're writing into chat versus um writing an email Emil you might expect a chat response back within less than a minute”transcript, stated
“for voice um when you're on the phone with someone and you're having a conversation you probably expect them to reply nearly instantly”transcript, stated

Dangerous support actions need customer-specific policy gates.

Root cause: Refunds, credits, and reshipping can carry financial, compliance, or abuse risk.

Resolution: Define dynamic criteria and guardrails case by case with each customer.

“customers want to build in extra guard rils around”transcript, stated
“there's all these different sort of dynamic criteria that we can work with our customers to Define very quickly”transcript, stated

Offline tests will not cover future production distribution.

Root cause: Customers ask new questions as products change and users interact in unexpected ways.

Resolution: Continuously inspect real conversations, add new tests, and update QA taxonomies after launch.

“that data distribution will change over time as users are asking about different things”transcript, stated
“what are people asking like do we have tests in our test set that are covering what people are asking”transcript, stated

Evaluation

Decagon evaluates agents before deployment with customer-built test sets and evaluation criteria, monitors online metrics such as deflection and customer satisfaction, and runs QA loops on production conversations to create new tests, labels, taxonomies, and improvement actions.

Metrics: deflection or automation rate · customer satisfaction score or NPS · tone and formatting correctness · correct information retrieval · correct workflow and tool execution · QA taxonomy labels and qualitative comments

3 supporting quotes
“deflection so that's the number or percentage of conversations where the AI agent can handle it without having to escalate it to a human”transcript, stated
“the second stat that most companies care about is the customer satisfaction store or CET uh and some folks may call it NPS too”transcript, stated
“is it you know finding the correct workflow to execute and calling the right um you know tools”transcript, stated

Outcomes

The source emphasizes multi-channel enterprise deployment, less-than-a-minute chat expectations, near-instant voice expectations, predeployment tests with hundreds of conversations per workflow, and 5% rollout QA loops.

3 supporting quotes
“we support all of these different use cases with AI agents across a lot of different channels”transcript, stated
“this dashboard contains all of the sort of building blocks that uh we're um going to be using to configure the AI agent”transcript, stated
“all in one platform like really quickly see and Aggregate and figure out you know what changes you need to make to your AI agent”transcript, stated