Skip to content
How it works

An intelligence resource manager.

Routing, fallback and delegation are primitives Leverage uses. None of them is the product. The product is the layer that decides what work exists, who should do it, what it may cost, and whether the output is true.

Four layers

Host model
Claude · Codex · Kimi · Cursor

Strategy. Called once for intent, not for every unit of work. Calling it for everything is the problem this exists to solve.

Leverage
the control plane

Owns the task graph, the auction, the budget policy, the context each worker receives, and the verification of whatever comes back.

RocketRide
the execution fabric

How a worker actually runs. Pipelines, traces, token accounting. Leverage never re-implements any of it.

Compute pool
Ollama · free routes · your seat

The models themselves. Discovered, health-checked and ranked, never hard-coded.

One task, start to finish

01 · Compile

A sentence becomes a validated MissionSpec. Budget and privacy are parsed here, with no model call, because policy must not depend on an LLM.

02 · Plan

A task graph, cycle-checked before anything executes. A planner is untrusted; its output is a proposal until it survives validation.

03 · Filter

Hard eligibility. A paid model at $0 is removed from the pool, not out-ranked. If policy were a weight, a good enough score could buy past it.

04 · Hire

Survivors are scored on task fit, measured reputation, context headroom, availability and latency. The winner is shown with its reasoning.

05 · Compile context

Writable scope, the tests it must satisfy, what its dependencies actually produced, and its own failure history. Nothing else.

06 · Execute

A RocketRide pipeline for cloud workers; a direct call for local ones. Both real; only the fabric differs.

07 · Verify

A compiler, a test runner or the filesystem. Model self-confidence is recorded separately and weighted least.

08 · Recover

On failure, keep the understanding and replace the worker. A checkpoint carries decisions and remaining work, never the transcript.

09 · Learn

The outcome becomes an observation. Rates are shrunk toward a prior so two runs can never read as certainty.

The invariants

These are the properties the product’s claims rest on. If one fails, something in the copy has become a lie. So each is asserted in tests/invariants.test.ts rather than merely intended.

84 tests, run with npm run test
no task runs before every dependency has PASSED
a failed dependency blocks permanently, it is not retried forever
a hard budget cannot be overshot, including by concurrent reservations
a paid model is INELIGIBLE at $0, not merely out-ranked
a checkpoint is materially smaller than the context it replaces
a credential never reaches the event log, by value shape or key name
a path that escapes the repository is refused
a model with one observation never reports a confident success rate

Why policy runs before scoring

The single most important ordering decision in the system. A paid model under a $0 budget is removed from the pool entirely and displayed struck out with the reason, never scored down and left competing. If policy were a weight, a sufficiently good score could buy past it, and “zero means zero” would be a preference rather than a guarantee.

The budget governor reinforces it from the other side: workers run concurrently, so headroom is reserved before a call rather than checked. Without that, four workers each ask “is there $0.05 left?” simultaneously and all four proceed.

Infrastructure failure is not the model's fault
A model that returns malformed output or fails tests is barred from that task. A model that hits a 429 or a timeout goes on a one-auction cooldown and can be hired again. Before that distinction existed, a single injected rate limit permanently benched the strongest candidate and the task failed on weaker workers. That bug only surfaced by watching a real run.

Context is compiled, not dumped

The economics only work if workers are cheap, and workers are only cheap if they are not handed the whole repository. A worker receives its writable file scope, the read-only files it must satisfy, the actual output of completed dependencies, and its own failure history.

This was learned the hard way. The first implementation gave workers only their write scope, so every model was guessing the API contract of files it could not see. Adding read-only references took the benchmark from 0/4 to 2/4; adding dependency outputs took it from 2/4 to 4/4.