Pools and tiers
Quota pools, tier candidates, per-pool caps and prosecutor mapping
Antigravity meters models in independent quota pools. agb keeps a semaphore per pool and routes each ticket to the least-loaded pool that can serve its tier, so a run spreads load across pools instead of queueing on one (lib/pools.mjs).
Two levels of pools
Every model belongs to one model pool, and every model pool belongs to one upstream quota family. A slot is granted only when both have room (lib/pools.mjs).
| Model pool | Models | Upstream family | Default cap |
|---|---|---|---|
gemini-flash | gemini-3.8-flash-{low,medium,high} | gemini | 8 |
gemini-pro | gemini-4-argon-{low,medium,high} | gemini | 4 |
claude | claude-sonnet-5-5-{low,medium,high}, claude-opus-5-5-{low,medium,high} | claude_gpt | 4 |
gpt-oss | gpt-oss-120b-medium | claude_gpt | 2 |
Model lists (MODELS, TIER_CANDIDATES, PROSECUTORS, and PROSECUTOR_CANDIDATES are centralized in lib/models.mjs and re-exported by lib/pools.mjs and lib/agy.mjs): lib/agy.mjs. Default per-pool caps (DEFAULT_CAPS): lib/pools.mjs. Family mapping: lib/pools.mjs.
Upstream family (BASE_CAPS key) | Matches /quota pool | Base cap |
|---|---|---|
gemini | "Gemini Models" | 12 |
claude_gpt (alias claude-gpt) | "Claude and GPT models" | 4 |
Base family caps: lib/pools.mjs.
Caps scale with live quota
Before planning or running, agb probes agy -p /quota --output-format json (lib/pools.mjs). Each family's cap then scales with the lower of its remaining five-hour and weekly percentages (lib/pools.mjs, lib/pools.mjs), and each model pool's cap becomes the smaller of its default cap and its family's scaled cap (lib/pools.mjs):
| Remaining quota | Family cap |
|---|---|
| 50% or more | base cap |
| 25% to 49% | half the base cap (rounded down) |
| 10% to 24% | 1 |
| under 10% | 0 (dispatch waits for the reset) |
If telemetry is unavailable, agb plan and agb run stop rather than guess; a failed refresh trips a circuit breaker that suspends dispatch (lib/pools.mjs).
Tiers
A ticket's tier (default mid) picks a candidate list. Candidates are listed cheapest first and may span pools, which lets the router pick the least-loaded one (lib/pools.mjs).
| Tier | Candidates (TIER_CANDIDATES) |
|---|---|
cheap | gemini-3.8-flash-low, gemini-3.8-flash-medium |
mid | gemini-3.8-flash-high, gemini-4-argon-low, claude-sonnet-5-5-medium |
frontier | gemini-4-argon-high, claude-sonnet-5-5-high, claude-opus-5-5-high |
route() prefers candidates whose pool and family both have capacity, then picks the one with the lowest reserved-to-cap ratio (lib/pools.mjs).
pool_hint
C4 A ticket may set pool_hint to one of gemini, claude, claude-gpt, gpt-oss or auto. Any other value fails plan validation. The hint filters the tier's candidates by model family (lib/pools.mjs):
pool_hint | Keeps candidates whose family is | Tiers with candidates |
|---|---|---|
auto or unset | any | all |
gemini | gemini | all |
claude | claude | mid, frontier |
claude-gpt | claude or gpt-oss | mid, frontier |
gpt-oss | gpt-oss | none |
A tier and hint combination that leaves no candidate fails validation with no model candidates for tier ... with pool_hint ... (lib/plan.mjs), so it is caught at plan time instead of mid-run. Because no tier lists gpt-oss-120b-medium, pool_hint: "gpt-oss" is accepted by the enum but always fails this check; the gpt-oss pool is used for prosecution, not building.
Prosecutor mapping
The prosecutor always comes from a different family than the builder (lib/pools.mjs).
| Builder family | Preferred prosecutor | Fallbacks, in order |
|---|---|---|
gemini | gpt-oss-120b-medium | claude-sonnet-5-5-medium |
claude | gemini-4-argon-high | gemini-3.8-flash-high, gpt-oss-120b-medium |
gpt-oss | gemini-4-argon-high | gemini-3.8-flash-high, claude-sonnet-5-5-medium |
C20 Gemini builders are prosecuted by gpt-oss-120b-medium; Claude and gpt-oss builders by gemini-4-argon-high. prosecutorFor takes the first candidate whose pool and family have capacity (lib/pools.mjs). See Prosecution.
Calibration probes behind these caps are listed on the calibration page. Draining a pool during a run is covered in Operating tips.