AI · AGENT ORCHESTRATION

SupportGenius

A multi-agent eCommerce support system on Elasticsearch Agent Builder that resolves tickets through either a single autonomous agent or a six-agent pipeline with adversarial peer review.

↓ SCROLL

The problem

eCommerce support teams burn most of their time on the same resolvable tickets, and it is slow and expensive. In the README's baseline, a human handles a ticket in about 84 minutes at roughly $28, and coverage stops outside business hours. SupportGenius targets that common, repetitive slice: the issue categories a system can classify, research, and resolve deterministically, around the clock.

The approach

SupportGenius is an orchestration layer built on Elasticsearch Agent Builder, with seven specialized agents and ten custom tools. It runs in two modes. A streamlined autonomous agent resolves simple issues in a single API call. A six-agent orchestrated pipeline (Triage, Research, Decision, Simulation, Execution, Quality) handles harder tickets across 16+ calls, and runs an adversarial peer review before committing a response. Triage classifies complexity up front and sets an adaptive token budget, so effort scales with the ticket instead of being spent flat. In the README's figures this lands at about $0.45 per ticket versus the $28 human baseline, with subsecond processing and roughly 85% coverage of common issue categories.

System design

Language / runtimeTypeScript on Node.js 18+, Express
Agent frameworkElasticsearch Agent Builder — 7 specialized agents, 10 custom tools
Data storeElasticsearch 8.x — 6 indexes, 870+ seeded documents
ProtocolREST for agent register/converse, Server-Sent Events for live pipeline traces
Indexessupport_tickets, customer_profiles, product_catalog, knowledge_base, resolution_actions, pipeline_traces
FrontendReact 18, Vite, TailwindCSS, Recharts

How it works

01

Triage and budget

The incoming ticket is classified by complexity. Simple tickets skip the simulation phases, moderate ones get two research phases, and complex ones get three plus trending analysis. The classification sets a per-agent token budget.

02

Research

Research agents query Elasticsearch across support tickets, customer profiles, product catalog and knowledge base, using index searches and ES|QL queries to assemble context.

03

Decision

The Decision agent drafts a proposed resolution from the assembled context.

04

Adversarial peer review

Two isolated agent conversations, an Optimist and a Pragmatist, debate the draft using separate conversation IDs to prevent prompt contamination. Convergence is detected automatically; disagreements resolve through weighted scoring that prioritizes VIP customer status.

05

Execution

The Execution agent applies the agreed action, synthesizing new tools at runtime when a novel action type is required.

06

Quality and knowledge capture

The Quality agent checks the outcome, and the knowledge base is populated automatically so similar tickets resolve faster next time.

What it does

Dual resolution modes

A single autonomous call for straightforward tickets, or a 16+ call orchestrated pipeline with adversarial review for complex ones.

Adversarial peer review

Optimist and Pragmatist agents argue opposing positions in isolated conversations, exchanging quoted argument blocks, before a response ships.

Adaptive token budgeting

Ticket complexity controls research depth and whether simulation runs, and per-agent token consumption is tracked and displayed.

Graceful degradation

Budget exhaustion falls back to previous outputs instead of failing the pipeline.

Dynamic tool synthesis

New tools are registered at runtime to handle action types the system has not seen before.

Automatic knowledge capture

Resolved tickets populate the knowledge base so common issue categories get faster over time.

Stack

TypeScriptNode.jsExpressReact 18ViteTailwindCSSRechartsElasticsearch 8.xElasticsearch Agent BuilderES|QLServer-Sent Events
2025Year
SoloBuild
7 agents · 10 toolsOrchestration
TS + ReactStack