Updated references from 'Alpha' to 'Beta' and updated the installation example version to 2.0.0b1.
Change-Id: I01a28b7ff7be5cc3281e94e86e19bd083e151de8
Two ADK source files import third-party packages that are not declared
in [project] dependencies, leaving bare `pip install google-adk` one
transitive resolver change away from breaking on `from google.adk import
Runner`:
* utils/model_name_utils.py and cli/cli_deploy.py do
`from packaging.version import …` at module top level. Reachable from
the canonical import chain (runners.py -> telemetry.tracing ->
utils.model_name_utils) and from `adk --help`. Reproduced today by
uninstalling packaging from a fresh venv.
* tools/environment_simulation/environment_simulation_config.py does
`from pydantic_core import ValidationError`. pydantic-core ships with
pydantic, so this works at runtime, but the dep is undeclared. pydantic
re-exports ValidationError, so swap the import.
Adds packaging>=21.0 to main deps and switches the env_simulation import
to pydantic. Includes guard tests in tests/unittests/test_release_
dependencies.py that pin the contract.
Change-Id: Idab2bffe8ae1d66aa049801fbfff9569af7b7687
Add a new sample 'auth_oauth' demonstrating how to request a GitHub OAuth token in a workflow and use it to list repositories. Also rename the 'auth_config' sample to 'auth_api_key' for consistency.
Change-Id: I014b2f46f74b3017be89efc092380087179cf533
Changed absolute imports from google.adk to relative imports within the cli/ package to comply with the project rule that CLI should use relative imports.
Change-Id: Iaa2ff11ddbf2b387c0be58ed9600458177cc6108
The adk-style skill was too broad, covering both architecture and style. Splitting it allows AI assistants to consult only the relevant knowledge base, improving efficiency and accuracy. Also flattened references in adk-style.
Change-Id: I4fb76376fc6ebc31cd48b97874585d3608f33e0d
Added a new unit test test_event_serialization_always_camel_case in test_workflow_events.py. The test recursively verifies that all keys in a serialized Event model use camelCase, ensuring consistency with frontend expectations and catching accidental additions of snake_case fields.
Change-Id: I12ff59079b59ad5fd421e659c80450cf10c15bbb
The AGENTS.md file was over-bloated and stale. It has been updated to be a short index-like file that points to the adk-style skill for detailed architecture and style knowledge.
Change-Id: If28f175b763d415a87d2f1f4d7d707c7711b667e
Add alias_generator and populate_by_name to RequestInput model_config to match frontend naming conventions and other event models.
Change-Id: I5eb4a55185d0113d86407c119050bb9885a7962b
The version was changed from 2.0.0a3 to 2.0.0b1 to follow Python standards for beta releases, as part of moving the project to the beta phase.
Change-Id: Ie52c5abb7192daefd8e044dcca44f25b8e029969
Replace asyncio.timeout() (3.11+) with asyncio.wait_for() so node
timeouts work on Python 3.10. Fix typing.Self import in telemetry
tests with a 3.10-compatible fallback. Update pyproject.toml to
declare >=3.10 and add the 3.10 classifier.
Change-Id: Ibe1dcf4a1d44014891aa487aac6e160203c38a58
BaseNode.run() wrapped raw yields into Event(output=item) without
calling _validate_output_data(), so output_schema was never enforced
by the runtime for custom nodes. Moved validation into run() so it
applies centrally to all yields — both raw values and Event objects
with output. Updated tests to remove manual _validate_output_data()
calls and added tests proving runtime enforcement.
Change-Id: I4a984e71ae0027daa5cdfb9e3ba7936688743488
Narrows exception handling across the workflow package to catch only
the specific errors that can actually occur, preventing silent
swallowing of unexpected bugs.
- _base_node.py: except Exception → except ValidationError (4 sites)
- _dynamic_node_scheduler.py: except Exception → except ValidationError
- _rehydration_utils.py: except Exception → except ValidationError (3) + ValueError (1)
- _function_node.py: except Exception → except (TypeError, NameError, AttributeError)
and except (TypeError, PydanticSchemaGenerationError)
The intentional catch-all in _node_runner.py (top-level node error
boundary) is left unchanged as it correctly handles any failure.
Change-Id: I064450f75ea6650def910a3eae5e24d8995e3abe
This change introduces a new query parameter `save_live_blob` to the `/run_live` WebSocket endpoint in the ADK web server. When set to true, this parameter enables saving of live blobs during the session. The default value is false. Unit tests are updated to cover this new parameter.
Closes issue #4707
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 901280577
Change-Id: I1359cb831c5bb7ddfa11e5d1d4ebed18080d00f2
New metrics added:
- gen_ai.agent.invocation.duration
- gen_ai.tool.execution.duration
- gen_ai.agent.request.size
- gen_ai.agent.response.size
- gen_ai.agent.workflow.steps
New metrics and attributes are in line with OTel semantic conventions where possible, and will be formally to the semconv later.
PiperOrigin-RevId: 901156576
Change-Id: I0d6afc50287e643245d6fc7690d9841d9f22eaab
Default is True to match existing behavior. Setting it to False prevents the model from loading artifact directly from a provided canonical URI, and makes the behavior consistent between InMemoryArtifactService and other services with canonical URIs.
PiperOrigin-RevId: 901061080
Change-Id: I3079a3cd57e4517c38b62c8e8a7bc1278ae1936e
Merge https://github.com/google/adk-python/pull/4802
**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**
### Link to Issue or Description of Change
- Closes: #4623
**Problem:**
example_util.py was completely missing unit tests.
**Solution:**
I added unit tests for a variety of situations:
- Converting a text-only example to a string
- Converting a text-only example _with multiple Parts_ to a string
- Converting a text-only example to a string when the output contains a conversation between the user and model
- Converting another text-only example with a conversational output, but with clumped messages from each
- Converting an empty list to a string
- Converting an example including a function call to a string
- Converting an example including a function _response_ to a string
- Converting an example including both a function call _and_ a function response to a string
- Converting an example with text, a function call, and a function response to a string
- Building System Information from a list of examples
- Building System Information from an example provider
### Testing Plan
I ran the tests personally, and they successfully passed.
**Unit Tests:**
- [✓] I have added or updated unit tests for my change.
- [✓] All unit tests pass locally.
33 passed in 2.55s
**Manual End-to-End (E2E) Tests:**
To test my change, simply run the unit tests and they should pass. If you want to verify the effectiveness of my tests, try modifying the input given to my unit tests and see if they fail.
### Checklist
- [✓] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [✓] I have performed a self-review of my own code.
- [✓] I have commented my code, particularly in hard-to-understand areas.
- [✓] I have added tests that prove my fix is effective or that my feature works.
- [✓] New and existing unit tests pass locally with my changes.
- [✓] I have manually tested my changes end-to-end.
- [✓] Any dependent changes have been merged and published in downstream modules.
### Additional context
- I noticed build_example_si takes an argument for query even though it's not used if you pass in a list rather than a BaseExampleProvider. Is this expected behavior that is there for a reason, or should I open an issue for this?
- I also noticed that when model is None, it defaults to Gemini 2. This seems like it could cause issues on the user end. Is there a reason for this functionality?
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4802 from BowedMars374878:Issue-#4623 efa090e264b4cc155d4937ea2f2d8d90d7753ae6
PiperOrigin-RevId: 901025765
Change-Id: Ief9c2163e8d975f231a67a311967753a46c71d29
This will allow agent transfer to work smoothly in live workflow. See the comment added for details.
Closes issue #5238
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 900993889
Change-Id: I34c5f768482bc71351278dc0a2466885799dad1a
During agent transfer, the input transcription is represented as user input. Also, the previous implementation is incorrect in that the LlmResponse could never have content.role == 'user'. Modified the docstring to match the behavior.
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 900980704
Change-Id: Ia48057c7f02b10be63f6d0e255c07fab177e759d
Merge https://github.com/google/adk-python/pull/4705
### Link to Issue or Description of Change
- Closes: #4666
**Problem:**
Gemini-2.0-flash model is still used in integration tests, but disabled for new users
**Solution:**
Replace all occurrences of Gemini-2.0-flash by Gemini-2.5-flash, in integration tests and docstrings.
Because gemini-2.0 is still enabled for some users, this PR doesn't clean the model from unit tests.
### Testing Plan
Run already existing unittests and integration tests
### Checklist
- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [x] I have manually tested my changes end-to-end.
- [x] Any dependent changes have been merged and published in downstream modules.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/4705 from morganroux:fix/issues/4666 3c390a2ed3abb7b2fc7bd99cfb801e8a2b1f5343
PiperOrigin-RevId: 900973552
Change-Id: I1d2dd4c749522b529537d5863e4a56865927da95
This change introduces `_add_events_to_memory_via_ingest` in `VertexAiMemoryBankService` to support adding events to memory using the `memories.ingest_events` API. This allows passing additional configurations such as `stream_id`, `force_flush`, and `generation_trigger_config`.
This path is triggered when `custom_metadata` contains `use_ingest` or `generation_trigger_config`.
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 900924805
Change-Id: Id1ae9f5050d38753c5d4791acc6f5ab3332a2f9f
These are not used in the example
Co-authored-by: Liang Wu <wuliang@google.com>
PiperOrigin-RevId: 900902777
Change-Id: Iadaaf9b03499d969f18e03eafb9fc21d79d94d87
This allows headers to refresh on each request. Also only add auth headers if no auth_scheme or auth_credential is specified
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 900900323
Change-Id: Idf2ec208616528612a428a5260ea0455dd986174
Use ScheduleDynamicNode protocol for type hints in context.py to avoid importing the concrete DynamicNodeScheduler at the module level. This helps prevent circular dependencies.
DynamicNodeScheduler now explicitly implements the protocol.
Change-Id: Ic5f58443d84b68bbcfd5e7b3aeea28f06e48c5e1