Deployment¶
Operonx ships a Python FastAPI server (operonx[serve]).
Python: operonx[serve]¶
from operonx.serve import build_app
from operonx.core import Operon
app = build_app(engine_factory=lambda: Operon(my_graph))
Run with uvicorn:
Endpoints:
POST /run— synchronous run, returns the final state.POST /stream— server-sent events stream of frames.GET /healthz— readiness probe.
For a static-binary edge deployment, the
operonx-rs crate ships
an equivalent Axum server (operonx-serve binary) that reads the same
graph.json and resources.yaml.
Configuration¶
The server honours the standard Operonx setup:
.envfor credentials.resources.yamlfor model and consumer configs.bootstrap()at startup.
For Kubernetes / containerised deployments, mount resources.yaml and
provide credentials through the platform's secret store rather than a
file-based .env.
Production checklist¶
- Configure a persistent path for the local trace consumer (or skip it and use Langfuse / OTEL).
- Cap concurrent requests via uvicorn
--limit-concurrency. - Wire health checks:
/healthzreturns 200 once the engine is built and the resource hub is loaded. - Pin model versions in
resources.yaml— never referencelatest. - Watch the Tracing backend for token-cost and latency drift.
Where to go next¶
- Architecture overview — internals.