> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Coordinator Human Approval

> Explains using a coordinator agent to route requests to specialist agents, manage approval gates for risky actions, and pause and resume ADK workflows with human-in-the-loop control

All right — back to the support desk.

Billing questions often require one set of tools, technical problems require another, and simple questions may not need any special tools at all. You could combine every instruction and tool into a single giant agent, but that quickly becomes the "do-everything" person in the office: billing, IT, refunds, and password resets all at once. That approach is brittle and hard to maintain.

Instead, split the work into specialists: a billing agent for charges and refunds, a technical agent for logins and errors, and a general agent for everything else. Each specialist receives focused instructions and only the tools it needs. Then add one more agent on top: the coordinator. The coordinator reads the incoming request and decides which specialist should handle it. Crucially, the coordinator is itself an agent — the model decides the routing at runtime based on the specialists' concise descriptions.

![A simple flow diagram showing incoming emails (billing, technical, simple) all routed to one agent avatar with no tools. The agent is shown handling multiple handles like Billing, IT, Refunds, and Password resets.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/ADKs-Workflow-Runtime/Coordinator-Human-Approval/incoming-emails-single-agent-no-tools.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=dcc95d4d601672aa56abcb6723de8b18)

Give the coordinator one-line descriptions of each specialist — like short job postings — and it will use those descriptions to pick which specialist to delegate to at runtime.

![A flowchart titled "Descriptions Pick the Specialist" showing a refund request email sent to a coordinator who routes it to Billing, Technical, or General teams for charges/refunds, logins/errors, or other issues.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/ADKs-Workflow-Runtime/Coordinator-Human-Approval/refund-request-routing-coordinator-flowchart.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=b6d4703ce489c6c36ad8a148589f0afd)

Two common routing patterns

There are two common ways to set up coordinator routing:

* Collaborative (delegation): The coordinator has a list of sub-agents and the coordinator's model decides which one to delegate to at runtime. In ADK this often uses agent transfer — one agent passes the conversation to another (like transferring a phone call).
* Graph (explicit routing): The routing is explicit in the workflow graph with a router node and a route map that points to each specialist. This makes the routing logic visible and auditable.

| Approach | When to use | Pros | Cons |
| - | -: | - | - |
| Collaborative (model-driven) | When you want dynamic, context-aware routing decided by the model at runtime | Flexible; fewer explicit rules; can generalize from descriptions | Harder to audit and reproduce exact routing decisions |
| Graph (explicit router) | When you want transparent, inspectable routing logic | Easy to audit; deterministic routing; visible in UI/graph | Less flexible; requires updating the graph to change routes |

![A presentation slide titled "Two Ways to Route" showing two side-by-side panels: "Collaborative" (listing Sub-agent list, Model delegates, Agent transfer) and "Graph" (listing Router node, Route map). The slide uses icons and a dark header design.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/ADKs-Workflow-Runtime/Coordinator-Human-Approval/two-ways-to-route-collaborative-graph.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=304bae0e86bcf5f60088ea2a1bd24468)

Choose the collaborative approach when you want the model to decide dynamically using specialists' descriptions. Choose the graph approach when you prefer explicit, inspectable routing logic.

When does control return to the coordinator?

After a specialist receives the request, the next design decision is how much freedom that specialist has before control returns to its parent (the coordinator). ADK provides several collaboration modes that control this behavior:

| Mode | Behavior | When to use |
| - | -: | - |
| Chat | Normal interactive mode. The sub-agent can converse with the user; return is a manual handoff. | Use for extended conversations or escalation handling. |
| Task | The specialist performs a task and returns automatically when the task completes. The specialist can still ask for clarification if needed. | Use for autonomous work that may require intermittent clarification. |
| Single-turn | Isolated, single-operation mode. The agent performs one operation without interacting with the user and returns its result to the coordinator. | Use for short, deterministic operations (e.g., lookup queries). |

In task mode the agent can still request clarification from the user; it's not a hard isolation. Use task mode when you want the agent to run autonomously but still be able to gather missing input.

