Platform reference
Deploy & operate
Nexora Core is a single Node service with pluggable state. Run it locally, ship the container to Cloud Run, or run it on Kubernetes with autoscaling — the same image, configured by environment.
Local development#
npm install
npm run dev # http://127.0.0.1:8787
npm run check && npm testNEXORA_CORE_URL=http://127.0.0.1:8787
# optional: a key the proxy injects for server-side calls
NEXORA_API_KEY=…Point the CLI at it with --base-url http://127.0.0.1:8787 or NEXORA_BASE_URL. Set NEXORA_MOCK=true for a fully offline runtime in CI.
Container#
The Dockerfile builds the runtime image with the default model pinned by build argument and the assets the document tools need (fonts included — without them PDF generation fails silently).
docker build --build-arg VERTEX_MODEL=claude-fable-5-1 -t nexora-core .Cloud Run#
deploy/cloudbuild.yaml builds and deploys on push; the _VERTEX_MODEL substitution sets the default model. The Cloud Run service binds NEXORA_API_KEY from Secret Manager and uses the service account’s identity for Vertex AI — no key files in the image. Production uses the Firestore state store; the service is stateless across revisions.
Kubernetes#
deploy/k8s holds a Deployment, Service, ConfigMap and a KEDA ScaledObject that scales on queue depth. Set the same environment in the ConfigMap; put the API key and any Google credential in a Secret.
Observability#
GET /api/v1/metricsexposes Prometheus metrics: scheduler depth, executions by state, latencies, model calls, policy health and trajectory capture rates.- The repository ships alerting rules (runtime SLA, capacity, policy health, flywheel data) and Grafana dashboards under
deploy/observability. - Every lifecycle event is also available over SSE and webhooks for your own pipeline.
Environment#
| Variable | Default | Purpose |
|---|---|---|
PORT / NEXORA_CORE_PORT | 8787 | HTTP port. |
NEXORA_API_KEY | — | When set, /api/v1 requires a key. Always set it outside local dev. |
NEXORA_REQUIRE_AUTH | — | Require an authenticated principal on chat routes; no proxy-key fallback. |
NEXORA_MAX_CONCURRENT | 8 | Global scheduler concurrency. |
NEXORA_STATE_DIR | — | Durable file state (executions, events, checkpoints). Production uses Firestore instead. |
NEXORA_MOCK | — | true → fully offline mock runtime. |
GOOGLE_CLOUD_PROJECT | project | Vertex project. |
VERTEX_LOCATION | global | Vertex region (GOOGLE_CLOUD_LOCATION also honoured). |
NEXORA_VERTEX_MODEL | claude-fable-5-1 | Platform default model. |
VERTEX_MAX_TOKENS | 4096 | Max output tokens per call. |
NEXORA_CHAT_FALLBACK | true | Retry a Vertex refusal once on the fallback model. |
NEXORA_CHAT_FALLBACK_MODEL | claude-opus-5 | Which model that retry uses. |
NEXORA_CONTEXT_WINDOW | per model | Override the context-window gauge denominator. |
NEXORA_MAX_BODY_BYTES | — | Raise the request body cap for large attachments. |
NEXORA_SKILLS_DIRS | — | Extra directories of SKILL.md to register at boot. |
Vertex AI credentials
Provide Google credentials by exactly one of:
GOOGLE_APPLICATION_CREDENTIALS— path to a service-account key file.- Application Default Credentials —
gcloud auth application-default loginfor local dev, or the attached service account on Cloud Run and GKE. GOOGLE_APPLICATION_CREDENTIALS_JSON— inline key contents for serverless hosts.
Clients never need cloud credentials
Verify a deployment#
curl -s $RUNTIME/api/v1/health -H "x-api-key: $KEY" | jq .status # "ready"
curl -s $RUNTIME/api/v1/chat/models -H "x-api-key: $KEY" | jq .defaultModel
curl -s $RUNTIME/api/v1/metrics -H "x-api-key: $KEY" | head