Skip to content

fix: Remove end_invocation check to ensure after_agent callbacks execute #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

rcleveng
Copy link

@rcleveng rcleveng commented Jul 2, 2025

Removes the end_invocation check that was preventing after_agent callbacks
from running. This ensures all registered callbacks are executed properly
regardless of the invocation status.

Fixes discussion: #1689

  Removes the end_invocation check that was preventing after_agent callbacks
  from running. This ensures all registered callbacks are executed properly
  regardless of the invocation status.

  Fixes discussion: google#1689
Copy link

google-cla bot commented Jul 2, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

sindrigunnars and others added 23 commits July 10, 2025 09:42
…same session id

test: refine test_session_state in test_session_state to catch event leakage

fix: revert app name to my_app for test_session_state test

style: fix pyink style warnings

fix: add app_name to filter as per suggestion from rpedela-recurly
Adds a description for docstring and comments in the AGENTS.md and adds a section for Versioning that describes how ADK follows Semantic Versioning 2.0.0

PiperOrigin-RevId: 778667398
Resolves google#1739

PiperOrigin-RevId: 778692588
…ty constraint failures

Fixes google#719 where duplicate Event IDs caused database constraint violations
during streaming responses. Replaces 8-character random string generation
with UUID4 to ensure globally unique identifiers.

Changes:
- Replace Event.new_id() random string approach with uuid.uuid4()
- Remove unused random and string imports
- Add uuid import

Eliminates SQLite UNIQUE constraint failures in streaming scenarios.
…e for production

environment

Resolves google#1569

PiperOrigin-RevId: 780013850
fix: Use `inspect.signature()` instead of `typing.get_type_hints()` to find the LiveRequestQueue.
Motivation: `typing.get_type_hints()` may raise errors in complex scenarios where type annotation is not available.

Add live_bidi_streaming_tools_agent example to show how to use the live streaming feature.

PiperOrigin-RevId: 780160921
This explains the high-level architecture and philosophy of the ADK project.
It can also be feed into LLMs for vibe-coding.

PiperOrigin-RevId: 780178125
This PR extends the existing Streaming tests to consider new configurations that have been added, including:

- `output_audio_transcription`
- `input_audio_transcription`
- `realtime_input_config`
- `enable_affective_dialog`
- `proactivity`

These configurations are tested individually and also combined, to cover all the possibilities, increasing the testing coverage and ensuring everything is working as expected.

In addition, the new configuration values are also validated to be sure they are properly initialized.

PiperOrigin-RevId: 780178334
…thout reloading anything

PiperOrigin-RevId: 780710003
PiperOrigin-RevId: 780740004
Automatically generate reasonable PR descriptions.

PiperOrigin-RevId: 781078962
PiperOrigin-RevId: 781196782
This would allow users to easily make a copy of the agents they built without having to add too much boilerplates. This promotes code reuse, modularity and testability of agents.

PiperOrigin-RevId: 781214379
PiperOrigin-RevId: 781272837
This commit includes a number of new tests for live streaming with function calls. These tests cover various scenarios:
- Single function calls
- Multiple function calls
- Parallel function calls
- Function calls with errors
- Synchronous function calls
- Simple streaming tools
- Video streaming tools
- Stopping a streaming tool
- Multiple streaming tools simultaneously

The tests use mock models and custom runners to simulate the interaction between the agent, model, and tools. They verify that function calls are correctly generated, executed, and that the expected data is returned.

PiperOrigin-RevId: 781318483
- Allow run_async to break on partial events instead of raising ValueError
- Generate aggregated streaming content regardless of finish_reason
- Add error_code and error_message to final streaming responses if model response is interrupted.

PiperOrigin-RevId: 781377328
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.