Skip to main content
Version: 1.15.0

Operate AgentWorks with Flightdeck

Tech preview

AgentWorks is in Tech preview.

A connected AgentWorks Runtime takes its deployments from DVARA Flightdeck instead of a runtime file. Flightdeck hosts the AgentWorks control plane and pages: agents are published, released, promoted and governed there, and the Runtime's model, MCP and agent-to-agent calls go through the DVARA Gateway with Flightdeck-issued credentials, so the gateway's policy, personal-data checks and tamper-evident audit apply to every call. The Runtime keeps only its runs, in its own SQLite file. It has no database connection, no users and no control-plane API of its own.

A Runtime is either connected or headless, never both: setting agentworks.config.file together with agentworks.enrolment.base-url stops startup. To run without Flightdeck, see Run AgentWorks headless. For how the two modes compare, see the architecture.

Turn on AgentWorks in Flightdeck​

AgentWorks is off by default in Flightdeck. Flightdeck runs the AgentWorks control plane in its own process, which is the only mode AgentWorks has, and serves its pages at /agentworks behind Flightdeck's sign-in. Set on Flightdeck:

dvara.flightdeck.products.agents.enabled=true
dvara.internal.enrolment.enabled=true

dvara.internal.enrolment.enabled (default false) opens Flightdeck's enrolment port (8443 by default), where Runtimes enrol and then fetch their bundle over mutual TLS. Flightdeck never opens a connection to a Runtime and has no Runtime address: setting dvara.flightdeck.products.agents.api-url, or an AgentWorks control-plane mode other than in-process, stops Flightdeck's start.

Flightdeck keeps the AgentWorks control-plane state in its own PostgreSQL database. Back that database up before you turn the product on. On first start, Flightdeck's database login must be able to take on the database roles AgentWorks uses:

  • On a database cluster where those roles do not exist yet, the login needs CREATEROLE.
  • Where they already exist, a database administrator must grant the login administration rights over them; CREATEROLE alone is not enough. Flightdeck checks this before it migrates anything and stops with the statement to run, so follow that error rather than granting superuser access.
  • A deployment that also hosts MCPWorks must use a login that is neither a superuser nor able to bypass row-level security.

Enrol a Runtime with a cluster token​

A Runtime serves one AgentWorks cluster, and through it the environments and workspaces that cluster is given.

  1. As owner, open Runtime → Clusters and create a cluster of type AgentWorks. Copy its registration token: Flightdeck shows the full value only after Create or Regenerate. The page after Create also shows Flightdeck's enrolment address and copy-paste setup for Docker, Kubernetes and a VM.
  2. Open Runtime → Environments and give the cluster's environment to the workspaces it will serve. See register clusters and assign environments.
  3. Start the Runtime with the enrolment settings, a worker, and the model gateway its releases name.

Replace <image-digest> with the digest of the released image, and <cluster-registration-token> with the token from step 1. In production, pass the token from a secret store rather than on the command line:

docker run -d --name agents-prod-1 \
-e AGENTWORKS_ENROLMENT_BASE_URL=https://flightdeck.example.com:8443 \
-e AGENTWORKS_ENROLMENT_RUNTIME_ID=agents-prod-1 \
-e AGENTWORKS_ENROLMENT_TOKEN=<cluster-registration-token> \
-e AGENTWORKS_ENROLMENT_DIRECTORY=/var/lib/agentworks/enrolment \
-e AGENTWORKS_STORAGE_LOCAL_PATH=/var/lib/agentworks/run-plane.db \
-e AGENTWORKS_RUNS_WORKER_ENABLED=true \
-e AGENTWORKS_RUNS_CLEANUP_EVIDENCE_PATH=/var/lib/agentworks/runtime-cleanup.pending \
-e SPRING_APPLICATION_JSON='{"agentworks":{"gateway":{"gateways":{"dvara":{
"type":"openai-compatible","base-url":"https://gateway.example.com/v1",
"credential-ref":"flightdeck://dvara-gateway","capabilities":"STREAMING,USAGE"}}}}}' \
-v agentworks-state:/var/lib/agentworks \
ghcr.io/dvarahq/dvara-agentworks-ee@<image-digest>
SettingWhy it is set this way
AGENTWORKS_ENROLMENT_BASE_URLFlightdeck's enrolment port. Setting it alone selects the connected Runtime; leave the storage-mode settings unset.
AGENTWORKS_ENROLMENT_RUNTIME_IDThis Runtime's own id: lower-case letters, digits and -, at most 63 characters. Every Runtime needs its own.
AGENTWORKS_ENROLMENT_TOKENThe cluster's registration token, used only to enrol.
AGENTWORKS_ENROLMENT_DIRECTORYThe Runtime's key, certificate, Flightdeck's CA, the last verified bundle and the audit spool. The default, data/enrolment, is relative to the working directory; point it at the durable volume.
AGENTWORKS_STORAGE_LOCAL_PATHThe SQLite run store, on the same durable volume.
AGENTWORKS_RUNS_WORKER_ENABLEDOff by default. Without a worker the Runtime admits runs but executes none. The cleanup journal must then be on writable storage, as shown.
Model gateway dvaraReleases pin a gateway id and type; Flightdeck names dvara and openai-compatible by default. A Runtime without that gateway fails the run with GATEWAY_NOT_CONFIGURED.

The Runtime makes its own key, enrols once with the token and receives a 30-day certificate, which it renews over mutual TLS 10 days before expiry. It never uses the token again. The same cluster token enrols any number of Runtimes until it is regenerated; regenerating it stops new enrolments but does not revoke enrolled Runtimes. The Helm chart's flightdeck.* values set the same enrolment settings from a Kubernetes Secret; see Run AgentWorks headless for packaging.

