Standalone Mode
The agent can run as a standalone HTTP server, serving your wrapd.yaml endpoints directly over HTTP. No hub connection, no token, no account required.
When to use it
Section titled “When to use it”- Local development — test endpoints before connecting to the hub
- Air-gapped environments — no outbound internet required
- Single-machine setups — call endpoints from the same server without routing through the cloud
- CI/CD pipelines — spin up endpoints for integration tests, tear down after
wrapd serve --port 8080The agent reads your wrapd.yaml and starts an HTTP server. Each endpoint becomes a route:
GET /health — health checkGET /endpoints — list configured endpointsPOST /:endpoint-name — execute an endpointGET /:endpoint-name — execute an endpoint (also supported)Example
Section titled “Example”Given this wrapd.yaml:
version: 1endpoints: - name: disk-usage method: GET command: df -h description: Show disk usageStart the server:
wrapd serve --port 8080Call it:
curl http://localhost:8080/disk-usageOutput streams back as Server-Sent Events, same format as the hosted API:
data: {"type":"output","data":"Filesystem Size Used Avail Use% Mounted on"}data: {"type":"output","data":"/dev/sda1 100G 42G 58G 42% /"}data: {"type":"done","exit_code":0,"duration_ms":12}Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
--port, -p | 8080 | Port to listen on |
--host | 0.0.0.0 | Host to bind to |
--config, -c | wrapd.yaml | Path to config file |
Environment variable: WRAPD_PORT=8080 also works.
Parameters
Section titled “Parameters”Pass arguments as query parameters or JSON body:
# Query paramscurl "http://localhost:8080/greet?name=world"
# JSON bodycurl -X POST http://localhost:8080/greet \ -H "Content-Type: application/json" \ -d '{"name": "world"}'Limitations
Section titled “Limitations”Standalone mode does not support:
- API key authentication — all endpoints are open on the local port
- Managed secrets — use environment variables directly instead of
$wrapd:NAME - Execution logging — no logs are stored (output is streamed and discarded)
- Scheduled endpoints — cron expressions are ignored
- Health checks — the hub health check scheduler does not run
- Live config sync — changes to
wrapd.yamlrequire a restart
For these features, connect to the hub with wrapd --token YOUR_TOKEN.
Combining with the hub
Section titled “Combining with the hub”You can run both modes on the same machine. The standalone server and the hub-connected agent are separate processes:
# Hub-connected agent (production endpoints)wrapd --token $WRAPD_TOKEN
# Standalone server (local dev/testing on a different port)wrapd serve --port 9090 --config wrapd-dev.yaml