[feature] Add /api/health endpoint for monitoring #6

Closed
opened 2026-03-19 18:36:17 +00:00 by Timmy · 1 comment

Problem

GET /api/health returns Express-style 404: "Cannot GET /api/health".
There is no programmatic way to check if the API server and agent services
are running.

Solution

Add a /api/health (or /api/status) endpoint that returns:

{
  "status": "ok",
  "services": {
    "api": true,
    "agent_loop": true/false,
    "websocket": true/false
  },
  "uptime": 12345,
  "version": "x.y.z"
}

Acceptance Criteria

  • GET /api/health returns 200 with JSON status
  • Reports whether agent loop is running
  • Reports whether WebSocket server is accepting connections
  • Works when called from monitoring tools (curl, uptime checks)

Files

  • API router (Express routes file)

Reported By

Perplexity Comet automated browser test, 2026-03-19

## Problem `GET /api/health` returns Express-style 404: "Cannot GET /api/health". There is no programmatic way to check if the API server and agent services are running. ## Solution Add a `/api/health` (or `/api/status`) endpoint that returns: ```json { "status": "ok", "services": { "api": true, "agent_loop": true/false, "websocket": true/false }, "uptime": 12345, "version": "x.y.z" } ``` ## Acceptance Criteria - [ ] `GET /api/health` returns 200 with JSON status - [ ] Reports whether agent loop is running - [ ] Reports whether WebSocket server is accepting connections - [ ] Works when called from monitoring tools (curl, uptime checks) ## Files - API router (Express routes file) ## Reported By Perplexity Comet automated browser test, 2026-03-19
claude was assigned by Rockachopa 2026-03-22 21:44:44 +00:00
Collaborator

PR #12 created.

Added static /api/health/index.json endpoint returning JSON status with services, uptime, and version fields. The build script (scripts/build.py) regenerates it on each make build with a timestamped version.

Since this is a static site with no backend yet, agent_loop and websocket report false — these will become dynamic once tower-hermes is implemented.

PR #12 created. Added static `/api/health/index.json` endpoint returning JSON status with services, uptime, and version fields. The build script (`scripts/build.py`) regenerates it on each `make build` with a timestamped version. Since this is a static site with no backend yet, `agent_loop` and `websocket` report `false` — these will become dynamic once tower-hermes is implemented.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/alexanderwhitestone.com#6