Ai4
AI-assisted summary of Supercharging eBay: Agentic AI with Context-Aware Routing & MCPs Transforming Support, Migrations — original source. Check the original for full context.
Source published:
Detailed notes
## Background Published on YouTube by the Ai4 channel on August 27, 2025, this presentation features Ramesh Periyathambi, Distinguished Engineer at eBay Inc., exploring the company's internal Agentic AI platform. The session covers how eBay leverages context-aware routing, Model Context Protocol (MCP) integrations, and autonomous workflows to streamline tech support, accelerate legacy code migrations, and enhance enterprise operations.
## TL;DR eBay transitioned from basic knowledge-base chatbots to a sophisticated multi-agent platform aimed at eliminating developer friction and reducing ticket turnaround times from 24 hours to minutes. Powered by automated probing agents and a two-stage context-aware routing architecture, the system autonomously resolves over 21% of internal support inquiries while reclaiming thousands of developer focus hours. The agentic framework also drives large-scale code modernization—delivering a 3x productivity boost on framework migrations and contract-first OpenAPI generation—while expanding into finance, legal compliance, and secure MCP-based tool orchestration.
## Atmosphere & style The talk carries the crisp, authoritative tone of a pragmatic enterprise engineering keynote focused on real-world production impact rather than theoretical hype. Delivered with steady pacing and concrete telemetry, the presentation transitions smoothly from macro-level organizational economics to granular architectural schematics. The speaker's delivery is candid and reflective, seamlessly blending relatable developer anecdotes with a systematic breakdown of cutting-edge agent orchestration.
## Key takeaways - [00:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=4s) eBay transitioned from a basic internal RAG chatbot to an enterprise agentic AI platform offering both no-code authoring and custom Spring AI implementations across massive scale. - [03:06](https://www.youtube.com/watch?v=RFxfEV_siMM&t=186s) Internal studies identified that manual support tickets averaged a 24-hour turnaround, causing developers to waste 92 minutes of productive focus per question across repeated context switches. - [05:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=304s) Support requests are processed through stateful graph workflows incorporating modular classification, retrieval, domain execution, and automated self-critique nodes. - [06:34](https://www.youtube.com/watch?v=RFxfEV_siMM&t=394s) Context-aware routing leverages automated probing agents to enrich noisy metadata, paired with vector candidate retrieval and dynamic few-shot Chain-of-Thought LLM ranking. - [09:32](https://www.youtube.com/watch?v=RFxfEV_siMM&t=572s) eBay models support ROI on a baseline manual cost of 112 minutes per ticket, with over 21% of all enterprise support requests now resolved fully autonomously by AI. - [11:44](https://www.youtube.com/watch?v=RFxfEV_siMM&t=704s) Large-scale legacy code migrations achieved a 3x productivity boost and over 80% OpenAPI spec accuracy by using dynamic per-file prompt assembly instead of model fine-tuning. - [14:16](https://www.youtube.com/watch?v=RFxfEV_siMM&t=856s) Agentic workflows extend into business operations, including finance agents interfacing with ERP systems like SAP Ariba and legal agents automating PII redaction and eDiscovery. - [17:48](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1068s) Finance agents consolidate multi-layered dependencies across parent tickets, contracts, and sub-items to highlight actual workflow bottlenecks rather than returning basic status codes. - [19:05](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1145s) A pragmatic hybrid architecture pairs third-party Glean connectors for standardized enterprise apps with custom in-house agent frameworks for proprietary eBay data and APIs. - [20:21](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1221s) Probing agents systematically interview newly registered agents to infer functional capabilities, while explicit user feedback continuously refines routing precision. - [22:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1324s) Automated diagnostic agents integrate directly into CI/CD delivery pipelines, correlating multi-tier telemetry and logs to pinpoint root causes without manual developer log diving. - [23:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1384s) Enterprise Model Context Protocol (MCP) adoption is secured through a centralized MCP Gateway that standardizes authentication, token management, and policy enforcement across tools.
## Detailed walkthrough ### [00:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=4s) eBay's Massive Scale and the Evolution to Agentic AI
To understand the engineering challenges and opportunities at eBay, one must first appreciate the staggering scale at which the platform operates. eBay currently hosts over 2.3 billion live listings—a number so vast that it equates to roughly one item for every third person on Earth. The marketplace supports 134 million active buyers and sellers, generating $74.7 billion in total gross merchandise volume last year while drawing upon nearly three decades of accumulated e-commerce data and domain knowledge. Engaging the audience with a quick show of hands on who had recently bought or sold on eBay, the stage was set to explore how modern AI fits into such an expansive ecosystem.
The journey began with an initial deployment of a simple internal chatbot designed to give eBay employees fast, grounded, and reliable answers from company knowledge bases. Built with a modular architecture that cleanly decoupled data ingestion pipelines from retrieval and response generation, this early setup laid the technical foundation for future routing and orchestration layers. Over time, this single chatbot was re-architected into a full-fledged agentic AI platform offering two distinct onboarding paths for internal teams: a no-code configuration interface for rapid deployment, and a custom code solution built directly on top of eBay’s proprietary frameworks and Spring AI modules.
- **Scale Benchmarks**: 2.3 billion live listings, 134 million active users, and $74.7 billion in annual sales backed by 30 years of e-commerce data. - **Architectural Shift**: Transitioned from a modular RAG knowledge chatbot to a dual-track agentic platform supporting both no-code authoring and custom Spring AI-based implementations.
---
[03:06](https://www.youtube.com/watch?v=RFxfEV_siMM&t=186s) Tech Support Bottlenecks: Calculating the Cost of Developer Friction
Tech support was selected as the first and most critical proving ground for the agentic platform based on a simple operating philosophy: "Every developer who wastes a single minute equals wasted innovation." Before introducing AI agents, internal telemetry and surveys revealed significant friction across engineering teams. The baseline average turnaround time for resolving a developer support ticket sat at 24 hours. During that waiting window, an engineer checked for updates or alternative workarounds at least four separate times.
Coupled with industry research demonstrating that it takes an engineer approximately 23 minutes to recover focus after a context switch or disruption, the total hidden cost became clear. Four interruptions at 23 minutes each meant developers were losing an average of 92 minutes of productive focus time per support question. The agentic initiative's primary goal was to reclaim these lost 92-minute blocks and return that time directly to engineering teams.
- **Pre-AI Support Latency**: 24-hour average response time per support ticket. - **Context-Switching Impact**: 4 status checks per day $\times$ 23 minutes recovery time = 92 minutes of wasted developer focus per question. - **Mission**: Eliminate developer context switches by automating resolution paths across hundreds of specialized agents.
---
[05:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=304s) Inside the Support Graph Architecture and Response Execution
Today, eBay runs hundreds of specialized tech support agents, each fine-tuned to handle a narrow, well-defined slice of the software development lifecycle. When an incoming support inquiry arrives, it is directed to a specialized domain agent—such as a dedicated Framework Agent—which executes a stateful graph workflow. Within this graph, distinct nodes carry out modular tasks including intent classification, retrieval-augmented generation (RAG), or specialized domain logic tailored to specific operational domains like deployments and code migrations.
In practical execution, when a developer submits an issue to a deployment node within the Framework Agent, the system autonomously synthesizes a response, subjects the generated output to an automated self-critique step, and delivers a verified resolution within minutes instead of hours. The platform has seen adoption surge to thousands of active developers per month, drastically compressing end-to-end resolution cycles from a full day down to a matter of minutes.
```mermaid flowchart TD accTitle: Tech Support Graph Workflow accDescription: Flowchart illustrating how a developer support question is routed through specialized nodes in an agent workflow.
subgraph InputStage["Inbound Support Request"] A["Developer Query"] --> B["Context-Aware Router"] end
subgraph AgentExecution["Framework Agent (Graph Workflow)"] B --> C["Classification Node"] C --> D["RAG Retrieval Node"] D --> E["Domain Logic Node\n(Deployment / Migration)"] E --> F["Self-Critique & Validation"] end
subgraph OutputStage["Resolution Delivery"] F --> G["Verified Automated Response\n(Delivered in Minutes)"] end ```
- **Modular Graph Nodes**: Tasks are split into discrete graph steps covering classification, targeted knowledge retrieval, domain-specific execution, and self-critique. - **Turnaround Reduction**: Ticket wait times dropped from 24 hours down to sub-minute or multi-minute automated completions.
---
[06:34](https://www.youtube.com/watch?v=RFxfEV_siMM&t=394s) Context-Aware Routing: Solving the Dynamic Agent Discovery Problem
As platform adoption accelerated and hundreds of agents were created across different teams, directing incoming requests to the appropriate agent became a major bottleneck. The platform required an intelligent "traffic cop" capable of handling a dynamic, rapidly expanding agent pool filled with noisy, heterogeneous metadata. To solve this, eBay implemented a multi-tier context-aware routing framework that combines automated metadata enrichment with a two-stage selection pipeline.
```mermaid flowchart LR accTitle: Context-Aware Agent Routing Pipeline accDescription: Two-stage routing architecture showing metadata enhancement, embedding-based candidate generation, and LLM ranking.
subgraph Ingestion["1. Metadata Preparation"] A["New Agent Added"] --> B["Probing Agent\n(Enriches Noisy Metadata)"] end
subgraph Selection["2. Two-Stage Routing"] C["User Query"] --> D["Candidate Generation\n(Top-K Embedding Search)"] B -.-> D D --> E["LLM Router\n(Dynamic Few-Shot + CoT)"] end
subgraph Consensus["3. Final Selection"] E --> F["Self-Consistency\nEnsemble"] F --> G["Ranked & Scored\nTarget Agent"] end ```
The routing lifecycle begins with a specialized probing agent that cleans and augments the raw metadata of newly registered agents. When a developer submits a query, the system first executes candidate generation, using vector embeddings to retrieve the top-K candidate agents. Next, an LLM-based router performs in-context classification by pulling dynamic few-shot examples from a vector database, invoking an explicit Chain of Thought (CoT) prompt for detailed comparative analysis, and applying self-consistency ensembling to ensure robust scoring. Ablation studies demonstrated that omitting either the dynamic few-shot examples or self-consistency ensembling caused noticeable drops in routing accuracy compared to the baseline semantic router.
- **Probing Agent**: Enriches and cleans unstructured metadata as agents are dynamically registered into the pool. - **Two-Stage Routing**: Vector similarity reduces the search space to a top-K candidate list, followed by LLM-driven ranking. - **Prompt Strategies**: Employs dynamic few-shot retrieval from vector memory, explicit Chain of Thought reasoning, and self-consistency voting to outperform basic semantic embeddings.
---
[09:32](https://www.youtube.com/watch?v=RFxfEV_siMM&t=572s) Quantifying AI ROI: Resolution Metrics and Developer Time Saved
To objectively measure the developer hours saved by deploying AI in tech support, eBay established a structured mathematical model. Under the traditional manual baseline, each support ticket consumed 112 minutes of combined organizational effort: the 92 minutes of lost developer focus time plus an average of 20 minutes of dedicated support engineer effort (which varies across operational channels and categories). Total time saved is calculated by multiplying this 112-minute baseline by the absolute volume of tickets resolved automatically by AI.
$$\text{Total Manual Time per Ticket} = 92\text{ min (Developer Friction)} + 20\text{ min (Support Engineer Effort)} = 112\text{ min}$$
$$\text{Total Time Saved} = 112\text{ min} \times \text{Volume of AI-Resolved Tickets}$$
Resolution is evaluated through two distinct channels: explicit feedback, where the engineer manually confirms the answer resolved their issue, and implicit feedback, where an LLM judge evaluates the conversation against multiple quality criteria. For implicit evaluation, an interaction is classified as resolved if it achieves a composite score threshold of $\ge 7$. Currently, more than 21% of all tech support requests across eBay are resolved end-to-end by AI, returning thousands of engineering hours back to product development.
- **Baseline Total Cost**: 112 minutes of organizational effort per ticket (92 minutes developer downtime + 20 minutes support engineer handling). - **Dual Resolution Tracking**: Supports explicit user confirmation and implicit LLM-judged evaluation based on a composite score of $\ge 7$. - **Adoption Impact**: Over 21% of total enterprise tech support inquiries are completely resolved without human intervention.
---
[11:44](https://www.youtube.com/watch?v=RFxfEV_siMM&t=704s) Large-Scale Code Migrations: OpenAPI Specs and Framework Modernization
Beyond day-to-day support queries, eBay applied agentic workflows to large-scale legacy codebase modernization, focusing on two major technical challenges: contract-first API migrations and major framework upgrades (such as migrating legacy Spring applications to Spring Boot). For contract migrations, a supervisor agent coordinates a fleet of sub-agents that parse legacy source code, auto-generate OpenAPI specifications, and validate the resulting contracts against strict internal standards.
When tackling framework migrations, initial experiments with fine-tuned models were superseded by a more flexible, per-file specialized prompt assembly strategy. For each source file, the system dynamically constructs a runtime prompt incorporating file-specific templates and targeted few-shot examples before dispatching it to the LLM. Deployed across IDEs, command-line interfaces, and cloud environments via Model Context Protocol (MCP) integrations, this approach has served over 900 users, delivering a 3x productivity boost on framework upgrades and achieving over 80% correctness on automated OpenAPI specification generation.
- **Contract-First Automation**: Supervisor agent directs sub-agents to parse legacy repositories, generate OpenAPI specs, and enforce eBay schema standards. - **Prompt Strategy Finding**: Dynamic per-file prompt assembly paired with few-shot examples proved more effective and maintainable than model fine-tuning. - **Migration Performance**: 3x developer productivity acceleration across 900 engineers, with an OpenAPI spec accuracy rate exceeding 80%.
---
[14:16](https://www.youtube.com/watch?v=RFxfEV_siMM&t=856s) Expanding Beyond Tech: Finance, Legal Workflows, and MCP Architecture
The agentic platform has expanded beyond software engineering into business operations, notably finance and legal compliance. In finance, specialized agents handle workflows around corporate travel, purchase orders (POs), contracts, and payroll. The Travel and Purchase Order agent has become the second most utilized no-code agent across the enterprise, managing roughly 5,000 annual tickets by interfacing directly with live ERP systems like SAP Ariba, with future integrations planned for SAP Concur and additional fintech data sources.
In the legal domain, agents automate document compliance and redaction workflows by automatically stripping personally identifiable information (PII) and flagging unauthorized brand logos to shorten human review cycles. Additionally, an eDiscovery and document retrieval agent scans thousands of internal records to extract specific legal artifacts, substantially reducing outside counsel costs and billable lawyer hours.
Underpinning this entire agentic ecosystem is eBay’s implementation of internal Model Context Protocol (MCP) servers built to Anthropic’s open standard. Serving as a unified data fabric, MCP enables both local tools (such as local GitHub MCP servers that execute autonomous branch and code operations) and custom remote integrations (such as an internal API discovery MCP server) to expose tools and context seamlessly to any agent across the enterprise.
- **Finance Workflows**: Handles ~5,000 annual travel and PO tickets via live SAP Ariba data integrations, standing as the platform's second most active no-code agent. - **Legal Automation**: Automates PII redaction, unapproved logo detection, and large-scale eDiscovery document retrieval to curtail legal and audit expenses. - **MCP Foundation**: Utilizes Anthropic-standard local (e.g., GitHub action automation) and remote (e.g., internal API discovery) MCP servers as a standardized data fabric across all agents.
[17:48](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1068s) Value of Finance Agents in Complex Ticket and Invoice Workflows
Opening the floor for questions, Ramesh responds to an inquiry regarding why employees cannot simply look up an invoice status themselves rather than relying on a dedicated finance agent. He explains that enterprise finance workflows are rarely as simple as viewing a single status field. Invoices are frequently bound to complex contracts, dependencies, and multiple sub-tickets containing extensive contextual information. While a straightforward "resolved" status is simple enough, workflows that are stalled or in progress require a holistic view to understand where bottlenecks are occurring and what is driving the delay.
An agent can traverse and absorb all of this surrounding data simultaneously across the main ticket and its related sub-contracts, aggregating everything into a single, comprehensive status report. Instead of forcing an employee to manually track down and cross-reference multiple disparate records, the agent provides full visibility into the exact stage where the workflow is held up.
- Enterprise finance workflows involve multi-layered dependencies, linking parent tickets to various sub-tickets, vendor contracts, and invoice items. - AI agents aggregate distributed data into a consolidated status summary, highlighting blockers rather than returning a raw status code.
---
[19:05](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1145s) Hybrid Architecture: Balancing Glean Connectors with In-House Frameworks
Addressing whether eBay relies on third-party commercial vendors or builds in-house tools, Ramesh notes that the company actively pursues a hybrid approach. eBay evaluates and adopts vendor solutions, using Glean for enterprise search and off-the-shelf data connectors, while concurrently developing custom internal frameworks. The decision to use a vendor versus an internal agent is driven entirely by the specific use case, data locality, and time-to-market considerations rather than dogma over "which solution is the best."
When enterprise systems can be easily connected using Glean's pre-built connectors, eBay takes advantage of them to accelerate delivery. Conversely, when interacting with proprietary internal data sources, internal APIs, or specialized Model Context Protocol (MCP) servers that demand custom authentication logic, eBay builds directly on its internal framework.
```mermaid flowchart TD accTitle: eBay Hybrid AI Architecture accDescription: Flow showing how data requests are split between Glean connectors and eBay's custom MCP framework based on data location.
subgraph Ingestion["Request & Source Evaluation"] Req["User Request / Query"] --> Route{"Data Source Location"} end
subgraph Vendor["Vendor Integration"] Route -->|"Standard Enterprise App"| Glean["Glean Connectors"] Glean --> EntData["Enterprise Systems"] end
subgraph Internal["In-House Framework"] Route -->|"Proprietary eBay Data / APIs"| Custom["eBay Custom Framework"] Custom --> MCP["MCP Gateway & Internal Auth"] MCP --> CoreData["Internal Systems & Services"] end ```
- System selection is dictated by where the data resides and which solution delivers the fastest time-to-market. - Glean is utilized for standardized enterprise SaaS and document connectors across the organization. - In-house agent frameworks are reserved for proprietary APIs, domain-specific logic, and custom Model Context Protocol infrastructure.
---
[20:21](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1221s) Automated Metadata Enhancement and Two-Stage Routing
When asked how the platform handles metadata enhancement and routing, Ramesh explains the role of an automated "probing agent." When developers onboard new agents to the platform, their initial descriptions are often vague or poorly documented despite having fully functioning code. To bridge this gap, the platform deploys a probing agent that runs a battery of predefined questions against the newly onboarded agent. By analyzing the agent's responses and encapsulated behavior, the system automatically generates high-quality metadata and maps out its true capabilities.
This enhanced metadata powers eBay's two-stage routing pipeline as the ecosystem scales to hundreds of agents. When a user submits a prompt, the system first executes a fast candidate generation phase to retrieve the top-K candidate agents capable of handling the query. It then applies a deep LLM ranking step to inspect the candidates and pick the optimal agent for execution. Once the chosen agent delivers its answer, the platform captures explicit user feedback to continuously improve the routing model in a closed feedback loop.
```mermaid flowchart LR accTitle: Agent Metadata Generation and Two-Stage Routing accDescription: Diagram showing probing agent onboarding followed by two-stage candidate retrieval and deep LLM ranking.
subgraph Onboarding["Agent Onboarding"] NewAgent["New Agent"] --> Probe["Probing Agent"] Probe --> Meta["Generated Metadata Store"] end
subgraph Routing["Two-Stage Query Routing"] UserQ["User Query"] --> CandGen["1. Top-K Candidate Generation"] Meta -.-> CandGen CandGen --> LLMRank["2. Deep LLM Re-ranking"] LLMRank --> Exec["Agent Execution"] Exec --> Feedback["User Feedback Loop"] Feedback -.-> CandGen end ```
- Probing agents automatically interview newly registered agents with standardized test prompts to extract accurate functional capability descriptions. - The two-stage routing architecture combines initial broad candidate generation (top-K retrieval) with secondary deep LLM re-ranking. - Explicit user satisfaction signals feed back into the routing pipeline to refine agent selection accuracy over time.
---
[22:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1324s) AI Agents for Production and Pipeline Debugging
In response to an audience question about production support, Ramesh confirms that eBay deploys specialized agents for production troubleshooting and CI/CD delivery pipeline failures. These agents integrate directly with eBay's internal telemetry and monitoring systems, parsing and correlating logs across multiple architectural layers to locate root causes.
When test suites fail or deployment pipelines halt, the debugging agents isolate the exact failure points and surface relevant diagnostic summaries directly inside the delivery pipeline interface. Ramesh contrasts this with his early engineering career, noting: "when I was a developer like 10 years back I had to go through every single layer to really find where the issue is." Automating multi-layer log correlation drastically cuts down the mean time to resolution for operational regressions.
- Dedicated diagnostic agents hook directly into internal monitoring platforms to analyze multi-tier system logs. - Automated error surfacing provides immediate failure attribution directly inside CI/CD delivery pipelines without manual log hunting.
---
[23:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1384s) Securing Model Context Protocol (MCP) Servers via Custom Gateway
Addressing the mechanics of security and authentication for Model Context Protocol (MCP) servers, Ramesh describes eBay's implementation of a centralized internal MCP Gateway. Because standard MCP specifications require integration with corporate access controls, eBay built an abstraction layer that wraps internal authentication and authorization protocols.
This MCP Gateway encapsulates security policies, token management, and permission validation, enabling developers to expose proprietary data sources and APIs as agent tools safely. By centralizing authentication at the gateway level, individual teams can onboard services into the agentic ecosystem without having to implement custom auth mechanisms for each standalone MCP server.
- A custom eBay MCP Gateway abstracts enterprise authentication and authorization across all registered tool servers. - The gateway architecture standardizes secure onboarding of internal APIs, enforcing enterprise access policies before agent tools execute.
## Notable quotes > [03:06](https://www.youtube.com/watch?v=RFxfEV_siMM&t=186s) Every developer who wastes a single minute equals wasted innovation. — Ramesh Periyathambi
> [22:04](https://www.youtube.com/watch?v=RFxfEV_siMM&t=1324s) when I was a developer like 10 years back I had to go through every single layer to really find where the issue is. — Ramesh Periyathambi
## Mentioned Ai4, Anthropic, eBay, GitHub, Glean, Model Context Protocol (MCP), OpenAPI, Ramesh Periyathambi, SAP Ariba, SAP Concur, Spring AI, Spring Boot
## Video description Ramesh Periyathambi, Distinguished Engineer, eBay Inc
Abstract
eBay is heavily investing in AI to enhance developer and employee productivity. What if every support ticket could be routed to the right agent and resolved in seconds, instead of waiting for hours? In this session, I will demonstrate how our team at eBay extended our chatbots into an Agentic AI platform that is transforming tech support. With hundreds of agents automating our support processes, I’ll explain how context-aware routing enabled agentic AI orchestration.
We’ll dive deep into our tech support metrics, including research and survey findings that revealed developers wasted an average of 92 minutes waiting for answers before the advent of AI agents. I’ll walk through how we calculate time saved through AI, based on resolved tickets.
I will also highlight one of our major initiatives: using AI for code migrations. This includes leveraging agentic workflows to auto-generate OpenAPI specs for legacy services and perform framework upgrades using specialized prompts. Our scalable architecture has allowed us to migrate thousands of legacy code repositories and services, achieving 3x productivity.
Additionally, I’ll touch on use cases focused on accelerating finance and legal workflows. Finally, I’ll share how eBay is using Model Context Protocol (MCP) servers to power our agents.
[Source](https://www.youtube.com/watch?v=RFxfEV_siMM)