Host Agent¶
GPU owners run the host agent to sell compute capacity to the broker.
Start an agent against a local broker:
BROKER_URL=http://127.0.0.1:8000 python -m host_agent.agent
Start against a deployed broker with a pre-issued token:
BROKER_URL=https://broker.example.com \
HOST_TOKEN=host-token-value \
python -m host_agent.agent
Registration¶
If HOST_TOKEN is unset, the agent:
Detects CUDA, Apple MPS, or CPU capabilities.
Builds a supported model list from available memory.
Submits a host registration payload.
Stores the returned token in memory for the current process.
Generate a registration payload without starting the polling loop:
python -m host_agent.print_gpu_registration
Execution backends¶
huggingfaceRuns Transformers directly in the host process.
langchainUses LangChain’s HuggingFace pipeline integration.
workerRuns models through subprocess-managed virtual environments for dependency isolation.
Operational settings¶
POLL_INTERVALSeconds between heartbeat and job polling iterations.
PRELOAD_MODELSComma-separated model names to warm before the polling loop starts.
HF_HOMEDefaults to
./hf_cachewhen backends load HuggingFace models.