A real LangGraph ReAct agent — compiled and executing in this tab, in WebAssembly. Not a recording, not a JS reimplementation: the same StateGraph that runs in CI, picking tools and looping until it can answer.
Ask something. The agent decides which tool to call, sees the result, and decides again — looping agent ⇄ tools until it's done. Every step below is the real trace the graph emitted.
The calculator tool is the agent's most dangerous surface — it takes a string and evaluates it. A naive implementation reaches for eval(), and then anything the agent can be talked into typing becomes code execution. This one walks a parsed AST and permits only arithmetic nodes, so there's nothing to escape into. Try it.
max_steps, so a policy that never decides to stop still terminates. Both are unit-tested — a broken policy that loops forever is an actual test case.An agent is a chatty LLM client: one model call per turn, and multi-step runs repeat near-identical prompts constantly. So this agent points its LLM calls at llm-gateway — the companion project — which then authenticates, caches, retries and cost-accounts every one of them, without the agent knowing any of it happened.
Both projects are running in this one tab. This page installs the gateway's own published wheel — the same artifact its CI ships — so the arrow below isn't a diagram, it's a function call. Ask the same question twice and watch the gateway serve the agent from cache.
LLMPolicy and the model picks tools too, through the same gateway. And if the gateway is unreachable, the policy degrades to composing locally rather than throwing away work the tools already did — that's a tested path.