Deployment modes
Horizons supports two practical starting points:-
Dev mode (fastest): use
horizons_rsdev backends.- No external services required.
- Intended for local development and integration tests.
-
Production wiring (recommended for real deployments): build a small binary that wires
horizons_coreimplementations together.- You run and operate the backing services (Postgres, Redis, S3/MinIO, Helix).
- You choose your auth model at the edge.
As of Horizons v0.0.6,
horizons_rs ships a dev server entrypoint. Production deployments typically create a tiny binary that constructs horizons_rs::server::AppState using horizons_core implementations.Resources required (production wiring)
Horizons is a protocol and a set of traits; the concrete implementations use common infrastructure. Required for the default OSS stack:- Postgres: Central DB and Event Store
- Redis: cache and Event Sync router wakeups
- S3-compatible object store: filestore (S3 or MinIO)
- Helix: graph store (HTTP)
- Disk: per-project databases via local
libsql(or wire a remote libsql/Turso handle if you prefer)
- Memory: Voyager backends (graph + vector + summarization)
- Optimization: MIPRO batch optimization
- Evaluation: RLM reward verification
Dev mode quickstart
From theHorizons/ repo:
x-org-id header:
Production wiring walkthrough
Thehorizons_rs crate defines the HTTP API surface and routing. It accepts an AppState built from trait objects.
You can create a tiny binary (in your own repo) that:
- Loads
OnboardConfigfrom env - Connects to Postgres, Redis, S3/MinIO, Helix
- Boots the Event Sync bus
- Boots Context Refresh and Core Agents
- Serves the API via
horizons_rs::server::serve
Environment variables
The defaulthorizons_core::onboard::config::OnboardConfig::from_env() reads:
-
HORIZONS_CENTRAL_DB_URL -
HORIZONS_CENTRAL_DB_MAX_CONNECTIONS(optional; default 10) -
HORIZONS_CENTRAL_DB_ACQUIRE_TIMEOUT_MS(optional; default 5000) -
HORIZONS_PROJECT_DB_ROOT_DIR(optional; default./data/project_dbs) -
HORIZONS_S3_BUCKET -
HORIZONS_S3_REGION(optional; defaultus-east-1) -
HORIZONS_S3_ENDPOINT(optional; use for MinIO) -
HORIZONS_S3_ACCESS_KEY_ID -
HORIZONS_S3_SECRET_ACCESS_KEY -
HORIZONS_S3_PREFIX(optional) -
HORIZONS_REDIS_URL -
HORIZONS_REDIS_KEY_PREFIX(optional) -
HORIZONS_HELIX_URL(optional; defaulthttp://localhost:6969) -
HORIZONS_HELIX_API_KEY(optional) -
HORIZONS_HELIX_TIMEOUT_MS(optional; default 10000)
- Postgres URL (can be the same as Central DB)
- Redis URL (can be the same as Cache)
Minimal Docker Compose (example)
This is a minimal example for local production-like wiring. Adjust ports, credentials, and persistence.Helix is a separate service. Run your chosen Helix deployment and set
HORIZONS_HELIX_URL (and optionally HORIZONS_HELIX_API_KEY).Wiring example (Rust)
This snippet shows the shape of a production server. You can embed it in your own binary crate.The example above demonstrates wiring shape and boundaries. In production you should:
- Implement a real
VectorStorefor your stack. - Enforce auth and tenant routing at the edge (map users to
x-org-id). - Run migrations for the Central DB and Event Store during deployment.