google / google/adk-docs

Found docs updates needed from ADK python release v1.23.0 to v1.24.0

Open
#1,227 0 comments 0 reactions 0 assignees View on GitHub
docs updates
Dominant language
Shell
Stars
1.5k
Forks
1.3k
Avg merge
7d 1h
Merged PRs (30d)
34

Description

https://github.com/google/adk-python/compare/v1.23.0...v1.24.0

### 1. **New Agent Optimization Module**

**Doc file**: docs/agents/optimization.md

**Current state**:
> File does not exist.

**Proposed Change**:
> Create a new documentation page for the Agent Optimization framework.
> Content should include:
> - Overview of the `google.adk.optimization` module.
> - Explanation of the `AgentOptimizer` abstract base class.
> - Explanation of the `Sampler` interface for defining training/validation data and scoring.
> - Description of data types in `data_types.py` (`AgentWithScores`, `OptimizerResult`, `SamplingResult`).
> - A guide on how to implement a custom optimizer and sampler.

**Reasoning**:
A new optimization module (`src/google/adk/optimization/`) has been added to the codebase. This is a significant new feature that requires documentation to help users understand how to optimize their agents.

**Reference**: src/google/adk/optimization/agent_optimizer.py

### 2. **Document MCP Toolset Authentication**

**Doc file**: docs/tools-custom/mcp-tools.md

**Current state**:
> Does not mention support for authentication configuration in `McpToolset`.

**Proposed Change**:
> Add a section "Authentication for Remote MCP Servers".
> Explain that `McpToolset` accepts `auth_scheme` and `auth_credential` parameters.
> Explain that these are used to generate Authorization headers (Bearer, Basic, API Key) for the MCP connection (useful for SseConnectionParams).

**Reasoning**:
`McpToolset` has been updated to support `auth_scheme` and `auth_credential` and implements `_get_auth_headers` to inject them into the session.

**Reference**: src/google/adk/tools/mcp_tool/mcp_toolset.py

### 3. **Document MCP Resources support**

**Doc file**: docs/tools-custom/mcp-tools.md

**Current state**:
> Mentions only "Tool Discovery & Adaptation". Does not mention MCP Resources.

**Proposed Change**:
> Add a section "Accessing MCP Resources".
> Explain that besides tools, MCP servers can expose Resources (data blobs).
> Document the new methods `McpToolset.list_resources()` and `McpToolset.read_resource(name)`.

**Reasoning**:
New methods `list_resources` and `read_resource` have been added to `McpToolset` to support the MCP Resources capability.

**Reference**: src/google/adk/tools/mcp_tool/mcp_toolset.py

### 4. **Document Toolset Authentication flow**

**Doc file**: docs/tools-custom/authentication.md

**Current state**:
> Describes "Journey 1" (configuring tools with auth) and "Journey 2" (handling auth inside tool function). Does not mention automatic proactive auth resolution for toolsets.

**Proposed Change**:
> Add a new section or update "Journey 1" to explain "Toolset Authentication".
> Explain that `BaseLlmFlow` now automatically checks `BaseToolset.get_auth_config()` *before* tools are listed or executed.
> If credentials are missing, the framework pauses execution and issues an `adk_request_credential` event, just like in the tool-level auth flow.
> This allows toolsets to define auth requirements centrally and have them resolved proactively.

**Reasoning**:
The new `_resolve_toolset_auth` method in `BaseLlmFlow` introduces a proactive authentication mechanism for toolsets, which is a significant change from the previous reactive (tool-level) or static configuration approaches.

**Reference**: src/google/adk/flows/llm_flows/base_llm_flow.py

### 5. **Document new BigQuery plugin config options**

**Doc file**: docs/observability/bigquery-agent-analytics.md

**Current state**:
> Describes configuration options but misses `log_session_metadata` and `custom_tags`.
> Also does not list `STATE_DELTA` in the "State Management" event types table (Wait, it DOES list STATE_DELTA in the provided file content? Let me check line 436).
> Ah, line 436 shows `STATE_DELTA`. So that might have been added in a previous update or I misread.
> However, `log_session_metadata` and `custom_tags` are definitely missing from the "Configuration options" section (lines 164-188).

**Proposed Change**:
> Add `log_session_metadata` and `custom_tags` to the "Configuration options" list.
> - `log_session_metadata` (bool, default: True): If True, logs metadata from the session object into the attributes column.
> - `custom_tags` (Dict[str, Any], default: {}): A dictionary of static tags to be included in the attributes column for every event.

**Reasoning**:
New configuration options were added to `BigQueryLoggerConfig` in `src/google/adk/plugins/bigquery_agent_analytics_plugin.py`.

