This project exposes a FastAPI application for controlling simulations, running benchmarks, and streaming realtime events.
- One-click (Docker + Nginx proxy): http://localhost:8080
- API is proxied under
/api/... - Swagger UI is proxied at
/docs
- API is proxied under
- Direct API (uvicorn): http://localhost:8000
When docs are not gated:
- Swagger UI:
/docs - ReDoc:
/redoc - OpenAPI JSON:
/openapi.json
Docs gating:
- In protected environments (staging/production), the app factory disables
/docs,/redoc, and/openapi.json. - In development, you can still enable gating with
AUTH_ENABLED=trueandAUTH_PROTECT_DOCS=true.
The API supports RS256 JWT verification when enabled.
Enable auth:
AUTH_ENABLED=true- Provide at least one public key via
AUTH_JWT_PUBLIC_KEY,AUTH_JWT_PUBLIC_KEYS, orAUTH_JWT_PUBLIC_KEY_FILE
Development bypass:
AUTH_TEST_BYPASS=true(intended for local/testing only)
Important notes:
- Health endpoints are intended to remain unprotected.
- If
AUTH_ENABLED=trueand no public key is configured, the app fails fast at startup.
This list is intentionally high-level; use Swagger/OpenAPI for the canonical schema.
- Health:
GET /healthGET /api/v1/health
- Simulation:
POST /api/v1/simulation/...GET /api/v1/simulation/...
- Experiments:
GET /api/v1/experimentsPOST /api/v1/experiments
- Agents:
GET /api/v1/agents
- Scenarios:
GET /api/v1/scenarios
- Leaderboard:
GET /api/v1/leaderboard- Public snapshot routes under
/api/v1/public/...
- Benchmarks:
- Routes are mounted under
/api/v1/benchmarks/...
- Routes are mounted under
- Metrics (Prometheus-style):
GET /api/metrics
- Golden Masters:
- Routes are mounted under
/api/v1/golden/...
- Routes are mounted under
- War Games (experimental):
- Routes are mounted under
/api/v1/wargames/...(see note below)
- Routes are mounted under
Endpoints:
ws://HOST:PORT/ws/realtime- Back-compat alias:
ws://HOST:PORT/ws/events
Typical usage:
- Connect to
/ws/realtime - Subscribe to topics (JSON frames)
- Receive events as the simulation runs
The codebase includes a /api/v1/wargames route group (src/fba_bench_api/api/routes/wargames.py).
Treat it as experimental until it is fully aligned with the production service wiring.
See: docs/api/extra_endpoints.md
Most errors follow FastAPI conventions:
{"detail": "..."}- Validation errors use the standard 422 response body.
Health:
curl -sS http://localhost:8080/api/v1/healthHealth (Windows PowerShell):
curl.exe -sS http://localhost:8080/api/v1/healthFetch OpenAPI (when not gated):
curl -sS http://localhost:8000/openapi.json > openapi.jsonThe static docs site references JSON snapshot files under docs/api/:
docs/api/leaderboard.jsondocs/api/leaderboard_agentic.jsondocs/api/top10.jsondocs/api/top10_agentic.jsondocs/api/live.json
Additional snapshot files may be generated by workflows/scripts depending on which benchmark modes are published.
These files are generated by workflows/scripts (for example generate_github_pages.py, scripts/batch_runner.py,
scripts/sim_theater_demo.py) and should not be treated as hand-maintained documentation.
See also:
docs/api/routes_catalog.mddocs/api/extra_endpoints.md