← All products Execution routing

AgentStateRouter

Optimise cost per unit of work, not cost per token.

Alpha v0.1.0-alpha
// The problem

A task costs $0.02 on the small model and $0.20 on the large one — but the small model needed three attempts and the third was subtly wrong. Token price is a measurable proxy for the wrong thing.

// The premise

The Agent Execution Optimization Engine routes on what actually happened in your workload: completions rather than tokens, efficiency tracked per task type, and budget enforcement that stops runaway retries.

// Capabilities
  • Cost-per-unit-of-work scoring based on successful completions
  • Efficiency score tracked per task type from your own agent history
  • Budget enforcement — circuit breakers, retry limits and fallback chains
  • Policy gate authorising each task before dispatch
  • Three shapes over one engine: suggester, OpenAI/Anthropic-compatible proxy, embedded Rust crate

Not in the request path · every routing decision a commit

// Pairs with
  • ThreadWeaver — turn a model comparison into a standing routing rule
// Licensing

Source-available under BSL-1.1, converting to Apache 2.0 18 months after each version's first publication. Internal use — including in production — is unrestricted.

// The rest of the suite

Built on the same graph.