Production checklist
View as MarkdownCheck each item before launch. Each item links to the page with the details. In Dex Cloud, Super Durable runs the server; the Worker, Step retry, code-change, and database items still apply.
Before you launch
| Item | What to do | Details |
|---|---|---|
| Authentication and TLS | Authentication is off by default and the API is plaintext gRPC: configure an authenticator, and put TLS in front or keep the port private. | Authentication, TLS |
| Payload encryption | Turn it on when the server and its storage must not read your values. | Payload encryption |
| Topology | Run one active node; add a hot standby for fast failover. | Self-host Dex Server, Lease, hot standby, and step down |
| Storage and backup | Version or replicate the bucket prefix, and practice a restore. | Backup and restore |
| Retention | Keep closed runs longer than your longest client retry; copy data you need longer to your own database. | Retention, Entity Flow with Attribute Sync |
| Monitoring | Serve metrics; alert on a node that is not serving and on failed lease renewals. | Metrics and alerts |
| Workers | Size task slots, and stop Workers gracefully in a deploy. | Size Worker slots |
| Step retries | Step retries end after a time limit, and then the Step's failure policy applies; by default the Flow fails. Set a retry policy or a failure route. | Limits |
| Upgrades | Read each release's notes before you upgrade. | Upgrades, Agent release notes |
| Code changes | Keep old Step types and RPCs while active runs or approved Time Travel can reach them. | Deploy Code Changes |
| Your database | Make writes from Steps safe to repeat: upsert by Flow ID. | Idempotency keys |
| Search backend | Use PostgreSQL or ParadeDB for heavy search. | Search backends |
| Kubernetes | Run the server as a StatefulSet with graceful shutdown. | Kubernetes deployment |
| Capacity | Start small and watch the server's CPU. | Size a server node, Find the bottleneck |
Size Worker slots
A Worker's task slots cap how many Steps and RPCs it runs at once. I/O-bound handlers, such as model calls, HTTP, and database queries, need many slots. CPU-bound handlers need about one slot per allocated CPU. In containers, set the slot count and the floor explicitly, because the CPU count can show the whole host. Choose the slot count gives the defaults.
Minimal configuration
This configuration runs one Dex Server node on Amazon S3, with authentication on:
cluster:
nodeId: dex-zd
objectStore:
region: us-east-1
bucket: BUCKET
prefix: PREFIX
localStorage:
directory: /var/lib/dex-server-zd/store
lease:
duration: 60s
retention:
closedFlowDuration: 7days
metrics:
listen: 0.0.0.0:9090
auth:
authenticators:
- kind: staticTokens
file: /etc/dex-server-zd/tokens.yaml
Replace BUCKET and PREFIX with your bucket and key prefix. The token file
lists SHA-256 hashes of the bearer tokens; Authentication
shows its format and the JWT option. The 60-second lease suits one node; with
hot standbys, keep the default.
Install and configure server-zd
explains every key.
Give each Worker and Client its token through the SDK's credential option. A
file credential rereads its file, so a rotated token needs no restart. See
Send credentials from Workers and Clients.
Payload encryption
TLS and payload encryption protect different things.
- TLS protects values on the network up to the TLS endpoint in front of the server. Dex Server receives plaintext gRPC from that endpoint.
- Payload encryption encrypts values in your Workers and Clients, with your codec and keys, before they are sent. The server and its storage hold them as ciphertext and never hold the keys.
Use both when the server, its storage, or its operators must not read your data. These rules apply:
- With a codec, the SDK encrypts eligible values, such as Step, Channel, Stream, and RPC values. Indexed and plaintext Attributes stay plaintext, and so do values stored before you enabled the codec.
- Names and IDs stay plaintext: Flow types and IDs, Step types, RPC names, Attribute and index keys, Channel and Stream names, request IDs, and task queues. Keep sensitive data out of them.
- Keep an Attribute plaintext when Dex must compare, index, or project its decoded value: Attribute-match waits, Action conditions, search, and typed Attribute Store columns. Indexed writes are plaintext automatically; declare every other such Attribute plaintext. Store sensitive values in other Attributes, which stay encrypted.
- With a codec, the Client rejects an Attribute-match wait on an Attribute that it would encrypt, before it sends the wait. Always declare the Attributes that Action conditions use plaintext.
- Every Worker and Client of the application uses an SDK with payload encryption, the same codec and keys, and the same plaintext declarations.
- Make every reader able to decrypt before any writer writes ciphertext. A Worker that cannot decrypt a Step value fails that attempt.
The Payload encryption reference lists what the server can see, the setup for each SDK, codec servers for Dex Web and dexcli, rollout and key rotation, and the limits.
Agents
Agent sessions run on the same Dex Server as every other Flow, so the items above apply. These items are what agents add:
| Item | What to know | Details |
|---|---|---|
| Credentials | Keep model API keys and tool credentials in the Worker's environment or a secret store, never in session input or messages. | Credentials |
| Transcripts | Copy transcripts you must keep to your own store, because Dex can purge a stopped session after the retention period. | History and retention |
| Unknown outcomes | Decide who reconciles a call recorded as outcome_unknown before anyone asks for the effect again. | Reconcile outcome_unknown |
| Upgrades | Stop every older Worker gracefully before new ones start when a release is marked incompatible. | Upgrades |
| Calls during a deploy | Back off while no Worker runs, because session RPCs need one. A send_user_message retried with a new request ID can queue the message again. | RPCs during a deploy |
| Workers | Size Workers for parallel tool calls: each running model call, tool call, and RPC holds a task slot. | Workers and timeouts |
| Session size | Keep a session below the state limit with compaction and message retention where the harness has them. | Session limits |
| Model spend | Check spend per account or API key around each model call in your own code. | Spend limits |
| Approval deadlines | Set a deadline when a call must not wait forever for a person. | Approval deadlines |
| Streaming | Size the AgentEvents Stream for your traffic. | AgentEvents Stream |
| Tracing | Install an OpenTelemetry SDK and exporter to receive the spans that sessions emit for each model call and tool call. | Tracing |
Agent deployment
An agent app runs three kinds of process:
- Web app replicas hold a Client. They start sessions, send messages, and stream replies. They register the session Flow's definition to encode calls, but never run a Step.
- Worker processes run the session Flow: every model call, tool call, and approval wait. A small deployment can run the Worker in its web app process, as the web app example does.
- Dex Server keeps every session. Workers connect out to it, so they need no inbound port.
Next
- Deploy Code Changes: change Flow code while runs are still open.
- Operate and Debug: find a Flow, fix one that is stuck or failed, and recover it.