Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/agents/custom-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,10 @@ Allows an [`LlmAgent`](llm-agents.md) to treat another `BaseAgent` instance as a

```python
# Conceptual Setup: Agent as a Tool
from google.adk import Event
from google.adk.agents import LlmAgent, BaseAgent
from google.adk.tools import agent_tool
from google.genai import types
from pydantic import BaseModel


Expand Down
7 changes: 7 additions & 0 deletions docs/graphs/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ A sequential route runs each node once, in the listed order.
`Event(route=...)` value, which the `edges` dict dispatches to different nodes.

```python
from google.adk import Event, Workflow
from google.adk.agents import Agent


def router(node_input: str):
"""Route to task B or C based on node_input."""
if condition(node_input):
Expand Down Expand Up @@ -407,6 +411,9 @@ lifecycle on each iteration.
=== "Python"

```python
from google.adk import Event, Workflow


def router(node_input: str):
"""Route to task B or C based on node_input."""
if condition(node_input):
Expand Down