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-4-hydrogen-{low,medium,high,xhigh} | gemini | 8 |
gemini-pro | gemini-4-neon-{low,medium,high,xhigh}, gemini-4-carbon-{low,medium,high}, gemini-pro-orchestrator-neon, gemini-pro-orchestrator | gemini | 4 |
claude | claude-sonnet-5-5-{low,medium,high}, claude-opus-5-5-{low,medium,high} | claude_gpt | 4 |
gpt-oss | (empty post-Nov-30; retained for custom/legacy compatibility) | 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" / "Claude Models" / "Anthropic Models" (or 0 / unavailable on single-group Gemini-only plans) | 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-4-hydrogen-low, gemini-4-hydrogen-medium |
mid | gemini-4-hydrogen-high, gemini-4-neon-low, gemini-4-neon-medium, gemini-4-carbon-medium, claude-sonnet-5-5-medium |
frontier | gemini-pro-orchestrator-neon, claude-sonnet-5-5-high, gemini-pro-orchestrator, gemini-4-neon-high, gemini-4-carbon-high, claude-opus-5-5-high |
gemini-pro-orchestrator-neon and gemini-pro-orchestrator (Carbon) sit in TIER_CANDIDATES.frontier interleaved with claude candidates so frontier runs spread load across gemini-pro and claude pools; they remain excluded from cheap/mid builder tiers and all prosecutor/role tables (and never receive --effort, as Orchestrator uses a fixed reasoning budget in the CLI). When an operator opts out via AGB_DISABLE_ORCHESTRATOR=1 or plan.disableOrchestrator: true, frontier routing falls back to FRONTIER_NO_ORCHESTRATOR (gemini-4-neon-high, claude-sonnet-5-5-high, gemini-4-carbon-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.
Prosecutor mapping
The prosecutor prefers a different family than the builder whenever cross-family quota is available, and falls back to a distinct fresh-context same-family model (same-family-fallback recorded in .adlc/manifest.jsonl) when the opposite upstream quota pool has 0 capacity (lib/pools.mjs).
| Builder family | Preferred prosecutor | Cross-family fallbacks | Zero-Claude / Same-family fallbacks |
|---|---|---|---|
gemini | claude-sonnet-5-5-high | claude-sonnet-5-5-medium, claude-sonnet-5-5-high, claude-opus-5-5-high | gemini-4-carbon-high (for Neon), gemini-4-neon-high (for Hydrogen/Carbon), gemini-4-hydrogen-high |
claude | gemini-4-neon-high | gemini-4-neon-high, gemini-4-carbon-high, gemini-4-hydrogen-high | claude-sonnet-5-5-high (for Opus), claude-opus-5-5-high (for Sonnet) |
C20 Gemini builders are prosecuted by Claude 5.5 when claude capacity is positive (falling back to a distinct Gemini model on Free/Plus/Pro-Trial or depleted Claude windows); Claude builders are prosecuted by gemini-4-neon-high (gemini-4-carbon-high, gemini-4-hydrogen-high). prosecutorFor takes the first cross-family candidate whose pool and family have capacity, then consults sameFamilyProsecutorsFor (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.