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) |
Point your coding agent or gh CLI at ghpool by setting the GitHub API base URL:
export GITHUB_API_URL=${GHPOOL_BASE_URL}
export GITHUB_GRAPHQL_URL=${GHPOOL_BASE_URL}/graphql
For writes that need auth attribution, the agent still uses its own GH_TOKEN / GITHUB_TOKEN as normal — ghpool only intercepts the network path, not the credentials.
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.