A lightweight FastAPI service that exposes a simple status dashboard and REST API for iterative agent workflows.
An external agent can poll /status to check whether work is pending / succeeded / failed and retrieve context for corrective actions.
The core motivation is human-in-the-loop control: by requiring an agent to check a gate before proceeding, you prevent it from going off course and wasting tokens on work that hasn't been approved or that needs redirection. The human sets the state; the agent only acts when explicitly told to.
- Web UI – live-updating dashboard with status badge, context, and full history
- REST API –
GET /statusandPOST /statuswith JSON payloads - Agent-friendly –
retry_afterfield and polling-ready design - In-memory store – zero external dependencies; perfect for ephemeral workflows
- Single-file binary – build a self-contained Linux executable with
make build
make run # creates .venv, installs deps, starts the serverOpen http://localhost:8000 in your browser.
make build
./dist/statusgateThe Makefile handles everything — Python venv creation, dependency installation, and PyInstaller bundling — without touching your system Python.
| Target | Description |
|---|---|
make / make all |
Build the binary (default) |
make install |
Create .venv and install dependencies |
make run |
Run the server directly via the venv |
make build |
Produce dist/statusgate (single-file executable) |
make clean |
Remove build artefacts, keep .venv |
make distclean |
Remove build artefacts and .venv |
make help |
Print target descriptions |
Requirements: Python 3.9+ available as
python3. Override withmake PYTHON=python3.11 build.
Returns the current status entry.
Update the status and context.
// Request body
{
"status": "success",
"context": "All checks passed."
}Returns the new status entry (HTTP 201).
Returns all previous entries (oldest first).
{ "history": [ { "status": "...", "context": "...", "timestamp": "..." }, ... ] }import time, requests
URL = "http://localhost:8000/status"
while True:
data = requests.get(URL).json()
if data["status"] != "pending":
print("Done:", data["status"], data["context"])
break
time.sleep(data.get("retry_after", 5))statusgate/
├── server.py # FastAPI application (single script)
├── Makefile # Build / run targets (Linux)
├── build.ps1 # Build script (Windows / PowerShell)
└── README.md
{ "status": "pending", // "pending" | "success" | "failure" "context": "awaiting deploy", "timestamp": "2026-04-01T18:00:00Z", "last_updated": "2026-04-01T18:00:00Z", "retry_after": 5 // suggested polling interval (seconds) }