# The Human Is an Async API

Melanie Warrick, Temporal | AI Engineer | 19:16

Source: https://www.youtube.com/watch?v=jc3kbZkuHTo
Channel: AI Engineer (https://www.youtube.com/@aiDotEngineer). Summarised by AIE Talks.
Page: https://aietalks.com/talks/the-human-is-an-async-api
Published: 2026-10-04
Tags: harness-engineering, human-in-the-loop, reliability, workflows

## TL;DR
- Human approval should pause one workflow without blocking the rest of an agent system.
- Temporal uses workers, workflows, activities, wait conditions, and signals to preserve state across failures.
- Teams should involve humans when the cost of an incorrect decision is high, while accounting for alert fatigue.

## Summary
Melanie Warrick uses an ice cream delivery system to explain human-in-the-loop agents. Fleet, customer, and dispatch agents coordinate orders, while Temporal records their state and event history. A human can change an order or approve a high-value delivery without stopping unrelated work. Warrick argues that a direct call to a human behaves like a blocking function: it can wait for minutes or weeks, and the system can lose its place if the service fails. Temporal's wait condition stores the paused state in a workflow, while a signal delivers the human's response later. She maps agent code onto workers, workflows, and activities, with model and tool calls in activities. A second demo combines Google ADK and LangGraph. Warrick kills the worker during an approval, then restarts it. The event log replays to the last state, and the approved order continues. She recommends human review when being wrong is expensive, while warning that too many prompts create alert fatigue.

## Key ideas
### Multiple agents can keep delivering orders while one human decision is pending
[00:13](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=13s)
Warrick opens with an ice cream delivery demo built around Ziggy's fictional store. A fleet agent, customer agent, and dispatch agent coordinate deliveries. Temporal tracks the state and exposes an event history in its UI. When a customer changes an order, the relevant driver workflow pauses while another person decides whether to approve the change. Other orders continue to arrive and get filled. Once the approval is submitted, the update is processed and the order moves on to Oracle Park. The demo shows why a human decision should affect the smallest possible part of a distributed system.

### Durability belongs in the agent harness
[03:38](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=218s)
Warrick describes the agent harness as the structure around an agent that helps it work in production. She says people debate whether the model, tools, memory, guardrails, and security belong inside the harness. Her own emphasis is durability. In the delivery example, fleet, customer, and dispatch each have their own loop. The fleet agent researches drivers with tools such as Google Maps, the customer agent researches orders with Google Search, and dispatch makes decisions from their input. Those loops need state and failure handling so the system does not simply fall over.

### Temporal separates execution, state tracking, and external calls
[04:58](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=298s)
Temporal provides primitives for failure handling and state management. Warrick explains that a worker runs the code, a workflow tracks the steps, and an activity handles interaction with external systems. An agent loop can run inside a workflow. Model calls and tool calls belong in activities because they are external and nondeterministic. She says Temporal can be used with Python, TypeScript, or Rust. The software is open source and can be self-hosted, while Temporal also offers a managed service. Structuring the code around these primitives lets the system retain its state.

### A human approval must be modeled as a pause and a later event
[07:22](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=442s)
A direct function call to a human can block the system, and the request can be lost if the service goes down. Warrick recommends a wait condition and a signal instead. The wait condition records that a workflow is waiting for a particular event in the durability layer. A later signal injects the human's response into the running workflow. The system can continue other work instead of holding a thread for one person. The wait can also use timeouts. Warrick says the pattern can support millions of parked workflows, including approvals that take minutes, days, weeks, or longer.

### Google ADK and LangGraph can use the same durable pattern
[10:12](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=612s)
For Google ADK, Warrick wraps the model in a Temporal model class and wraps tools with an activity tool. The agent then runs through a worker configured with the Google ADK plugin. A wait condition pauses the relevant workflow without stopping other coroutines or workflows, and a signal injects new input later. For the second framework example, she describes putting Temporal into LangGraph nodes. Model calls and tool calls become activities, while process steps become workflow code. LangGraph's interrupt mechanism calls out from a node, after which the workflow waits for a signal containing the human's answer.

### Worker failure does not erase a pending approval
[13:42](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=822s)
The second demo creates a high-value order that the dispatch agent decides needs human involvement. Customer and fleet agents assess the order, then send their results to dispatch. Dispatch enters a pause state while waiting for approval, but the other delivery cars keep moving. Warrick then takes the worker offline and submits the approval while it is disconnected. The event is retained in the separate data store and queued. When the worker returns, the event log is replayed up to the previous point. The workflow recovers its current state, sees the approval, assigns the order, and completes the delivery.

### Human review belongs where the cost of a wrong decision is high
[16:47](https://www.youtube.com/watch?v=jc3kbZkuHTo&t=1007s)
Warrick says the decision to involve a human depends on the cost of being wrong, including security concerns. Models remain probabilistic, so teams need to assess what an incorrect action would be worth in the particular problem they are solving. Human review also has a cost. Alert fatigue can lead people to approve every request automatically after seeing too many prompts. The design therefore has to balance expensive mistakes against excessive interruptions. Her final pattern applies in both directions: a human can initiate work for an agent, or an agent can pause and ask a human, using a wait condition followed by a signal.

## Notable quotes
- "Humans are most likely going to take several minutes, maybe days, maybe weeks, maybe longer." (14:31)
- "If you write it just straight out as a function to say call the human or let the human have an input, it can become a blocking call." (07:45)
- "You want a wait condition and a signal." (08:10)
- "The event log is getting replayed. It's not redone." (16:03)
- "The big thing you want to take into consideration is the cost of being wrong is high." (16:47)

## Tools & references mentioned
- Temporal
- Google ADK
- LangGraph
- LangChain
- Google Maps
- Google Search
- Oracle Park
- Ziggy

## Who should watch
- You are building agents that need a person to approve, change, or supply information after an unpredictable delay.
- Your agent service can restart during a human interaction, and you need the workflow to resume without losing its state.
- You are deciding where to add human review and need to weigh costly mistakes against approval fatigue.

## Related talks

- [Building Durable Agents with Workflow DevKit & AI SDK](https://aietalks.com/talks/building-durable-agents-with-workflow-devkit-ai-sdk) (Peter Wielander, Vercel, 1:09:49)
- [Human-in-the-Loop Automation with n8n](https://aietalks.com/talks/human-in-the-loop-automation-with-n8n) (Liam McGarrigle, n8n, 1:19:22)
- [Agents vs Workflows: Why Not Both?](https://aietalks.com/talks/agents-vs-workflows-why-not-both) (Sam Bhagwat, Mastra, 15:37)
- [Building Agents (the hard parts!)](https://aietalks.com/talks/building-agents-the-hard-parts) (Rita Kozlov, Cloudflare, 21:12)
- [From Stateless Nightmares to Durable Agents](https://aietalks.com/talks/from-stateless-nightmares-to-durable-agents) (Samuel Colvin, Pydantic, 22:13)
