Skip to content

Worker Configuration

Environment Variables

VariableDefaultDescription
WORKER_PORT50052gRPC server port
TEMPORAL_HOSTlocalhost:7233Temporal server address
TEMPORAL_NAMESPACEdefaultTemporal namespace
CU_BRAIN_GRPC_URLlocalhost:50051ContextBrain gRPC address
WORKER_ENGINEtemporalExecution backend (temporal or huey)
WORKER_MODULESExtra worker module import paths
WORKER_INSTANCE_NAMEdefaultService discovery instance name
WORKER_TENANTSComma-separated tenant list for discovery

Running

Terminal window
# 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 modules
uv run python -m contextunity.worker --temporal --modules orchestrator

Prerequisites

  • Temporal Server running locally or in the cloud
  • ContextBrain service when your workflows depend on Brain-backed helpers

Quick Temporal Setup

Terminal window
# Start Temporal dev server
temporal server start-dev
# Temporal UI available at http://localhost:8233