Worker Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
WORKER_PORT | 50052 | gRPC server port |
TEMPORAL_HOST | localhost:7233 | Temporal server address |
TEMPORAL_NAMESPACE | default | Temporal namespace |
CU_BRAIN_GRPC_URL | localhost:50051 | ContextBrain gRPC address |
WORKER_ENGINE | temporal | Execution backend (temporal or huey) |
WORKER_MODULES | “ | Extra worker module import paths |
WORKER_INSTANCE_NAME | default | Service discovery instance name |
WORKER_TENANTS | “ | Comma-separated tenant list for discovery |
Running
# Mode 1: gRPC service (receives workflow triggers)uv run python -m contextunity.worker
# Mode 2: Temporal worker (executes workflows)uv run python -m contextunity.worker --temporal
# Mode 2 with specific modulesuv run python -m contextunity.worker --temporal --modules orchestratorPrerequisites
- Temporal Server running locally or in the cloud
- ContextBrain service when your workflows depend on Brain-backed helpers
Quick Temporal Setup
# Start Temporal dev servertemporal server start-dev
# Temporal UI available at http://localhost:8233