Skip to content

Health and readiness ​

Liveness (/up) ​

Laravel’s built-in health route at GET /up confirms the PHP application process is running. It does not verify Postgres or the embedding provider.

Readiness (/health/ready) ​

GET /health/ready

  • No authentication (for load balancers, Forge, Kubernetes).
  • 200 when all checks pass.
  • 503 when any check fails (body includes ready and per-check ok / generic status only).

Response ​

json
{
  "ready": true,
  "checks": {
    "database": { "ok": true, "status": "ok" },
    "embedding": { "ok": true, "status": "ok" }
  }
}

On failure:

json
{
  "ready": false,
  "checks": {
    "database": { "ok": true, "status": "ok" },
    "embedding": { "ok": false, "status": "unavailable" }
  }
}

Public JSON never includes raw exception messages or exception class names. Authenticated MCP openbrain_health and php artisan openbrain:doctor may include a generic diagnostic string such as Embedding provider unavailable.

Checks ​

CheckWhat it verifies
databasePostgres reachable (SELECT 1)
embeddingLaravel AI embedding provider returns a non-empty vector for a short probe string (OPENBRAIN_READINESS_PROBE_TEXT, default openbrain-readiness-check)

Full readiness checks (database + a live embedding probe) are cached for OPENBRAIN_READINESS_CACHE_SECONDS (default 30) on the OPENBRAIN_READINESS_CACHE_STORE store (default file, so probes still work if the database is down). Repeated HTTP or MCP health calls within the TTL reuse the cached result instead of calling the embedding provider again.

MCP ​

openbrain_health runs the same cached checks. MCP requires Bearer authentication on /mcp in production (see authentication.md). The MCP payload may include a generic error string on failed checks; the public HTTP probe does not.