![An infographic titled "When Control Comes Back" showing three modes—Chat, Task, and Single turn—with avatar icons for a Coordinator, Billing system, and User. Each panel uses arrows and short captions to show how control is passed between the coordinator, billing component, and user (manual handoff, automatic return, or isolated single-turn).](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/ADKs-Workflow-Runtime/Coordinator-Human-Approval/control-return-chat-task-single-turn.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=23e65d6bbf903776025751b0d903068c)

Human-in-the-loop for risky actions (approval gates)

This control model becomes especially important when workflows include risky or irreversible actions — for example, issuing a refund. Reading an invoice is low risk; moving money is not. A common pattern is to let the billing agent prepare an action (e.g., refund details: order number, amount, reason) and then require a human to approve the actual money movement.

Implement an approval gate like this:

* Billing prepares the refund and passes the prepared refund object to an approval node.
* The approval node asks a human, "Approve this refund?" and the workflow pauses. Nothing downstream runs until the human answers.
* When the human approves or rejects, the workflow resumes. The approval node observes the decision and takes the appropriate path (issue refund or cancel).

This is the standard human-in-the-loop control pattern.

Important implementation detail in ADK 2.0

In ADK 2.0, simply printing a question (for instance, using a log or `print`) does not pause the workflow:

```python theme={null}
print("Approve this refund?")
issue_refund(refund)  # runs anyway
```

The example above will not pause — the workflow will continue immediately and `issue_refund` will run. To pause correctly you must emit a request input event that signals the runtime to pause and wait for a human response. Because the node will run again when the workflow resumes, it should be marked to rerun on resume (for example, with a decorator or node setting such as `rerun_on_resume=True`).

Conceptual pseudocode that demonstrates the control flow:

```python theme={null}
@node(rerun_on_resume=True)
def approval_node(refund):
    # First pass: if no human response, request input and return to let the runtime pause
    if not has_human_response():
        request_input_event("Approve this refund?")
        return  # runtime pauses here until the human response is delivered

    # Second pass: when the workflow resumes, the node reruns and can inspect the response
    if human_response_approved():
        issue_refund(refund)
    else:
        cancel_refund(refund)
```

Execution timeline:

* First pass: the node emits `request_input_event` and the runtime pauses the workflow.
* Later, when a human responds, the runtime resumes the workflow and reruns the node from the top. Now the human response is available and the node continues down the chosen branch.

Example scenario

Customer: "I was charged twice. Please refund me."

1. Coordinator routes the message to the Billing specialist (based on specialists' descriptions or explicit routing).
2. Billing checks the order, computes the refund amount, and prepares a refund object.
3. Workflow reaches the approval gate and pauses, asking a human: "Can you approve this refund?"
4. A support lead replies: "Yeah, approved."
5. The runtime resumes; the approval node detects the decision and continues to the issue-refund step.

Notice what makes this possible: the workflow can pause between automated work and a risky action, wait for a human decision (which might take seconds or hours), and then resume with the same state the workflow had when it stopped.

![An infographic-style UI titled "Pause, Wait, Resume" showing a clock labeled "10 hours", a human avatar, and a state card that lists a \$49.00 refund with approval status "Waiting." Below is a workflow diagram with icons for Billing → Approval → Refund.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/ADKs-Workflow-Runtime/Coordinator-Human-Approval/pause-wait-resume-refund-workflow.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=dcd1b0cd1cf88711ce6f450af8198345)

Where does the state live while the workflow is paused?

A discussion of how and where ADK persists long-lived workflow state, retention policy, and operational concerns follows in the next section.

Links and references

* [ADK workflows and routing patterns](https://example.com/adk-workflows) (reference)
* [Human-in-the-loop design patterns](https://example.com/human-in-the-loop)
* [Designing approval gates and pause/resume semantics](https://example.com/approval-gates)

> [card] [Watch Video](https://learn.kodekloud.com/user/courses/google-adk-2-0/module/913ea931-c1bd-4df3-8a96-c2894e9df0d2/lesson/1a5b7ad5-59be-40b9-a616-34e24eb3cf0f)

> [card] [Practice Lab](https://learn.kodekloud.com/user/courses/google-adk-2-0/module/913ea931-c1bd-4df3-8a96-c2894e9df0d2/lesson/739e60b7-b6ab-4158-bde8-c55495c46776)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.