Do not configure the removed spring.datasource.* or agentworks.planes.*: either stops the Runtime's start. Leave agentworks.lifecycle.default-credential-references.* and release-signing settings to Flightdeck as well; on a Runtime they stop startup and name what replaced them.

What does Flightdeck send to the Runtime?​

The Runtime polls Flightdeck for its signed bundle every 30 seconds (agentworks.enrolment.poll-interval). It uses a new bundle only when its Ed25519 signature verifies with a key Flightdeck sent at enrolment, its content hash matches, its scope is agents:<runtime-id> and its version is not lower than the one held. Otherwise it keeps the bundle it has and reports DEGRADED health until a good poll.

The bundle carriesWhat the Runtime does with it
Deployments of the workspaces it serves, with their revisions, cohorts, routing and releasesAdmits runs only for a deployment the bundle carries, after checking each release's manifest and agent-version digests and any signed release evidence. A revision whose release fails a check is left out and logged.
Environments, each with its own gateway address and keysServes environments of one kind only, so a production environment never shares a Runtime with a development one. A run's calls use its own environment's gateway and credential.
The gateway's MCP and A2A addresses, and Flightdeck's token issuer and signing keysFills those settings only where they are not set locally; a local value always wins. A change to them applies at the next start.
Remembered tool permissionsAllows a tool with a pinned effect only when a rule in the bundle allows it, checked against the Runtime's own clock.
Grants to other workspaces of the same accountAdmits a granted caller only for the exposure, workspace and environment kind the grant names.
The drain switchRefuses new runs with 503 RUNTIME_DRAINING while running work finishes. See fleet operations.

With no verified bundle on a first start, readiness is degraded and every run is refused with RUNTIME_BUNDLE_UNAVAILABLE. Once a bundle is saved, the Runtime keeps serving from it while Flightdeck is unreachable.

What does the Runtime send back?​

  • Heartbeats every 30 seconds: Runtime id, AgentWorks version, health, active runs, bundle version, its compatibility identity and executor types, and the open work on each draining cohort. The cluster page shows the Runtime's version, health, last heartbeat, bundle version, workspaces and active runs.
  • Run records every 2 seconds (agentworks.enrolment.records-interval): each run's view, events, steps, checkpoints, effects and human interactions, which Flightdeck's run pages read. Records wait in an outbox in the SQLite file and leave it only when Flightdeck accepts them.
  • Audit and credential-use records, from a spool in the enrolment directory into Flightdeck's audit trail.

Before a tool with an external effect runs, the Runtime sends the run's records up to that point and waits until Flightdeck accepts them. If Flightdeck cannot be reached, the effect is not called and the run stays active with EFFECT_BARRIER_UNAVAILABLE, to retry with the same idempotency key.

How do runs started in Flightdeck reach a Runtime?​

A user with the RUN_ADMIT permission starts a run from a deployment's page. Flightdeck picks one Runtime whose bundle carries the deployment, that is neither revoked nor draining, and that reported healthy within the last 90 seconds; of those, the one with the fewest active runs. It puts the start on that Runtime's control queue, and the Runtime picks it up on its next poll and checks the starting user's permission as for any API call.

OutcomeWhat the user sees
No eligible Runtime503 NO_RUNTIME; the deployment page offers no run form while none is eligible.
Not picked up within 60 secondsThe run fails with START_EXPIRED. Flightdeck never sends it to another Runtime.
Refused by the RuntimeThe run fails with the Runtime's code, such as ACCESS_DENIED or RUNTIME_DRAINING.
Cancel, pause, resume or an answer for a Runtime that is gone409 RUNTIME_GONE, naming it. An A2A task reports A2A_RUNTIME_GONE.

How does identity work in a connected Runtime?​

Flightdeck signs users in; the Runtime keeps no users or memberships. A call from Flightdeck carries a product token whose roles are per environment: admin maps to ADMIN, developer to AUTHOR and OPERATOR together, and viewer to VIEWER. A run starts only in the environment the user selected, and anything in an environment the user cannot see answers as not found. A user with no AgentWorks role cannot use the product just because they can sign in to Flightdeck.

For its own gateway calls the Runtime obtains short-lived Flightdeck service tokens, one per workspace, through flightdeck://dvara-gateway (agentworks.enrolment.gateway-credential=service-token, the default). Tokens stay in memory until shortly before they expire. If one cannot be issued, the call fails with SERVICE_TOKEN_UNAVAILABLE rather than continuing without a credential. A run started for a user uses a delegated token that keeps the user's authority instead of widening the Runtime's own. The older api-key mode, which uses a gateway key from the bundle, refuses granted runs; leave it off for a new deployment. See security.

Verify the topology​

  1. Open the AgentWorks cluster in Runtime → Clusters and confirm the Runtime with the expected version, health, last heartbeat, bundle version and workspaces.
  2. Check the Runtime's /actuator/health with health details shown to operators (management.endpoint.health.show-details): the agentWorksFlightdeckEnrolment entry is UP, and agentWorksFlightdeckRecords shows records shipped and none rejected.
  3. In the AgentWorks pages, publish an agent, build a release and promote it to the cluster's environment. See lifecycle.
  4. Start a run from the deployment's page and follow it to completion, including its model and tool calls.
  5. Open the related trace and audit evidence in Flightdeck.
  6. Restart the Runtime on the same volume and confirm it loads its saved bundle and keeps its runs.

Next steps​