What the agent is
A NestJS app that embeds a Temporal worker and a small HTTP server. It depends on two things you provide:- An agent Postgres database for its own state (connector credentials, migration tracking). One database per deployment. Small — tens of MB is typical.
- Outbound HTTPS (443) to the URLs printed during deployment provisioning. In most environments, no additional egress rules are needed.
Prerequisites
- Docker 24+ (or any OCI runtime — Kubernetes, ECS, Nomad, Fly, Railway all work).
- A Postgres 14+ database the agent can reach. A 1 vCPU / 1 GB instance is ample for v1.
- Outbound 443 to
*.op-data.comand your Temporal address. - An agent deployment provisioned in the op-data UI (see Quickstart → Provision an agent deployment).
Environment variables
Required:| Variable | Purpose |
|---|---|
OP_TENANT_ID | Your org ID. Also used as the Temporal task-queue suffix (tenant-{orgId}). |
OP_CONVEX_URL | URL of the op-data control plane. Provided during provisioning. |
OP_WORKOS_AUTHKIT_BASE_URL | WorkOS AuthKit base URL. Provided during provisioning. |
OP_WORKOS_CLIENT_ID | WorkOS M2M client ID for this deployment. |
OP_WORKOS_CLIENT_SECRET | WorkOS M2M client secret for this deployment. |
OP_AGENT_DATABASE_URL | Postgres connection string for the agent’s own state database. |
| Variable | Default | Purpose |
|---|---|---|
OP_TEMPORAL_ADDRESS | localhost:7233 | Temporal frontend address. Set to the value shown during provisioning. |
OP_TEMPORAL_NAMESPACE | default | Temporal namespace. |
OP_TEMPORAL_TLS_CERT | — | Base64-encoded client certificate for mTLS to Temporal. Must be set together with OP_TEMPORAL_TLS_KEY. |
OP_TEMPORAL_TLS_KEY | — | Base64-encoded client private key. |
OP_HEALTH_PORT | 8080 | Port the HTTP server listens on (/healthz, /metrics). |
OP_CANONICAL_OUTPUT_BASE_URI | — | Base URI for canonical model output (e.g. s3://my-bucket/canonical/). Required before the first sync. |
AWS_REGION / AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN / AWS_ENDPOINT_URL_S3 | — | Standard AWS SDK variables. Needed only if the canonical sink writes to S3. IAM roles on the host are also supported. |
Docker
Kubernetes
A minimal Deployment. Mount the WorkOS secret and the agent database URL from aSecret; keep non-secret config in a ConfigMap.
Health checks
GET /healthzreturns200 okonce the Temporal worker has connected. Use it for liveness and readiness probes.GET /metricsis reserved for a Prometheus endpoint — no metrics are exposed yet.
Upgrading
Upgrades are image-tag swaps. The control plane cannot execute code on your agent remotely; you control the rollout by changing the image tag in your Deployment / Docker run command. Workflow definitions are versioned so in-flight executions replay safely across agent upgrades. We recommend pinning to a specific tag (e.g.ghcr.io/op-data/agent:2026.4.2)
rather than latest in production.
Troubleshooting
Agent stays on “Pending” in the UI. Check the agent’s logs fortemporal-worker connected and convex authed.
The most common causes are a mistyped OP_TEMPORAL_ADDRESS or a WorkOS
client secret that has been revoked. Reprovision the deployment and relaunch
with the new values.
Invalid agent environment on boot.
The container exits with a list of every invalid variable. Fix them and
restart — the agent does not partially start.
OP_TEMPORAL_TLS_CERT and OP_TEMPORAL_TLS_KEY must be set together.
If you enable mTLS, you must provide both. They must be base64-encoded PEM
blobs (including headers).
Preview queries fail with connection refused.
The agent runs the query — not the control plane. The source database must
be reachable from the agent’s host, not from op-data’s network.
connection is not found when running a sync.
Credentials live on the agent. If you rebuilt the agent’s Postgres database
without restoring it, recreate the connections from the UI — the Convex
metadata remains but the secret payload was lost.