**Reference**: src/google/adk/plugins/bigquery_agent_analytics_plugin.py

### 6. **Document tool_thread_pool_config**

**Doc file**: docs/runtime/runconfig.md

**Current state**:
> Does not mention `tool_thread_pool_config` in `RunConfig` parameters.

**Proposed Change**:
> Add `tool_thread_pool_config` to the "Runtime Parameters" table and add a description.
> Explain that it configures a thread pool for running synchronous tools to avoid blocking the event loop, which is critical for Live API mode.

**Reasoning**:
`tool_thread_pool_config` is a new configuration option in `RunConfig` that affects runtime behavior and performance.

**Reference**: src/google/adk/flows/llm_flows/functions.py

### 7. **Document dynamic Vertex AI Search configuration**

**Doc file**: docs/tools/google-cloud/vertex-ai-search.md

**Current state**:
> Describes basic usage of `VertexAiSearchTool`.

**Proposed Change**:
> Add a section "Dynamic Configuration (e.g., Per-User Filtering)".
> Explain that you can subclass `VertexAiSearchTool` and override `_build_vertex_ai_search_config(self, context)`.
> Provide an example of setting a filter based on `context.state["user_id"]`.

**Reasoning**:
`VertexAiSearchTool` now supports dynamic configuration via the new `_build_vertex_ai_search_config` method, which is useful for applying context-aware filters (like user permissions) at runtime.

**Reference**: src/google/adk/tools/vertex_ai_search_tool.py

### 8. **Document API Key auth for Vertex AI Evaluation**

**Doc file**: docs/evaluate/index.md

**Current state**:
> Does not mention support for `GOOGLE_API_KEY` for authentication. Mentions it requires Vertex Gen AI Evaluation Service API which usually implies GCP credentials.

**Proposed Change**:
> Add a note that you can now authenticate with the Vertex Gen AI Evaluation Service using a `GOOGLE_API_KEY` environment variable as an alternative to Google Cloud Project credentials (Application Default Credentials).

**Reasoning**:
`vertex_ai_eval_facade.py` has been updated to check for `GOOGLE_API_KEY` and use it to initialize the `vertexai.Client`.

**Reference**: src/google/adk/evaluation/vertex_ai_eval_facade.py

### 9. **Document pre-deployment agent validation**

**Doc file**: docs/deploy/agent-engine/deploy.md

**Current state**:
> Does not mention `skip_agent_import_validation` option.

**Proposed Change**:
> Add a note that `adk deploy agent_engine` now validates that the agent module can be imported before deploying.
> Explain that this checks for missing dependencies or import errors.
> Mention the `--skip-agent-import-validation` flag (or `skip_agent_import_validation` option if using Python API) to bypass this check if needed (e.g., if local environment differs from deployment environment).

**Reasoning**:
New validation logic in `cli_deploy.py` helps catch errors early but might need to be skipped in some environments.

**Reference**: src/google/adk/cli/cli_deploy.py

### 10. **Deprecate global_instruction**

**Doc file**: docs/agents/llm-agents.md

**Current state**:
> Mentions `global_instruction` as a way to provide system-wide instructions.

**Proposed Change**:
> Mark `global_instruction` as **DEPRECATED**.
> Recommend using `GlobalInstructionPlugin` instead.

**Reasoning**:
The code in `src/google/adk/flows/llm_flows/instructions.py` explicitly marks the `global_instruction` handling block as deprecated and suggests using `GlobalInstructionPlugin`.

**Reference**: src/google/adk/flows/llm_flows/instructions.py

### 11. **Update OpenAPI tool execution description (httpx)**

**Doc file**: docs/tools-custom/openapi-tools.md

**Current state**:
> Execution: ... It handles authentication (if configured) and executes the API call using the `requests` library.

**Proposed Change**:
> Execution: ... It handles authentication (if configured) and executes the API call asynchronously using the `httpx` library (previously `requests`).

**Reasoning**:
`RestApiTool` has been updated to use `httpx` for asynchronous execution, improving performance.

**Reference**: src/google/adk/tools/openapi_tool/openapi_spec_parser/rest_api_tool.py

### 12. **Link to Agent Optimization docs**

**Doc file**: docs/agents/index.md

**Current state**:
> Does not mention Agent Optimization.

**Proposed Change**:
> Add a new section or item in the "Core Agent Categories" or "What's Next?" section to link to the new "Agent Optimization" documentation (`docs/agents/optimization.md`).

**Reasoning**:
To make the new Optimization module discoverable, it should be linked from the main Agents index page.

**Reference**: src/google/adk/optimization/agent_optimizer.py

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.