Skip to main content

Worker configuration

A worker is the machine that runs agent jobs and exposes a worker-gate API to the control plane. In local development, the control and worker roles can point at the same 127.0.0.1:8787 app. For current runtime topology and worker-gate boundaries, see current runtime snapshot.

Connection fields

  • worker_wake_gate_url — base URL for the worker-gate API. The field name remains for compatibility.
  • worker_wake_gate_bearer_token — bearer token the control plane uses when calling the worker.
  • worker_targets — named worker endpoints with per-target URLs, tokens, roles, and optional memory floors.
  • workload_machine_targets — maps workload classes such as cpu_only and gpu_required to a worker_targets key.
For local development, set both worker_wake_gate_url and completion_callback_url to the local service. For production with multiple workers, configure worker_targets and route dispatches through workload_machine_targets or explicit machine_target in preflight requests.

Evidence sync fields

  • paper_evidence_sync_enabled
  • paper_evidence_sync_ssh_host
  • paper_evidence_sync_remote_root
  • paper_evidence_sync_timeout_sec
Enable evidence sync only after you know the control service user can read the worker project artifacts it needs. If sync fails or artifacts are missing, generated paper records should be treated as incomplete.

Stale-process reaper fields

  • stale_project_process_reaper_enabled
  • stale_project_process_grace_sec
  • stale_project_process_term_grace_sec
  • stale_project_process_command_markers
Default markers include common local inference/server commands such as llama-cli, llama-server, vllm, and sglang. Keep markers specific to avoid terminating unrelated processes.

Minimal worker run

scripts/install-worker.sh
ENOCH_CONFIG=$HOME/.config/enoch-worker/config.json \
  uv run uvicorn enoch_control_plane.app:app --host 0.0.0.0 --port 8787

Verify from the control VM

curl -fsS -H "Authorization: Bearer $ENOCH_CONTROL_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"wake_gate_url":"http://<worker>:8787","bearer_token":"<worker-token>","require_paused":false,"strict":false}' \
  "$ENOCH_BASE_URL/control/api/preflight" | python3 -m json.tool