Run AgentWorks standalone and headless
A standalone AgentWorks service can own the complete agent lifecycle and execute runs without Flightdeck or a web interface. It exposes the REST API used by the CLI and SDK and can run its worker in the same process.
This guide starts a loopback-only headless service with the embedded H2 database and a predictable test model. It makes no provider call and does not connect to PostgreSQL.
Prerequisites
You need authorized access to the private AgentWorks v1.14.0 source tag, Java 25, curl, jq, and Python 3.11 or
newer. AgentWorks 1.14 publishes a private server image and a Flightdeck library set; it does not publish a standalone
server JAR or CLI archive. This loopback-only walkthrough therefore builds the server JAR and CLI from the released
tag. Docker and an external database are not required.
From a clean checkout of the private release tag, build the server and CLI:
git switch --detach v1.14.0
./mvnw -B -ntp -DskipTests package -pl agentworks-server -am
scripts/build-cli.sh dist
install -m 0755 dist/agentworks "$HOME/.local/bin/agentworks"
test -f agentworks-server/target/agentworks-server-1.14.0.jar
agentworks --version
The released production delivery is the private multi-architecture image
ghcr.io/dvarahq/dvara-agentworks-ee:1.14.0. Deploy it by the digest recorded with the release. Unlike this local
profile, a reachable or production standalone installation uses supported durable storage and production identity.
Start the headless service
mkdir -p .agentworks-local
java -jar agentworks-server/target/agentworks-server-1.14.0.jar \
--spring.profiles.active=local \
--server.port=8080 \
--agentworks.console.enabled=false \
--agentworks.security.bootstrap.token-file=.agentworks-local/bootstrap-token \
--agentworks.runs.worker.enabled=true \
--agentworks.runs.cleanup-evidence.path=.agentworks-local/runtime-cleanup.pending \
--agentworks.gateway.gateways.local.type=deterministic-fake \
'--agentworks.gateway.gateways.local.models[0].alias=demo-model' \
'--agentworks.gateway.gateways.local.models[0].model=demo-model'
The local profile binds to loopback and uses AgentWorks' embedded H2 database. It is a disposable development
configuration: stopping the process removes its agent and run state. It is not the Flightdeck-managed Runtime
topology and it does not open a connection to Flightdeck's PostgreSQL service.
The service has no GUI in this mode. Confirm readiness, download the live API description, and verify that the Console is absent:
curl --fail http://127.0.0.1:8080/actuator/health/readiness
curl --fail http://127.0.0.1:8080/api/v1/openapi.yaml -o agentworks-openapi.yaml
test "$(curl -sS -o /dev/null -w '%{http_code}' http://127.0.0.1:8080/console)" = "404"
Bootstrap through the API
Consume the one-time token to create the first administrator:
AGENTWORKS_BOOTSTRAP_TOKEN="$(tr -d '\n' < .agentworks-local/bootstrap-token)"
curl --fail-with-body \
-H 'Content-Type: application/json' \
-d "{\"token\":\"$AGENTWORKS_BOOTSTRAP_TOKEN\",\"username\":\"admin\",\"displayName\":\"Local Administrator\",\"password\":\"replace-this-local-password\"}" \
http://127.0.0.1:8080/api/v1/auth/bootstrap
The bootstrap token works once. Sign in to an API session and issue a short-lived CLI token:
curl --fail-with-body -c .agentworks-local/cookies \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"replace-this-local-password"}' \
http://127.0.0.1:8080/api/v1/auth/login
curl --fail-with-body -b .agentworks-local/cookies \
-H 'Content-Type: application/json' \
-d '{"name":"local-cli","role":"ADMIN","expiresInDays":1}' \
http://127.0.0.1:8080/api/v1/tokens \
| tee .agentworks-local/issued-token.json
export AGENTWORKS_TOKEN="$(jq -r .token .agentworks-local/issued-token.json)"
The token value appears only in that response. Protect and then remove the response file.
Connect the CLI
Point the source-built CLI at the headless service:
agentworks profile set local --server http://127.0.0.1:8080 --token-env AGENTWORKS_TOKEN
agentworks profile use local
agentworks auth status
agentworks diagnostic openapi
Use agentworks <group> <action> --help for the exact inputs of an operation. The primary lifecycle groups are:
agent create agent publish release build
promote apply run start stream
Every command calls the same /api/v1 surface that an automation client or SDK uses. The CLI has no hidden
administrator path.
Connect real models and tools
Configure a model gateway under agentworks.gateway.gateways.<id>.*, then refer to that gateway and model alias in
the agent specification. Keep credentials outside ordinary configuration and bind them through credential
references. Route model, MCP, and A2A calls through DVARA Gateway when those calls must use DVARA governance.
Before exposing the service, configure TLS, trusted proxies, production identity, supported durable storage, backups, observability, network egress, and exact image or JAR verification. The production profile refuses known unsafe local settings.
For clarity, a Flightdeck-managed AgentWorks Runtime never receives PostgreSQL credentials. It uses a local SQLite run store and receives signed assignments from Flightdeck. A full standalone control-plane installation is a different topology and currently uses its configured database for control-plane authority.
Clean up
Stop AgentWorks with Ctrl+C. Because this walkthrough uses the disposable embedded H2 database, its agents, releases, deployments, runs, and history do not survive the stopped process.