Deploy the analyzer worker
The worker is the instruction-hub-worker service (Python package instruction_hub_worker) that runs in your own infrastructure. It accepts trace uploads from your enrolled hosts, stores them in storage you own, and runs the Friction Analyzer. Its container image runs the instruction-hub-worker serve command and listens on port 8080.
Prerequisites
Section titled “Prerequisites”Before you deploy, have the following ready:
- A Postgres database you control, for trace and host metadata.
- An S3 bucket you control, for raw traces and canonical trace objects.
- A worker install token (a
plih_token) that authenticates your deployment to hosted Promptless.
Deploy with Helm
Section titled “Deploy with Helm”The worker ships a Helm chart at charts/instruction-hub-worker/. The chart renders a deployment, a service, an optional gateway ingress, a database migration job, a secret, and a service account.
-
Obtain the worker image. The image is built from a two-stage
python:3.11-slimbase and exposes port 8080. Push it to a registry your cluster can pull from, or pull the published image directly. -
Provide configuration as a secret. Supply the required environment variables — including your install token and Postgres connection string — through the chart’s secret. See Required configuration.
-
Grant the worker access to your S3 bucket. Set
serviceAccount.annotationsso the pod assumes an AWS IAM role through IRSA (IAM Roles for Service Accounts) and can write to your bucket. -
Install the chart. Point Helm at your values file.
Terminal window helm upgrade --install instruction-hub-worker \./charts/instruction-hub-worker \--namespace instruction-hub \--create-namespace \-f values.yaml -
Expose the service. The service is
ClusterIPby default. To reach it from your hosts through an ingress, setgateway.enabled=trueto render one.
Required configuration
Section titled “Required configuration”The worker is configured entirely through environment variables. At a minimum, set:
INSTRUCTION_HUB_RUNTIME_BASE_URLandINSTRUCTION_HUB_INSTALL_TOKEN— how the worker reaches and authenticates to hosted Promptless.INSTRUCTION_HUB_DEPLOYMENT_NAME,INSTRUCTION_HUB_DEPLOYMENT_INSTANCE_ID, andINSTRUCTION_HUB_CONFIG_HASH— how the deployment identifies itself.INSTRUCTION_HUB_CUSTOMER_POSTGRES_DSNandINSTRUCTION_HUB_TRACE_OBJECT_S3_BUCKET— your database and bucket.
To turn on analysis, you also set the INSTRUCTION_HUB_ANALYSIS_* variables, including the model provider the Friction Analyzer sends its analysis input to. For every variable and how the analysis knobs fit together, see Configuration reference. For how the worker emits traces once it is running, see Observability.