Skip to content
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,24 @@ jobs:
grep -E '^(pytest|pytest-asyncio|pytest-xdist|respx|dirty-equals|time-machine)==' requirements-dev.lock > test-tools.txt
# Resolve as of a day ago: a release still uploading its wheels forces a
# source build that can fail (SQLAlchemy 2.1.0 did).
# google-adk<2: 2.x wraps callback exceptions and fails test_user_exception_propagates_without_chaining.
uv pip install --exclude-newer "$(date -u -d '1 day ago' +%Y-%m-%dT%H:%M:%SZ)" \
-e '.[aiohttp]' -r test-tools.txt \
openai boto3 claude-agent-sdk 'google-adk<2' google-genai langchain-core wrapt \
openai boto3 claude-agent-sdk google-adk google-genai langchain-core wrapt \
azure-cognitiveservices-speech

# Generated API tests need the mock server and already run in `test`.
- name: Run integration tests
run: .venv/bin/pytest --ignore=tests/api_resources

# google-adk 2.x runs agents as workflow nodes and moved the patch targets,
# so the ADK tracer also has to keep working on 1.x. Runs even when the
# step above fails, and resolves as of a day ago for the same reason.
- name: Run Google ADK tests on google-adk 1.x
if: ${{ !cancelled() }}
run: |
uv pip install --exclude-newer "$(date -u -d '1 day ago' +%Y-%m-%dT%H:%M:%SZ)" 'google-adk<2'
.venv/bin/pytest tests/test_google_adk_handoffs.py tests/test_google_adk_integration.py tests/test_google_genai_adk_dedup.py

# The one check to require in rulesets, so jobs can be added or renamed freely.
# The integrations job stays advisory until its optional dependencies are pinned.
# always(), not !cancelled(): a skipped required check would count as passing.
Expand Down
41 changes: 24 additions & 17 deletions examples/tracing/google-adk/google_adk_tracing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,15 @@
"\n",
"After running the callback agent, you'll see in your Openlayer dashboard:\n",
"\n",
"1. **Agent Step** (`CallbackDemoAgent`):\n",
"1. **Agent turn step** (`Agent turn: <app_name>`): one per `runner.run_async` call, holding\n",
" the user's message, the final answer and the routing columns (`starting_agent`,\n",
" `final_agent`, `handoff_count`, `handoff_path`)\n",
"\n",
"2. **Agent Step** (`CallbackDemoAgent`), inside the turn:\n",
" - Shows which callbacks are registered\n",
" - Contains all nested steps in chronological order\n",
"\n",
"2. **All Callbacks as Siblings** (direct children of Agent):\n",
"3. **All Callbacks as Siblings** (direct children of Agent):\n",
" - `Callback: before_agent` - First, before any processing\n",
" - `Callback: before_model` - Before each LLM call\n",
" - `LLM Call: gemini-2.0-flash-exp` - The actual LLM invocation\n",
Expand All @@ -512,9 +516,9 @@
" - `Callback: after_tool` - After tool completion\n",
" - `Callback: after_agent` - Last, after all processing complete\n",
"\n",
"3. **Token Usage** (captured on LLM Call steps):\n",
"4. **Token Usage** (captured on LLM Call steps):\n",
" - Prompt tokens\n",
" - Completion tokens \n",
" - Completion tokens (including thinking tokens)\n",
" - Total tokens\n"
]
},
Expand All @@ -538,21 +542,24 @@
"\n",
"The traces will show the hierarchy of operations in chronological order:\n",
"```\n",
"Agent: CallbackDemoAgent\n",
"├── Callback: before_agent (CallbackDemoAgent)\n",
"├── Callback: before_model (CallbackDemoAgent)\n",
"├── LLM Call: gemini-2.0-flash-exp\n",
"├── Callback: after_model (CallbackDemoAgent)\n",
"├── Callback: before_tool (CallbackDemoAgent)\n",
"├── Tool: get_current_time\n",
"├── Callback: after_tool (CallbackDemoAgent)\n",
"├── Callback: before_model (CallbackDemoAgent)\n",
"├── LLM Call: gemini-2.0-flash-exp\n",
"├── Callback: after_model (CallbackDemoAgent)\n",
"└── Callback: after_agent (CallbackDemoAgent)\n",
"Agent turn: <app_name>\n",
"└── Agent: CallbackDemoAgent\n",
" ├── Callback: before_agent (CallbackDemoAgent)\n",
" ├── Callback: before_model (CallbackDemoAgent)\n",
" ├── LLM Call: gemini-2.0-flash-exp\n",
" ├── Callback: after_model (CallbackDemoAgent)\n",
" ├── Callback: before_tool (CallbackDemoAgent)\n",
" ├── Tool: get_current_time\n",
" ├── Callback: after_tool (CallbackDemoAgent)\n",
" ├── Callback: before_model (CallbackDemoAgent)\n",
" ├── LLM Call: gemini-2.0-flash-exp\n",
" ├── Callback: after_model (CallbackDemoAgent)\n",
" └── Callback: after_agent (CallbackDemoAgent)\n",
"```\n",
"\n",
"**Note:** All callbacks are direct children of the Agent step, appearing in chronological order alongside LLM calls and tool executions. This provides a clear timeline view of the agent execution flow.\n"
"**Note:** All callbacks are direct children of the Agent step, appearing in chronological order alongside LLM calls and tool executions. This provides a clear timeline view of the agent execution flow.\n",
"\n",
"With sub-agents, each transfer ADK makes is a `Handoff: <from> → <to>` step inside the transferring agent, and the agent that takes over is the next step of the turn. Agents used as tools (`AgentTool`) stay nested under their Tool step and aren't counted as handoffs.\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Loading
Loading