Agent Harness Tutorial · Tech stack
L14 · Human-in-the-loop
Approvals and hand-offs the agent cannot grant itself. Family: Control · one turn, in order.
Why our choiceDBOS adds no infrastructure, is Python-native and the cheapest to leave. Moving to Temporal means changing two adapters.
| Option | Where from | Verdict | Why |
|---|---|---|---|
| DBOS 3.2.0 | ours | ✓ chosen | durable waits in our PostgreSQL |
| Desk API /ops | ours | ✓ chosen | built |
| Teams cards | ours | ✓ chosen | planned |
| Durable Task Scheduler | Azure | ✗ dropped | only if Azure for good |
| Durable Functions | Azure | ✗ dropped | only if already on Functions |
| Logic Apps + Teams cards | Azure | ✗ dropped | not code-first |
| DBOS | open source | ✓ used | no new infrastructure |
| Temporal | open source | · considered | long sagas, high volume |
| Restate | open source | · considered | watch |
| Inngest | open source | ✗ dropped | not for regulated waits |
| Prefect | open source | · considered | batch and eval jobs only |
How it works inside the harness: DBOS.
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 |
DecisionWe chose DBOS because its state lives in the PostgreSQL we already run, so it adds no infrastructure. We would move to Temporal for long undo flows (sagas) or mature versioning, and to Durable Task Scheduler only if the system must be Azure-native PaaS.
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
approval:
adapter: dbos-workflows
url: {key_vault: agent-database-url}
name: claims-fnol
app:@DBOS.workflow(name=WORKFLOW)
async def _wait(ask: Ask) -> Approval:
return await _Run(ask).run()
class _Run:
"""One approval's moves. Deterministic apart from its steps, as a DBOS
workflow must be: everything it reads from outside is a step or a message."""
def __init__(self, ask: Ask) -> None:
self.ask = ask
self.approval: Approval | None = None