Skip to content

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.

  • 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
Terminal window
wrapd serve --port 8080

The agent reads your wrapd.yaml and starts an HTTP server. Each endpoint becomes a route:

GET /health — health check
GET /endpoints — list configured endpoints
POST /:endpoint-name — execute an endpoint
GET /:endpoint-name — execute an endpoint (also supported)

Given this wrapd.yaml:

version: 1
endpoints:
- name: disk-usage
method: GET
command: df -h
description: Show disk usage

Start the server:

Terminal window
wrapd serve --port 8080

Call it:

Terminal window
curl http://localhost:8080/disk-usage

Output 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}
FlagDefaultDescription
--port, -p8080Port to listen on
--host0.0.0.0Host to bind to
--config, -cwrapd.yamlPath to config file

Environment variable: WRAPD_PORT=8080 also works.

Pass arguments as query parameters or JSON body:

Terminal window
# Query params
curl "http://localhost:8080/greet?name=world"
# JSON body
curl -X POST http://localhost:8080/greet \
-H "Content-Type: application/json" \
-d '{"name": "world"}'

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.yaml require a restart

For these features, connect to the hub with wrapd --token YOUR_TOKEN.

You can run both modes on the same machine. The standalone server and the hub-connected agent are separate processes:

Terminal window
# 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