Calibration
The pool concurrency defaults agb ships, where they came from, and how agb probe measures new ones.
agb caps how many agy requests run at once in each quota pool. The caps are measured, not guessed: agb probe fires sentinel prompts at increasing widths and records which widths a pool sustains. The results are committed as reports under docs/calibration/.
Current defaults
These are the defaults in lib/pools.mjs at v1.0.0 (DEFAULT_CAPS):
| Pool | Concurrent requests | Basis (probes-2026-07-14) |
|---|---|---|
gemini-flash | 8 | 8 of 8 succeeded at width 8. |
gemini-pro | 4 | 4 of 4 at width 4. |
claude | 4 | 4 of 4 at width 4. |
gpt-oss | 2 | 2 of 2 at width 2, only 2 of 4 at width 4. |
A plan's caps object is merged over these, per pool (PoolSet). At runtime the caps can shrink further when agy's quota telemetry reports less headroom. The pools are independent: saturating one does not slow another, which is why the router spreads tickets across pools rather than queueing on one. See Pools and tiers.
Probe reports
| Report | Status |
|---|---|
| probes-2026-07-14.md | Current. The numbers behind the defaults above. |
| probes-2026-06-11.md (superseded) | Measured with agy v1.0.7 against the Gemini 3.5 model generation using single samples; the 2026-07-14 report re-measured every pool on agy 1.1.1 and is what the shipped caps follow. |
The 2026-06-11 report is kept unchanged in the repository as a historical record; only this page marks it superseded.
Known issue (T-CODE-FIXES-AUDIT item 5)
File names do not line up. The committed reports are named probes-<date>.md, but agb probe writes probe-<date>.md (singular) (C7), and the comment above DEFAULT_CAPS cites docs/calibration/probe-2026-07-14.md, a file that does not exist (C7). The intended source is probes-2026-07-14.md. Rename new probe output to the probes- form before committing it.
Running a probe
agb probe [widths] [model]
# defaults: widths 2,4,8 and model "Gemini 3.5 Flash (Low)"
agb probe 2,4,8 "Claude Sonnet 4.6 (Thinking)"For each width the probe sends that many concurrent Reply with exactly: PONG-<i> prompts with a 120 s timeout; a request counts as ok only if agy succeeds and the output contains its own sentinel (probe loop). Each row is printed to stdout as JSON: model, width, ok, wall_ms, median_ms, max_ms.
If at least one request succeeded, the rows are appended as a Markdown table to the day's calibration file. If every request failed, nothing is written, so garbage latencies never become calibration data (write guard). A write failure (for example a read-only install prefix) is reported but does not change the exit code.
Known issue (T-CODE-FIXES-AUDIT item 6)
Without AGB_CALIBRATION_DIR, agb probe writes to docs/calibration/ relative to the agb installation, not to your current directory (default dir). For an installed plugin that is inside the plugin directory. Set AGB_CALIBRATION_DIR to choose where the report goes.
When to re-probe
- After an agy upgrade, since server-side limits and retry behavior change between releases.
- When a pool starts producing timeouts or throttling at the default cap.
- When new models appear in
agy models.
To apply new numbers without a release, set caps in your plan. To change the shipped defaults, update DEFAULT_CAPS and commit the probe report that justifies them in the same change.