Project Info
Agentic Routing At Scale: The Cornerstone of an Agentic Future Enterprises run a large number of agents, and being able to choose which agent to run a query on is a complex and expensive task. Routers exist today that can handle O(10) agents, but what about O(1000). Salesforce has O(10000) agents and — in a future where agents seem poised to replace many jobs — organizations may come to rely on the orchestration of O(1,000,000) agents with O(100,000,000) prompts/day. If we want a future driven by agents, with companies formed of agents, and to maximize performance/$ for inference, we need to solve the large-scale routing problem. The routing space is large and continuing to explode, and there exist no systems that can scale to the size that is needed. We develop a novel recommendation-system based algorithm for prompt routing, drawing inspiration from the TikTok algorithm Fortunately, our team (check below) is adept at handling matching problems at scale. Taking inspiration from the recommendation system at TikTok, ConductorAI matches queries and routers through a two-stage embedding approach, learning prompt and agent embeddings from exploring the interaction between the two and without manual encoding or intensive processing of either. Check out the technical details in our slides! ConductorAI: 66x cost savings, 4x latency reduction, better than any single AI model, and exponentially better performance with many agents ConductorAI provides unheard of speed and cost reduction at reasonable accuracy for an agent-driven future. Conductor implicitly learns a mapping between a semantic-embedding space and an agentic-embedding space, where coordinates correspond to features such as problem difficulty, tools required, and context that may be relative when deciding between agents. Additionally, adding agents to the system requires no hard-coded rules or descriptions, Conductor can naturally learn agent embeddings that exceed human performance. With A agents and P prompts, a traditionally LLM based router has inference scale on the order of O(PA), as each agent needs to be referenced in context, a classification-based router scales on the order of O(PA), and the theoretical perfect router scales at O(P). We scale at O(P log A) amortized, being the only neural-network based approach to do so. With the Intersystems vector search system, this O(log A) term is practically unnoticed. Conductor Composer To showcase the power of ConductorAI routing on practical problems, we have orchestrated an Agentic Suite around ConductorAI, incorporating agents for: Perplexity Search Code Generation Customer Service Database Management Executive Assistant HR Questions Legal Advice Software QA Web Automation Calendar Agent Here is our github repo containing our router, completely open-source: https://github.com/shloknatarajan/ariadne-routing Codegen Developer Tool: SWE-Bench Agent Harness & Evaluator For our code generation service, we extended it to provide a dev tool for Codegen users to run SWE-Bench on. We've made it very easy to run, test, and evaluate on SWE-Bench using Codegen's SDK, and included our own Codegen Agent that works on SWE-Bench. Here is the pull request containing the addition: https://github.com/codegen-sh/codegen-sdk/pull/521 Team Shlok Natarajan - Stanford University, Routing Research with Prof. Azalia Mirhoseini and Prof. Roxana Daneshjou Devan Shah - Princeton, Recommendation Systems at TikTok Advay Goel - MIT, Building @ Prod Victor Cheng - vly.ai, a Y Combinator company for Coding Agents
Routing
Problem: We want to be able to route a user's query to the best agent based on the query. This solves an increasingly difficult problem as the number of agents grows. This solution is inspired by social media recommendation systems to recommend agents based on the user's query.
To get started, run python app.py
Cluster Generation
- Take a set of queries
- Convert each query into a vector using a pre-trained embedding model
- Cluster the queries into different groups based on the similarity of their vectors
- For each cluster, select the query that is most representative of the cluster or convert the cluster into a single embedding vector
Routing
- Take a set of queries
- Convert the queries into a vector using the same pre-trained embedding model
- For each set of similar queries, convert the cluster into a single embedding vector
- Return cluster embedding vector
- Map cluster embedding vector to agent space
- Map to agent embedding
Analysis
View
Metric
- 24
- 16
- 15
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- HTMLIn code
- PythonIn code
- PyTorchClaimed
2 of 3 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
187 KB
Source files
47
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
shloknatarajan/ariadne-routing
211 files · 12.2 MB · @ ff23557
Structure
Interface
2 files · 1%Screens, components and styles rendered to the user.
Application logic
52 files · 25%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python65%
- Markdown24%
- HTML7%
- YAML3%
Share of indexed source by file size. Binary and vendored files are excluded.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.