Skip to content

Found docs updates needed from ADK python release v1.14.1 to v1.15.0 #720

@adk-bot

Description

@adk-bot

The ADK Python repository has been updated from v1.14.1 to v1.15.0, introducing new features and samples. The following documentation updates are required to reflect these changes.

Compare Link: google/adk-python@v1.14.1...v1.15.0

Here are the recommended changes:

1. New Feature: App-Level Context Caching

A new context caching mechanism has been introduced at the application level. This is a significant feature for performance and cost optimization and needs to be documented thoroughly.

Proposed Changes:

  1. Create a new documentation page under a "Performance" or "Caching" section. This page should explain the new app-level context caching feature.
  2. Explain ContextCacheConfig: Detail the ContextCacheConfig model, including its fields (min_tokens, ttl_seconds, cache_intervals) and how to use it when creating an App.
  3. Explain static_instruction: Document the new static_instruction field on LlmAgent. Explain that this is used for static content that can be cached, while the instruction field is for dynamic content.
  4. Provide a code example: Show how to create an App with ContextCacheConfig and an LlmAgent with static_instruction.
  5. Reference the cache_analysis and static_instruction samples: Link to the new samples as practical examples.

Reasoning:
This is a major new feature that significantly impacts how developers can optimize their ADK applications. Clear documentation is essential for adoption.

Reference:

  • src/google/adk/agents/context_cache_config.py
  • src/google/adk/agents/llm_agent.py (see static_instruction)
  • src/google/adk/apps/app.py (see context_cache_config)
  • contributing/samples/cache_analysis/
  • contributing/samples/static_instruction/

2. New Feature: Log Probabilities

The ability to access log probabilities from the model's response is now available.

Proposed Changes:

  1. Create a new documentation page or section for "Log Probabilities".
  2. Explain how to enable log probabilities: Document the generate_content_config parameter on LlmAgent and how to set response_logprobs and logprobs.
  3. Explain the avg_logprobs and logprobs_result fields: Detail these new fields on the LlmResponse object.
  4. Provide a code example: Show how to create an agent that requests log probabilities and how to access them in an after_model_callback.
  5. Reference the logprobs sample.

Reasoning:
This is a useful feature for developers who need to understand the model's confidence in its responses.

Reference:

  • src/google/adk/models/llm_response.py
  • contributing/samples/logprobs/

3. New Samples Documentation

Several new samples have been added that demonstrate key ADK features. Each of these should have its own documentation page.

Proposed Changes:

  1. Create a new page for the "All-in-One Authentication" sample: Use the README.md from the sample as a starting point. Explain how to run the local IDP and application.
  2. Create a new page for the "Static Non-Text Content" sample: Explain how to use static instructions with images and files.
  3. Update existing documentation on built-in tools to include the google_maps_grounding_tool.

Reasoning:
The new samples are excellent resources for developers, but they are not discoverable without documentation.

Reference:

  • contributing/samples/authn-adk-all-in-one/
  • contributing/samples/static_non_text_content/
  • src/google/adk/tools/google_maps_grounding_tool.py

4. Update Existing Caching Documentation

The existing documentation on caching needs to be updated to reflect the new app-level context caching feature.

Proposed Changes:

  1. In docs/callbacks/design-patterns-and-best-practices.md:
    • Current state: Mentions caching via callbacks.
    • Proposed Change: Add a note that for context caching, the new app-level ContextCacheConfig is the recommended approach. Link to the new caching documentation page.
  2. In docs/plugins/index.md:
    • Current state: Mentions response caching as a use case for plugins.
    • Proposed Change: Add a note about the new app-level context caching and link to the new documentation page.

Reasoning:
To avoid confusion and to promote best practices, the existing documentation should be updated to point to the new, more powerful caching features.

Reference:

  • docs/callbacks/design-patterns-and-best-practices.md
  • docs/plugins/index.md

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions