Agent Installation
The agent is a Rust binary that runs on your machine. It reads your wrapd.yaml, connects to Wrapd via WebSocket, and executes commands when your endpoints are called.
Docker (recommended)
Section titled “Docker (recommended)”docker run -d --name wrapd-agent \ -e WRAPD_TOKEN="wrapd_at_your_token" \ -v $(pwd)/wrapd.yaml:/app/wrapd.yaml \ -w /app \ ghcr.io/wrapd/agent:latestMake sure wrapd.yaml is in your current directory.
Check status
Section titled “Check status”docker logs wrapd-agentYou should see:
INFO wrapd_agent::connection: websocket connectedINFO wrapd_agent::connection: authenticated successfully agent_id=...INFO wrapd_agent::connection: registered endpoints with hub count=3Connection behavior
Section titled “Connection behavior”- The agent automatically reconnects if the connection drops.
- Reconnection uses exponential backoff: 1s, 2s, 4s, 8s, 16s, 30s (max).
- On reconnect, the agent re-authenticates and re-registers all endpoints.
Environment variables
Section titled “Environment variables”| Variable | Description | Default |
|---|---|---|
WRAPD_TOKEN | Agent authentication token (required) | — |
WRAPD_HUB_URL | WebSocket hub URL | wss://hub.wrapd.sh |
WRAPD_CONFIG_PATH | Path to wrapd.yaml | wrapd.yaml |
RUST_LOG | Log level (debug, info, warn, error) | info |
CLI flags override environment variables. See CLI Reference.