Skip to main content
Version: 1.16.0-dev

AgentWorks API, CLI, and configuration reference

An AgentWorks 1.16.0 runtime serves one versioned API for running agents: deployments to start runs on, runs and their events, human interactions, sessions, and durable operations. It does not serve an API to create agents, build releases, or promote them; a headless runtime reads those from its runtime file and a connected one from Flightdeck. Use this page to find the right surface, and the runtime's own OpenAPI document for every field. The API paths are the same as in 1.15.0.

Where is the exact API contract?​

Every runtime publishes its OpenAPI 3.1 document without authentication:

curl --fail http://127.0.0.1:8080/api/v1/openapi.yaml -o agentworks-openapi.yaml

Every other operation needs a bearer credential: a caller key or an identity provider's token that the runtime file names, or Flightdeck's token on an enrolled runtime. The credential decides the workspace; no header or body can choose another one.

TaskOperations
Find deploymentsGET /api/v1/deployments
Start a runPOST /api/v1/deployments/{deploymentId}/runs (needs RUN_ADMIT; takes Idempotency-Key)
Read runsGET /api/v1/runs, GET /api/v1/runs/{id}, .../steps, .../events, .../stream, .../context
Control runsPOST /api/v1/runs/{id}/cancel, .../pause, .../resume
ReplayGET /api/v1/runs/{id}/replay/plan, POST /api/v1/runs/{id}/replay
Human interactionsGET /api/v1/interactions, GET .../{interactionId}, POST .../response, .../expire, .../cancel, .../revoke; an ask_caller question is answered with {"answer": "..."}
SessionsPOST and GET /api/v1/sessions, GET .../{sessionId}, POST and GET .../{sessionId}/messages, GET .../messages/{messageId}
Durable operationsGET /api/v1/operations, GET .../{operationId}, POST .../cancel; providers report results to POST /api/v1/operation-callbacks/{workspaceId}/{operationId} with their own token
Run control auditGET /api/v1/administrative-audit
MCP connection healthGET /api/v1/mcp-connections

Outside /api/v1, a deployment exposed as an A2A agent answers JSON-RPC at POST /a2a/<id> and publishes its Agent Card at GET /a2a/<id>/.well-known/agent-card.json. Readiness is GET /actuator/health/readiness.

How do errors, paging, and streams behave?​

Errors are RFC 9457 problem documents. Check the stable code first: AUTHENTICATION_FAILED (401) for a bad credential, ACCESS_DENIED (403) for a missing permission, NOT_FOUND (404) for something outside the caller's workspace, and a typed 409 such as RUN_TERMINAL for an action in the wrong state. A credential in the URL is refused with CREDENTIAL_IN_URL. A caller key that the runtime file limits to some deployments gets 403 ACCESS_DENIED when it starts, controls, or answers anything outside them, on the A2A front too; it still reads the workspace as its role allows.

Lists return {"items": [...], "nextCursor": "..."}. Pass nextCursor back unchanged as cursor; never build one. The run stream is Server-Sent Events with event ids <runId>:<sequence>; reconnect with Last-Event-ID, and reload the paged history if the stream says the old position is no longer available.

Reusing an Idempotency-Key with the same request returns the original result, and with different content is refused with IDEMPOTENCY_KEY_REUSED.

Which CLI commands exist?​

The agentworks CLI calls the same API. It needs Python 3.11 or newer on Linux or macOS and is built from the private release tag, which requires authorized access. Point a profile at a runtime and keep the credential out of the profile:

agentworks profile set local --server http://127.0.0.1:8080 --token-env AGENTWORKS_TOKEN
agentworks profile use local
export AGENTWORKS_TOKEN="<caller-key>"
agentworks deploy list
GroupCommands
profileset, use, list, remove
deploylist
runstart, show, list, pause, resume, cancel
events, streamevents list, stream <run-id>
replayplan, start
interactionlist, show, respond, expire, cancel, revoke
operationlist, show, cancel
validatevalidate <runtime-file>
test, simulatetest run, simulate run, on your machine with no server
diagnosticcontext, openapi

Use --output json in scripts: each command prints one JSON object, and a stream prints one per event. Exit code 0 is success; 3 is an authentication or authorization failure, 4 a refused request, 19 an unreachable runtime, 20 a stream that cannot resume, 21 a lifecycle conflict, and 22 a runtime file with problems.

How do you check a runtime file?​

