Agent Harness Tutorial · End to end · Zoom level 1
DBOS: work that waits
Some work can't finish inside one turn. A payout over ₹25,000 must wait for a claims handler, which might take an hour. The server might restart in that hour. DBOS is a small Python library that lets a function wait for days and pick up exactly where it left off.
Why not just wait in the turn? A web request that waits an hour holds a connection, a thread and a server that can't scale to zero; and if the server restarts, the work is lost. A workflow stores its progress in the database instead, so nothing is held while it waits.
Why DBOS? It runs inside our process and keeps its state in the PostgreSQL we already have. Temporal does the same job well but needs its own servers. DBOS adds no new infrastructure.
Only two functions in the whole harness are workflows: approval.wait and escalation.wait.
Want every detail? The long version is in the Series: DBOS and the human desk, in full.
Compared: What keeps a run alive while it waits days for a person?
| Option | From | Verdict | Where state lives | New infrastructure | Rules on our code | Approvals and long waits | Ops burden for us | Exit cost |
|---|---|---|---|---|---|---|---|---|
| DBOS | open source | chosen | our Azure PostgreSQL | none: reuses our PostgreSQL | light | durable sleep, messages, events | lowest | low: open source, plain Postgres |
| Temporal | open source | for long sagas | Temporal's store + visibility index | Temporal Cloud, or AKS cluster | strict: no clock, random, I/O | signals, updates, timers: richest | low on Cloud; high self-hosted | low in code; in-flight stays |
| Durable Task Scheduler | Azure | only if Azure-only | managed by Azure | a DTS resource | strict, like Temporal | external events, durable timers | low | high: own model, Azure-only |
| Azure Durable Functions | Azure | if already on Functions | Azure Storage, SQL or DTS | run the agent on Functions | strict replay rules | external events, durable timers | low: serverless | medium: tied to Functions |
| Logic Apps Standard | Azure | back-office only | managed by Azure | a Logic Apps resource | not code-first: designer | built-in approval emails | low | high: designer workflows |
| Restate | open source | watch | the Restate server's storage | Restate server or Cloud | durable steps via its context | durable calls, timers | another service to run, secure | medium: younger ecosystem |
| Prefect | open source | data and eval jobs | Prefect server database | Prefect server or Cloud | light: Python flows, tasks | built for batch, not people | server plus workers | medium |
| DIY on PostgreSQL | ours | simplest waits only | our PostgreSQL | none | none: it is all ours | status rows + scheduled job | we own every bug | none |
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
config/azure.yaml:82The approval port on Azure: DBOS approval:
adapter: dbos-workflows
url: {key_vault: agent-database-url}
name: claims-fnol
app:Tech choices (what we chose, Azure and open-source options): L14 · Human-in-the-loop