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#

runtime
npm install
npm run dev              # http://127.0.0.1:8787
npm run check && npm test
console (.env.local)
NEXORA_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).

build
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/metrics exposes 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#

VariableDefaultPurpose
PORT / NEXORA_CORE_PORT8787HTTP 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_CONCURRENT8Global scheduler concurrency.
NEXORA_STATE_DIR—Durable file state (executions, events, checkpoints). Production uses Firestore instead.
NEXORA_MOCK—true → fully offline mock runtime.
GOOGLE_CLOUD_PROJECTprojectVertex project.
VERTEX_LOCATIONglobalVertex region (GOOGLE_CLOUD_LOCATION also honoured).
NEXORA_VERTEX_MODELclaude-fable-5-1Platform default model.
VERTEX_MAX_TOKENS4096Max output tokens per call.
NEXORA_CHAT_FALLBACKtrueRetry a Vertex refusal once on the fallback model.
NEXORA_CHAT_FALLBACK_MODELclaude-opus-5Which model that retry uses.
NEXORA_CONTEXT_WINDOWper modelOverride 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 login for 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

Only the runtime talks to Vertex AI. The CLI, the extension, the desktop app and the web apps authenticate to the runtime with a Nexora API key.

Verify a deployment#

smoke
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