1583 Commits

Author SHA1 Message Date
Yeesian Ng 0b1784e0e4 fix: Update dependency version constraints to be based on PyPI versions
Co-authored-by: Yeesian Ng <ysian@google.com>
PiperOrigin-RevId: 828460860
v1.18.0
2025-11-05 07:32:00 -08:00
Xuan Yang e01e54e9ee chore: Bumps version to v1.18.0 and updates CHANGELOG.md
Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 828313025
2025-11-04 23:20:57 -08:00
Google Team Member 63353b2b74 feat: Refactor gepa sample code and clean-up user demo colab
PiperOrigin-RevId: 828293079
2025-11-04 22:16:55 -08:00
Nimantha Cooray 4284c61901 fix: agent evaluations detailed output rows wrapping issue
Merge https://github.com/google/adk-python/pull/3381

### Link to Issue or Description of Change

**1. Link to an existing issue (if applicable):**

- Closes: #3363
- This PR sets a max column width for the table printed in detailed output of agent evaluations.

**Problem:**
The detailed output of agent evaluations is not readable due to rows in the table getting wrapped. This happens when there are long text values in cells.

<img width="1904" height="717" alt="508807185-9e8fe1c3-d04a-43dd-acf9-0befaa1b247d" src="https://github.com/user-attachments/assets/61526ad2-8a9e-4c18-83e2-51a3b9b32d2b" />

**Solution:**
Existing code uses `tabulate` python package to format the table. We can set a maximum column width using `maxcolwidths` parameter. I have set it to `25`.

After the fix:
<img width="1882" height="711" alt="508810179-b91c5bca-fb43-480b-90ff-bca2e909417c" src="https://github.com/user-attachments/assets/b653f825-719e-4101-9acb-e28a52694cf8" />

### Testing Plan

I have manually tested if the output is properly displayed after changes. Please let me know if any unit tests can be added for this.

**Unit Tests:**

- [ ] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.

<img width="1627" height="39" alt="image" src="https://github.com/user-attachments/assets/59a70619-3669-4113-8ab7-dcff130ee241" />

**Manual End-to-End (E2E) Tests:**

1. Create a simple agent using adk (preferably an agent that outputs a long text).
2. Create an evalset for this agent.
3. Run the evalset with `print_detailed_results` option and check if the output is properly displayed.

