runs in your browserNewton–RaphsonApache-2.0 · zero-dep

How many calls fit in the budget?

Every agent passport carries a GAU balance (a measure, never money). Each tool call is pre-flighted against it — that part is plain O(1) arithmetic. The interesting part: as an agent's context accumulates, each call costs more than the last, so "how many more fit?" is a nonlinear budget equation. This kernel solves cumulative(N) = balance by Newton–Raphson, then snaps to the exact integer. Drag the cost model.

Budget & cost modelkernel source →
0 = flat cost (closed form, no Newton) · >0 = growing cost (Newton)
Affordable horizon (live)

Honest scope. A deterministic, signable governance primitive. The GAU is a measure — EcoCloud meters resource budget, it never moves money. The per-call meter is intentionally plain arithmetic (no theorem needed); Newton–Raphson earns its place only in the nonlinear affordable-horizon (it's the canonical tool for that, and the integer is snapped exact regardless of float drift). Ramanujan's number theory answers a different question ("how many ways to partition a budget"), not this one, so it isn't forced in. The live O(1) per-key meter already exists as the agent_rate_hit RPC (the O(n) audit-counter was retired). Source: flowdesk-meter-kernel.js.