Inspiration

Every coding agent we've seen sends every task to the same flagship model, whether it's trivial CLI wiring or a genuinely hard algorithm. That's like hiring a senior engineer to rename variables. We wanted to build a loop that actually knows the difference.

Sponsor tech we used

Akash - our Docker sandbox, where every generated code step actually runs and gets tested, is deployed on Akash's decentralized compute network instead of a traditional cloud provider.

Pomerium - sits in front of our FastAPI server, gating access to the sandbox and control endpoints behind zero-trust auth. Since our agents execute arbitrary generated code, securing that runtime wasn't optional, it was core to making the system safe to actually demo.

Cursor - used to build the entire project end-to-end, from the LangGraph state machine to the React dashboard.

What it does

The Yield is a cost-aware multi-agent build system. Give it a spec, and it: Plans: breaks the task into typed steps Routes: a lightweight classifier (GPT-4.1 nano) looks at each step and picks the cheapest model that can actually pass it Codes: implements the step in a sandboxed container Tests: runs real pytest, no LLM required Judges: a Critic scores the result and decides pass or retry

If a step fails on a cheap model, the router escalates to a stronger one automatically. Every routing decision, every dollar spent, and every score is logged live on a dashboard.

How we built it

Anthropic + OpenAI APIs across five models (Claude Sonnet 4.6, Opus 4.6, Opus 4.8, GPT-5, GPT-4.1 mini/nano), each used where it's actually cost-effective LangGraph for the self-correcting state machine: plan, act, observe, retry, escalate FastAPI + WebSocket streaming every agent decision to a live dashboard in real time Docker sandbox for safe, isolated code execution and testing SQLite tracking cost, latency, and pass/fail history per model per step type React dashboard showing the swarm work live: which agent is active, which model got picked, why, and what it cost

Challenges we ran into

Getting the router to actually escalate correctly took real iteration. Early on it would get stuck retrying the same weak model instead of learning from repeated failures. We fixed this by tracking consecutive failures per step type and forcing escalation to a stronger model after two misses.

Accomplishments we're proud of

Real, measured cost savings, not simulated. Routing the same tasks through our cost-aware system versus a naive "always use the flagship model" baseline cut spend significantly while keeping pass rates high (92-100% depending on the model tier), verified live on the dashboard, not estimated after the fact.

What we learned

The cheapest model isn't always the wrong choice, and the most expensive model isn't always the safest one. Most of the value in agent orchestration isn't the agents themselves. It's the routing logic deciding which agent handles what.

What's next for The Yield

Deeper historical learning across task types, more model providers, and exposing the routing engine as a standalone layer other agent frameworks could plug into directly.

Built With

Share this project:

Updates