If you want a quick setup for testing this, I have a sample repo with an agent and an evalset [here](https://github.com/nimanthadilz/adk-test/tree/reproduce-print-detailed-results). You will have to manually build & install the fixed adk version to test it.

### 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.
- [ ] 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/3381 from nimanthadilz:fix-eval-output-rows-wrapping-issue f6d40121f621df60c4596a1c62e0c54e4da309d3
PiperOrigin-RevId: 828265715
2025-11-04 20:40:45 -08:00
Hyeongjun Kang 0c49aef251 chore: correct typo in pyproject.toml (swtich → switch)
Merge https://github.com/google/adk-python/pull/2651

### Summary
Correct a misspelling in the build configuration:
- "swtich" → "switch" in `pyproject.toml`.

### Rationale
This is a spelling fix only. It improves readability and avoids potential confusion in configuration.
There is no impact on runtime behavior, tests, or public APIs.

### Notes
- Follows Conventional Commits style for build/config changes (`build:`).
- CLA status should be green via the Google CLA bot.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2651 from marsboy02:docs/fix-type-pyproject b78c014c864b1a143ffc157c7a8c807f5f19d31d
PiperOrigin-RevId: 828221776
2025-11-04 18:30:22 -08:00
Yeesian Ng d4b2a8b49f feat: Add support for Vertex AI Express Mode when deploying to Agent Engine
Co-authored-by: Yeesian Ng <ysian@google.com>
PiperOrigin-RevId: 828178479
2025-11-04 16:24:07 -08:00
Google Team Member 033f5a5d3f feat: Add configuration options to BigQuery logging plugin
This change introduces BigQueryLoggerConfig to allow customization of the BigQueryAgentAnalyticsPlugin. Users can now enable/disable the plugin, specify event type allowlists and denylists, and provide a custom function to format or redact the content field before logging to BigQuery. The content logged for model and tool errors has also been enhanced.

PiperOrigin-RevId: 828172241
2025-11-04 16:06:49 -08:00
Kathy Wu 88032cf5c5 feat: Support MCP prompts
Add support for MCP prompts via the McpInstructionProvider class, which can be specified as an agent's instruction.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 828166051
2025-11-04 15:48:21 -08:00
Kathy Wu 11571c37ab fix: Reduce logging spam for MCP tools without authentication
Users were getting spammed with this log even though their tools didn't require authentication. To fix, reduce the log level to DEBUG so that it doesn't show up by default.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 828161281
2025-11-04 15:34:24 -08:00
Hangfei Lin 432d30af48 chore: Add Community Repo section to README
This change introduces a new section in the README.md to highlight the `adk-python-community` GitHub repository, describing it as a place for community-contributed tools and integrations.

Co-authored-by: Hangfei Lin <hangfei@google.com>
PiperOrigin-RevId: 828155205
2025-11-04 15:17:48 -08:00
Google Team Member 54db3d4434 fix: update the contribution analysis tool to use original write mode
PiperOrigin-RevId: 828126582
2025-11-04 14:05:28 -08:00
Kathy Wu 6e5c0eb6e0 feat: Add token usage to live events for bidi streaming
Populate the usage_metadata field for live events with the metadata provided by the Gemini live API.

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 828124232
2025-11-04 14:01:25 -08:00
Eliza Huang 4f85e86fc3 feat: Add support for extracting cache-related token counts from LiteLLM usage
Closes #3049

Co-authored-by: Eliza Huang <heliza@google.com>
PiperOrigin-RevId: 828091671
2025-11-04 12:43:06 -08:00
Yifan Wang abdc2bb954 chore: update adk web for adk web builder: https://github.com/google/adk-web/pull/248
Co-authored-by: Yifan Wang <wanyif@google.com>
PiperOrigin-RevId: 828061540
2025-11-04 11:27:48 -08:00
George Weale ce91a8ef73 fix: Pass drop_params to LiteLLM completion API
This lets users to specify `drop_params` when initializing `LiteLlm`, which will be forwarded to LiteLLM's `acompletion` or `completion` calls

Close #1718

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 828058105
2025-11-04 11:19:58 -08:00
Shan Cao d4c63fc562 chore: Add model tracking to LiteLlm and introduce a LiteLLM with fallbacks demo
Related: #2292

Co-authored-by: Shan Cao <caoshan@google.com>
PiperOrigin-RevId: 828024955
2025-11-04 10:10:09 -08:00
George Weale e25beb4bce docs: Refine ADK triaging agent labeling guidelines and response format
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 828022792
2025-11-04 10:05:20 -08:00
George Weale 489c39db01 fix: Remove redundant format field from LiteLLM content objects
LiteLLM providers can extract the MIME type from the data URI. Removing the separate `format` field avoids redundancy and potential issues with backends that may reject requests containing this field.

Close #2017

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 828014286
2025-11-04 09:44:38 -08:00
Google Team Member 38ea749c9c feat: Extend Bigquery detect_anomalies tool to support future data anomaly detection
ARIMA supports both historical data and future data anomaly detection. This CL add how the tool support future table anomaly detection.

PiperOrigin-RevId: 827803748
2025-11-03 23:02:02 -08:00
Haegyun Lee d2888a3766 fix: Fix typo in several files
Merge https://github.com/google/adk-python/pull/3365

**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**

fix typo for several files.

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

### Additional context

_Add any other context or screenshots about the feature request here._

Co-authored-by: Liang Wu <wuliang@google.com>
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3365 from UlookEE:fix_typo 1469de4ea354d1c205268b999183ee86c9d6a1d5
PiperOrigin-RevId: 827724001
2025-11-03 18:07:34 -08:00
Xuan Yang 6a94af24bf chore: Disable SetModelResponseTool workaround for Vertex AI Gemini 2+ models
Gemini models now [support Function calling being used together with structured output on Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#structured-output-bp).

Co-authored-by: Xuan Yang <xygoogle@google.com>
PiperOrigin-RevId: 827709903
2025-11-03 17:12:01 -08:00
Yifan Wang 8b6ee576d5 chore: remove working_in_progress for agent builder endpoints
Co-authored-by: Yifan Wang <wanyif@google.com>
PiperOrigin-RevId: 827698290
2025-11-03 16:37:38 -08:00
Haegyun Lee f81ebdb622 fix: Bug when callback_context_invocation_context is missing in GlobalInstructionPlugin
Merge #3163
END_PUBLIC

Hello,
Since global_instruction has been deprecated, I’m migrating to GlobalInstructionPlugin.
During the migration, I encountered an error and am submitting this PR to fix it.

In [df05ed6](https://github.com/google/adk-python/commit/df05ed6b3b7b218d85fddc1acd6617802cdf6f2a) ,
GlobalInstructionPlugin references invocation_context, but CallbackContext actually contains _invocation_context.
This mismatch always causes an error during execution.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3180 from UlookEE:fix_global_instruction_plugin e289a12d69812f0abcfe77db0114fdb2045b31bc
PiperOrigin-RevId: 827682501
2025-11-03 15:54:54 -08:00
George Weale c33a680b54 docs: Add instructions to prevent tool hallucination
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 827632446
2025-11-03 13:41:03 -08:00
Josh Soref aa1233608a chore: Fix spelling
Merge https://github.com/google/adk-python/pull/2447

This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling)

The misspellings have been reported at https://github.com/jsoref/adk-python/actions/runs/16840838898/attempts/1#summary-47711379253

The action reports that the changes in this PR would make it happy: https://github.com/jsoref/adk-python/actions/runs/16840839269/attempts/1#summary-47711380479

Note: while I use tooling to identify errors, the tooling doesn't _actually_ provide the corrections, I'm picking them on my own. I'm a human, and I may make mistakes.

I've included a couple of changes to make CI happy. Personally, I object to CI being in a state of "random drive by person who adds a blank line in the middle of a file must fix all the preexisting bugs in the file", but that appears to be the state for this repository.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2447 from jsoref:spelling d85398e7fd154d124d477c6af6181481a01f34e0
PiperOrigin-RevId: 827629615
2025-11-03 13:33:53 -08:00