agentworks validate runs the runtime's own reader from the server jar, so it reports exactly the problems a start would, each with where it is, and starts nothing. It needs Java 25 and the 1.16.0 server jar, given with --jar or AGENTWORKS_SERVER_JAR:

export AGENTWORKS_SERVER_JAR=<path-to-agentworks-server-1.16.0.jar>
agentworks validate agentworks.yaml --without-keys

--without-keys skips caller keys whose variables are not set, for CI, and names them. A file with problems ends with exit code 22 and RUNTIME_FILE_INVALID, with every problem in detail.problems. Without the CLI, the released image runs the same check; it exits 0 for a good file, 1 for a file with problems, and 2 for a wrong command line:

docker run --rm -v "$PWD:/etc/agentworks:ro" ghcr.io/dvarahq/dvara-agentworks-ee:1.16.0 \
validate --without-keys /etc/agentworks/agentworks.yaml

A model gateway or a tool binding that the file needs is checked only when the runtime starts, because it depends on the runtime, not the file.

Which configuration keys matter most?​

Settings are Spring Boot properties, so agentworks.config.file can also be the environment variable AGENTWORKS_CONFIG_FILE. Keep secrets in mounted files or a secret manager, never in the runtime file.

AreaKeyDefault and meaning
Headless modeagentworks.config.fileUnset. The runtime file; setting it selects headless mode.
Headless modeagentworks.config.reload-interval5s. How often the file is read again.
Run storeagentworks.storage.local.pathdata/run-plane.db. The SQLite file; put it on a durable volume.
Workersagentworks.runs.worker.enabled, .threadsfalse and 1. Runs stay queued until workers are on.
Workersagentworks.runs.worker.lease-duration30 seconds. Raise it for slow local models.
Cleanup evidenceagentworks.runs.cleanup-evidence.pathdata/runtime-cleanup.pending. Keep it on the durable volume.
Model gatewaysagentworks.gateway.gateways.<id>.type, .base-url, .credential-ref, .models[n].alias, .models[n].modelA named gateway, such as openai-compatible.
Model gatewaysagentworks.gateway.gateways.<id>.private-networkfalse. Allows plain HTTP to a non-loopback host on a trusted network.
Credentialsagentworks.credentials.environment.<id>.variable, .scopeResolves env://<id> from an environment variable; the scope is required.
Flightdeckagentworks.enrolment.base-url, .runtime-id, .token, .directoryUnset; setting base-url selects connected mode. directory defaults to data/enrolment.
Flightdeckagentworks.security.flightdeck.issuer, .audienceFilled from Flightdeck's bundle; audience agents.
A2Aagentworks.a2a.exposures.<id>.environment, .deployment, .url, .wait-timeoutExposes one deployment as an A2A agent; wait-timeout defaults to 60s.
A2Aagentworks.idempotency.active-key-version, .hmac-keys.<version>Required for A2A message/send, which otherwise answers IDEMPOTENCY_UNAVAILABLE.
DVARA Gatewayagentworks.gateway.dvarahq.a2a.origin, agentworks.gateway.dvarahq.mcp.originUnset. Turn on call_agent and DVARA Gateway MCP tools.
Entity memoryagentworks.memory.entity.time-to-live90d. How long a fact saved with remember is kept, headless or in Flightdeck.
Release evidenceagentworks.release-evidence.trusted-public-keys.<id>, .revoked-key-idsKeys the runtime verifies evidence with.
Request sizeagentworks.security.requests.max-body-size1048576 bytes.
Startup policyagentworks.configuration.unknown-keyserror. An unknown agentworks.* key stops startup.

agentworks.storage.run-plane and agentworks.storage.control-plane are set for you by the mode you choose; do not set them. Set exactly one of agentworks.config.file and agentworks.enrolment.base-url: a runtime with neither, or both, refuses to start.

Which settings stop a 1.16.0 runtime?​

A removed setting stops startup and names what replaced it; it is never silently ignored. That includes any removed spring.datasource.* or agentworks.planes.* setting (a runtime has no database), agentworks.console.enabled (the AgentWorks pages are in Flightdeck), the session, sign-in, bootstrap, and API-token settings, and the control-plane settings agentworks.lifecycle.default-credential-references.<name>, agentworks.release-evidence.required, .active-key-id, and .private-key. A runtime file names each deployment's credential references under its credentials instead.

Next steps​