Skip to content

Commit 7eee2ef

Browse files
committed
Merge branch 'main' into feature/support-mcp-tool-prefix
2 parents 8b766fc + 7c670f6 commit 7eee2ef

File tree

60 files changed

+6425
-1130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6425
-1130
lines changed

.github/workflows/python-unit-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then
5252
pytest tests/unittests \
5353
--ignore=tests/unittests/a2a \
54+
--ignore=tests/unittests/tools/mcp_tool \
5455
--ignore=tests/unittests/artifacts/test_artifact_service.py \
5556
--ignore=tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py
5657
else

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# Changelog
22

3+
## [1.4.2](https://github.com/google/adk-python/compare/v1.4.1...v1.4.2) (2025-06-20)
4+
5+
6+
### Bug Fixes
7+
8+
* Add type checking to handle different response type of genai API client ([4d72d31](https://github.com/google/adk-python/commit/4d72d31b13f352245baa72b78502206dcbe25406))
9+
* This fixes the broken VertexAiSessionService
10+
* Allow more credentials types for BigQuery tools ([2f716ad](https://github.com/google/adk-python/commit/2f716ada7fbcf8e03ff5ae16ce26a80ca6fd7bf6))
11+
12+
## [1.4.1](https://github.com/google/adk-python/compare/v1.3.0...v1.4.1) (2025-06-18)
13+
14+
15+
### Features
16+
17+
* Add Authenticated Tool (Experimental) ([dcea776](https://github.com/google/adk-python/commit/dcea7767c67c7edfb694304df32dca10b74c9a71))
18+
* Add enable_affective_dialog and proactivity to run_config and llm_request ([fe1d5aa](https://github.com/google/adk-python/commit/fe1d5aa439cc56b89d248a52556c0a9b4cbd15e4))
19+
* Add import session API in the fast API ([233fd20](https://github.com/google/adk-python/commit/233fd2024346abd7f89a16c444de0cf26da5c1a1))
20+
* Add integration tests for litellm with and without turning on add_function_to_prompt ([8e28587](https://github.com/google/adk-python/commit/8e285874da7f5188ea228eb4d7262dbb33b1ae6f))
21+
* Allow data_store_specs pass into ADK VAIS built-in tool ([675faef](https://github.com/google/adk-python/commit/675faefc670b5cd41991939fe0fc604df331111a))
22+
* Enable MCP Tool Auth (Experimental) ([157d9be](https://github.com/google/adk-python/commit/157d9be88d92f22320604832e5a334a6eb81e4af))
23+
* Implement GcsEvalSetResultsManager to handle storage of eval sets on GCS, and refactor eval set results manager ([0a5cf45](https://github.com/google/adk-python/commit/0a5cf45a75aca7b0322136b65ca5504a0c3c7362))
24+
* Re-factor some eval sets manager logic, and implement GcsEvalSetsManager to handle storage of eval sets on GCS ([1551bd4](https://github.com/google/adk-python/commit/1551bd4f4d7042fffb497d9308b05f92d45d818f))
25+
* Support real time input config ([d22920b](https://github.com/google/adk-python/commit/d22920bd7f827461afd649601326b0c58aea6716))
26+
* Support refresh access token automatically for rest_api_tool ([1779801](https://github.com/google/adk-python/commit/177980106b2f7be9a8c0a02f395ff0f85faa0c5a))
27+
28+
### Bug Fixes
29+
30+
* Fix Agent generate config err ([#1305](https://github.com/google/adk-python/issues/1305)) ([badbcbd](https://github.com/google/adk-python/commit/badbcbd7a464e6b323cf3164d2bcd4e27cbc057f))
31+
* Fix Agent generate config error ([#1450](https://github.com/google/adk-python/issues/1450)) ([694b712](https://github.com/google/adk-python/commit/694b71256c631d44bb4c4488279ea91d82f43e26))
32+
* Fix liteLLM test failures ([fef8778](https://github.com/google/adk-python/commit/fef87784297b806914de307f48c51d83f977298f))
33+
* Fix tracing for live ([58e07ca](https://github.com/google/adk-python/commit/58e07cae83048d5213d822be5197a96be9ce2950))
34+
* Merge custom http options with adk specific http options in model api request ([4ccda99](https://github.com/google/adk-python/commit/4ccda99e8ec7aa715399b4b83c3f101c299a95e8))
35+
* Remove unnecessary double quote on Claude docstring ([bbceb4f](https://github.com/google/adk-python/commit/bbceb4f2e89f720533b99cf356c532024a120dc4))
36+
* Set explicit project in the BigQuery client ([6d174eb](https://github.com/google/adk-python/commit/6d174eba305a51fcf2122c0fd481378752d690ef))
37+
* Support streaming in litellm + adk and add corresponding integration tests ([aafa80b](https://github.com/google/adk-python/commit/aafa80bd85a49fb1c1a255ac797587cffd3fa567))
38+
* Support project-based gemini model path to use google_search_tool ([b2fc774](https://github.com/google/adk-python/commit/b2fc7740b363a4e33ec99c7377f396f5cee40b5a))
39+
* Update conversion between Celsius and Fahrenheit ([1ae176a](https://github.com/google/adk-python/commit/1ae176ad2fa2b691714ac979aec21f1cf7d35e45))
40+
41+
### Chores
42+
43+
* Set `agent_engine_id` in the VertexAiSessionService constructor, also use the `agent_engine_id` field instead of overriding `app_name` in FastAPI endpoint ([fc65873](https://github.com/google/adk-python/commit/fc65873d7c31be607f6cd6690f142a031631582a))
44+
45+
46+
347
## [1.3.0](https://github.com/google/adk-python/compare/v1.2.1...v1.3.0) (2025-06-11)
448

549

contributing/samples/bigquery/README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,28 @@ would set:
4040
### With Application Default Credentials
4141

4242
This mode is useful for quick development when the agent builder is the only
43-
user interacting with the agent. The tools are initialized with the default
44-
credentials present on the machine running the agent.
43+
user interacting with the agent. The tools are run with these credentials.
4544

4645
1. Create application default credentials on the machine where the agent would
4746
be running by following https://cloud.google.com/docs/authentication/provide-credentials-adc.
4847

49-
1. Set `RUN_WITH_ADC=True` in `agent.py` and run the agent
48+
1. Set `CREDENTIALS_TYPE=None` in `agent.py`
49+
50+
1. Run the agent
51+
52+
### With Service Account Keys
53+
54+
This mode is useful for quick development when the agent builder wants to run
55+
the agent with service account credentials. The tools are run with these
56+
credentials.
57+
58+
1. Create service account key by following https://cloud.google.com/iam/docs/service-account-creds#user-managed-keys.
59+
60+
1. Set `CREDENTIALS_TYPE=AuthCredentialTypes.SERVICE_ACCOUNT` in `agent.py`
61+
62+
1. Download the key file and replace `"service_account_key.json"` with the path
63+
64+
1. Run the agent
5065

5166
### With Interactive OAuth
5267

@@ -72,7 +87,7 @@ type.
7287
Note: don't create a separate .env, instead put it to the same .env file that
7388
stores your Vertex AI or Dev ML credentials
7489

75-
1. Set `RUN_WITH_ADC=False` in `agent.py` and run the agent
90+
1. Set `CREDENTIALS_TYPE=AuthCredentialTypes.OAUTH2` in `agent.py` and run the agent
7691

7792
## Sample prompts
7893

contributing/samples/bigquery/agent.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,42 @@
1515
import os
1616

1717
from google.adk.agents import llm_agent
18+
from google.adk.auth import AuthCredentialTypes
1819
from google.adk.tools.bigquery import BigQueryCredentialsConfig
1920
from google.adk.tools.bigquery import BigQueryToolset
2021
from google.adk.tools.bigquery.config import BigQueryToolConfig
2122
from google.adk.tools.bigquery.config import WriteMode
2223
import google.auth
2324

24-
RUN_WITH_ADC = False
25+
# Define an appropriate credential type
26+
CREDENTIALS_TYPE = AuthCredentialTypes.OAUTH2
2527

2628

29+
# Define BigQuery tool config
2730
tool_config = BigQueryToolConfig(write_mode=WriteMode.ALLOWED)
2831

29-
if RUN_WITH_ADC:
30-
# Initialize the tools to use the application default credentials.
31-
application_default_credentials, _ = google.auth.default()
32-
credentials_config = BigQueryCredentialsConfig(
33-
credentials=application_default_credentials
34-
)
35-
else:
32+
if CREDENTIALS_TYPE == AuthCredentialTypes.OAUTH2:
3633
# Initiaze the tools to do interactive OAuth
3734
# The environment variables OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET
3835
# must be set
3936
credentials_config = BigQueryCredentialsConfig(
4037
client_id=os.getenv("OAUTH_CLIENT_ID"),
4138
client_secret=os.getenv("OAUTH_CLIENT_SECRET"),
4239
)
40+
elif CREDENTIALS_TYPE == AuthCredentialTypes.SERVICE_ACCOUNT:
41+
# Initialize the tools to use the credentials in the service account key.
42+
# If this flow is enabled, make sure to replace the file path with your own
43+
# service account key file
44+
# https://cloud.google.com/iam/docs/service-account-creds#user-managed-keys
45+
creds, _ = google.auth.load_credentials_from_file("service_account_key.json")
46+
credentials_config = BigQueryCredentialsConfig(credentials=creds)
47+
else:
48+
# Initialize the tools to use the application default credentials.
49+
# https://cloud.google.com/docs/authentication/provide-credentials-adc
50+
application_default_credentials, _ = google.auth.default()
51+
credentials_config = BigQueryCredentialsConfig(
52+
credentials=application_default_credentials
53+
)
4354

4455
bigquery_toolset = BigQueryToolset(
4556
credentials_config=credentials_config, bigquery_tool_config=tool_config

contributing/samples/mcp_sse_agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import os
1717

1818
from google.adk.agents.llm_agent import LlmAgent
19+
from google.adk.tools.mcp_tool.mcp_session_manager import SseConnectionParams
1920
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
20-
from google.adk.tools.mcp_tool.mcp_toolset import SseServerParams
2121

2222
_allowed_path = os.path.dirname(os.path.abspath(__file__))
2323

@@ -31,7 +31,7 @@
3131
""",
3232
tools=[
3333
MCPToolset(
34-
connection_params=SseServerParams(
34+
connection_params=SseConnectionParams(
3535
url='http://localhost:3000/sse',
3636
headers={'Accept': 'text/event-stream'},
3737
),

0 commit comments

Comments
 (0)