GitHub API proxy that pools multiple PATs for shared rate-limit budget, caches read responses in memory, and passes mutations through with the client's own auth — built for multi-agent setups (OpenAB, OpenClaw, custom coding agents) sharing the same repos.

ghpool is a GitHub API proxy designed for multi-agent setups where several coding agents (OpenAB bots, OpenClaw workers, custom agents) share the same repos and burn through GitHub's per-token rate limits.
It does three things:
Authorization header and are forwarded with that token, so GitHub's audit log still shows which agent did the writeThis template deploys ghpool as an internal-only service:
Sibling services connect using these environment variables (auto-exposed):
| Variable | Value |
|---|---|
GHPOOL_HOSTNAME | container hostname (e.g. ghpool.zeabur.internal) |
GHPOOL_BASE_URL | full base URL (e.g. http://ghpool.zeabur.internal:8080) |
How to route a client through ghpool depends on what it is:
Coding agents (Claude Code, Codex, custom agents): most honor GITHUB_API_BASE to override the GitHub API endpoint.
export GITHUB_API_BASE=${GHPOOL_BASE_URL}
gh CLI: use the ghp shim that ships with ghpool — a drop-in replacement that routes reads through ghpool and writes through real gh. Plain gh does not fully honor base-URL overrides (built-ins like gh issue list use GraphQL internally and bypass them); ghp is the reliable path.
Direct HTTP:
curl ${GHPOOL_BASE_URL}/repos/owner/repo
Writes always require the client's own Authorization header — ghpool never injects one for mutations, so the GitHub audit log still shows which agent did the write.
The template seeds the pool with one PAT (GHPOOL_PAT_DEFAULT). To add more:
GHPOOL_PAT_<ID> (e.g. GHPOOL_PAT_BOT_CLAUDE, GHPOOL_PAT_BOT_CODEX) with the PAT as the value — the <ID> becomes the identity name reported by /statsAny environment variable matching the GHPOOL_PAT_* prefix is auto-discovered.
| Path | Purpose |
|---|---|
GET /<github-api-path> | Proxied GitHub REST API GET (pooled + cached) |
POST /graphql | GraphQL — queries pooled+cached, mutations passthrough with client auth |
GET /healthz | Health check |
GET /stats | Pool budgets, cache hit rates, per-identity stats |
GHPOOL_ALLOWED_OWNERS is enforced: requests to any org/user not in this list return 403, so a leaked PAT only exposes the repos you explicitly listedAuthorization header from the client (no auth = 401), so the proxy can't be used as an anonymous write gatewayghpool is a single Rust binary (distroless image) — extremely lightweight. Memory is dominated by the in-memory cache (max 10000 entries by default). If you proxy a very high request volume, increase RAM accordingly.