Skip to content

feat(a2a): add support for persistent task stores#5597

Open
allen-stephen wants to merge 3 commits intogoogle:mainfrom
allen-stephen:feat/a2a-task-store-support
Open

feat(a2a): add support for persistent task stores#5597
allen-stephen wants to merge 3 commits intogoogle:mainfrom
allen-stephen:feat/a2a-task-store-support

Conversation

@allen-stephen
Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:

If applicable, please follow the issue templates to provide as much detail as
possible.

Problem:
A2A support lacked pluggable or persistent task store backends, forcing a strict default to InMemoryTaskStore.

Solution:
Extended ServiceRegistry and ServiceFactory to support URI-driven configuration for A2A task stores. Added built-in support for memory://, postgresql://, mysql://, and sqlite:// schemes. Plumbed the options down into to_a2a() and get_fast_api_app(), ensuring connection strings are securely redacted from application logs.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Summary: Ran pytest against test_agent_to_a2a.py, test_fast_api.py, test_service_registry.py, and test_service_factory.py. All 131 unit tests passed successfully.

Manual End-to-End (E2E) Tests:

Compiled the package distribution wheel via uv build and successfully validated its installation inside a clean isolated sandbox environment via uv pip install dist/google_adk-1.32.0-py3-none-any.whl[a2a]. Verified that the application instantiates default in-memory stores and custom persistent URI stores

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants