Skip to content

Introduction

AgentStateRouter is the Agent Execution Optimization Engine (AEOE). It answers a single question: what is the best execution strategy for this task?

It is not just an LLM router. It optimizes for workloads — cost-per-unit-of-work, efficiency score, and your own agent history per task type — not just tokens. Built on the AgentStateGraph substrate so plans, tasks, policies, and scoring history live in one graph.

Today’s routers (LiteLLM, Helicone, etc.) make per-request decisions on flat rules: “send anything tagged code to gpt-5, anything tagged chat to sonnet.” That’s table-stakes plumbing. It does not optimize anything.

AEOE answers a harder question: given this task, this context size, this latency budget, this agent’s prior history, and this policy — which model, with which parameters, gives the best cost-per-unit-of-work? The answer is a routing decision. The decision is a commit in AgentStateGraph. The outcome (cost, latency, quality score) is a commit. The next decision sees both.

The engine is the asset. It ships in three shapes over the same engine:

  1. Suggester (HTTP / JSON-RPC) — pluggable into any product, not in the request path. Ships first.
  2. Proxy facade — OpenAI- and Anthropic-compatible HTTP. Drop-in target for LiteLLM users.
  3. Embedded crate — direct linkage for OpenClaw and other Rust consumers.

Solo / Team / Enterprise. BSL-1.1 across the board.

Pre-alpha. Foundation in flight. See DESIGN.md in the repo for the architecture.