> ## 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.

# What Version 2 Offers

> Explains Google ADK v2's graph-based workflow runtime that coordinates multiple agents with nodes, edges, parallelism, retries, and event traces for reliable, observable support workflows.

So you met ADK.

You can now create a capable agent in four lines of Python:

```python theme={null}
from google.adk.agents import LlmAgent

support_agent = LlmAgent(
    name="support_assistant",
    model="gemini-2.5-flash",
    description="Support assistant for the store.",
    instruction="Check invoices before billing answers.",
)
```

But why does the title say "version 2"?

Because the biggest change in ADK appears when you go beyond a single agent. Real support systems require many specialized agents — billing, technical, refunds, and humans for review — and they need an ecosystem to coordinate them reliably.

![The image is a diagram titled "A Real Inbox" showing a support inbox of emails (billing, technical, refund) being routed to a single agent (chip icon) and then forwarded to a human agent. It illustrates how different support requests flow from an inbox to one handling agent and then to a person.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/Fundamentals-of-Google-ADK/What-Version-2-Offers/support-inbox-routing-to-human-agent.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=131163f6ffebe3d1509563e6995457c6)

The redesign in ADK v2 (announced at Google I/O 2025) turns the framework into a graph-based workflow runtime. Instead of a largely linear, tree-like structure, your agent logic is now expressed as nodes and edges in a workflow graph.

* Version 1: parent-child, linear execution, limited branching and looping.
* Version 2: explicit graph runtime with nodes, edges, and runtime control over flow, parallelism, branching, and retries.

Think of the graph as a flowchart: each box (node) is a step; each arrow (edge) defines which step runs next. Agents, tools, and registered Python functions become nodes (usually inheriting a common base such as `BaseNode`), and the runtime decides the next step at execution time.

![A diagram titled "Nodes and Edges" comparing two architecture versions, showing labeled boxes for Agent, Tool, and Function with arrows and icons. The center shows Google ADK/v2, workflow runtime, and a small graph illustration.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/Fundamentals-of-Google-ADK/What-Version-2-Offers/nodes-edges-adk-v2-workflow-diagram.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=3cc47df2658b33ce0a225d0b2d0a80c9)

Every node produces events — small, structured records describing what happened. Those events form a precise audit trail: when a billing agent calls `lookup_invoice`, the runtime emits a trace entry recording which order was queried and what the tool returned. That trace is how you explain agent behavior later.

Example event stream (formatted log):

```text theme={null}
event       tool_call     billing_agent → lookup_invoice
order       #4821

event       tool_result   two charges of $49.00 on Oct 3
duplicate   flagged for refund
```

Events are the runtime’s single source of truth for debugging and auditing. Use them to answer “why” questions (e.g., “Why did the agent promise a refund?”) by inspecting the trace.

You build a workflow by connecting nodes with edges. Read each `Edge` left-to-right: the source node runs and then passes its output to the destination node. `START` is the built-in entry point.

```python theme={null}
from google.adk.workflows import Workflow, Edge, START

workflow = Workflow(
    name="support_pipeline",
    edges=[
        Edge(START, writer_agent),
        Edge(writer_agent, editor_agent),
    ],
)
```

Because the graph is explicit and declarative, the runtime can:

* run steps in order,
* branch during execution,
* fan out tasks in parallel,
* loop back to previous nodes,
* and orchestrate complex coordination between agents.

The graph runtime also improves reliability and observability. In ADK v1, a failed tool call or a context-window error could crash the whole conversation. ADK v2 can retry failed nodes, rewind and replay execution from an earlier point, and provide structured debugging traces.

Example console trace from a failing conversation (illustrative):

```text theme={null}
$ python agent.py
model → cancel_order(order_id="1042")
KeyError: 'cancel_order' is not a registered tool
model → lookup_invoice(order_id=1042)
lookup_invoice → None
TypeError: expected str, got int - conversation ended
context: 131,900 tokens > 128,000 limit
agent: "Sorry, which order was that?"
ContextWindowExceeded - loop crashed
```

Large context windows and unregistered tools are common failure points. ADK v2 provides retry, rewind/replay, and targeted debugging to recover from transient and deterministic errors.

Agents can collaborate under the graph runtime: they can pause for human review, hand control between themselves, and return control when their subtask is complete. You also don't have to handcraft every workflow: ADK v2 provides familiar templates (sequential, parallel, loop) implemented on top of the graph engine for common patterns.

![A dark presentation slide titled "Templates on the Graph" showing four template cards — SequentialAgent, ParallelAgent, LoopAgent, and Your own graph — each with a small node-and-arrow diagram. The KodeKloud logo appears in the bottom-left corner.](https://mintcdn.com/kodekloud-c4ac6d9a/heceQKBf52UJgxP-/images/Google-ADK-20/Fundamentals-of-Google-ADK/What-Version-2-Offers/kodekloud-graph-templates-sequential-parallel-loop.jpg?fit=max\&auto=format\&n=heceQKBf52UJgxP-\&q=85\&s=448abcb9807783d477ca2bceff09178a)

Use templates when they fit your problem. Build the graph directly when you need fine-grained control over branching, parallelism, retries, or debugging.

Summary: what ADK v2 gives you

| Area | ADK v1 | ADK v2 (workflow runtime) |
| - | - | - |
| Execution model | Tree/linear | Graph (nodes & edges) |
| Branching & looping | Limited | Native, dynamic at runtime |
| Parallelism | Ad hoc | Fan-out & parallel nodes |
| Reliability | Conversations could crash | Retries, rewind/replay, targeted recovery |
| Observability | Limited traceability | Event stream / audit trail for every node |
| Templates | Built-in agents only | Templates run on graph + custom graphs |

References and further reading

* [Google ADK documentation](https://developers.google.com/ai/assistants) (reference)
* [Google I/O 2025 keynote highlights](https://events.google.com/io) (overview)

Next, install ADK v2 and get `my_agent` talking.

> [card] [Watch Video](https://learn.kodekloud.com/user/courses/google-adk-2-0/module/1d143913-38fb-4a53-8976-041e503dbf12/lesson/322098a6-625f-4d52-bcd0-91428482acf3)


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