feat: ADK Web Async Agent Compatibility #1420
Open
+433
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ADK Web Async Agent Compatibility - Pull Request Documentation
Overview
This pull request adds comprehensive support for async agents in ADK Web, solving two critical compatibility issues that prevented full functionality in the ADK Web interface.
Problems Solved
1. MCP Tools Event Loop Conflicts
2. Session State Customization Limitations
{user_name}
couldn't be populated from databasesSolution Implementation
1. Session State Preprocessor Callback Mechanism
How it works:
session_state_preprocessor
function in agent modules{variable}
Example:
2. MCP uvloop Compatibility Fix
Files Modified:
src/google/adk/tools/mcp_tool/mcp_tool.py
How it works:
Technical Details:
Usage Examples
Minimal Implementation
Template Usage