Project Info
Inspiration
Multi-agent AI systems waste tokens because every agent often receives the entire context, even when most of it is irrelevant. We wanted to solve that problem by routing information instead of compressing prompts.
What it does
Relay is a context-routing engine for AI agents. Instead of giving every agent the full context, Relay: Breaks context into pieces Determines relevance Routes information to the agents that need it This reduces token usage, cost, and latency.
How we built it
Built with: Anthropic Claude ASI:One (Fetch.ai) Next.js TypeScript React Flow Pipeline: Challenges The biggest challenge was proving the token savings were real. To solve this, we directly compare: Baseline: every agent gets full context Relay: agents get routed context using real token counts returned by the API.
What we learned
Context management is becoming an infrastructure problem. As AI systems scale, intelligently distributing information may be just as important as improving the models themselves.
What's next
Long-term memory Dynamic context caching Enterprise multi-agent systems Relay: We don't compress prompts. We route information.
Relay
Context-routing engine for multi-agent AI systems. Instead of sending every agent the full prompt, Relay routes only the context each agent actually needs.
Goal
Demonstrate 70–95% token reduction while maintaining output quality.
Stack
- Next.js 15 + TypeScript + Tailwind
- Anthropic API + ASI:One API (OpenAI-compatible fallback)
- React Flow (agent graph) + Recharts (metrics)
Setup
npm install
cp .env.example .env.local
# Add your API keys to .env.local
npm run dev
Open http://localhost:3000.
Environment Variables
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Anthropic API key (primary provider) |
ASI_ONE_API_KEY | ASI:One API key (fallback provider) |
LLM_PROVIDER | anthropic or asi_one (default: anthropic) |
Pipeline
User Task → Task Analyzer → Context Graph → Context Router
→ Architect / Performance / Verification / Critic Agents
→ Merger Agent → Final Output
Modes
- Baseline: Every agent receives full context
- Relay: Each agent receives targeted context slices
Demo
Default prompt: "Design an AI accelerator for robotics under a 50W power budget."
Click Run Baseline + Relay to compare token usage, cost, and output quality side-by-side.
Pitch
Traditional multi-agent systems send every agent all context. Relay routes only relevant information — lower cost, lower latency, fewer tokens, same output quality.
Analysis
View
Metric
- 2
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
- AnthropicIn code
- CSSIn code
- Next.jsIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
- VercelClaimed
6 of 7 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
95 KB
Source files
35
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Thegreatvegan/final_relay
42 files · 341 KB · @ b5bb7d5
Structure
Interface
16 files · 38%Screens, components and styles rendered to the user.
API & routing
3 files · 7%Request entry points: routes, handlers and controllers.
Application logic
12 files · 29%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
- TypeScript94%
- CSS4%
- Markdown2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 16- @anthropic-ai/sdk
- @xyflow/react
- next
- react
- react-dom
- recharts
- +10 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
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.