adk-docs
adk-docs copied to clipboard
Found docs updates needed from ADK python release v1.14.1 to v1.15.0
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: https://github.com/google/adk-python/compare/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:
- Create a new documentation page under a "Performance" or "Caching" section. This page should explain the new app-level context caching feature.
- Explain
ContextCacheConfig: Detail theContextCacheConfigmodel, including its fields (min_tokens,ttl_seconds,cache_intervals) and how to use it when creating anApp. - Explain
static_instruction: Document the newstatic_instructionfield onLlmAgent. Explain that this is used for static content that can be cached, while theinstructionfield is for dynamic content. - Provide a code example: Show how to create an
AppwithContextCacheConfigand anLlmAgentwithstatic_instruction. - Reference the
cache_analysisandstatic_instructionsamples: 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.pysrc/google/adk/agents/llm_agent.py(seestatic_instruction)src/google/adk/apps/app.py(seecontext_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:
- Create a new documentation page or section for "Log Probabilities".
- Explain how to enable log probabilities: Document the
generate_content_configparameter onLlmAgentand how to setresponse_logprobsandlogprobs. - Explain the
avg_logprobsandlogprobs_resultfields: Detail these new fields on theLlmResponseobject. - Provide a code example: Show how to create an agent that requests log probabilities and how to access them in an
after_model_callback. - Reference the
logprobssample.
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.pycontributing/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:
- Create a new page for the "All-in-One Authentication" sample: Use the
README.mdfrom the sample as a starting point. Explain how to run the local IDP and application. - Create a new page for the "Static Non-Text Content" sample: Explain how to use static instructions with images and files.
- 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:
- 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
ContextCacheConfigis the recommended approach. Link to the new caching documentation page.
- 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.mddocs/plugins/index.md