Skip to content

get_fast_api_app does not allow injecting a custom A2A task store #4971

Closed

Description

@STHITAPRAJNAS

Summary

get_fast_api_app unconditionally creates an InMemoryTaskStore and InMemoryPushNotificationConfigStore when a2a=True. There is no way for callers to provide their own store implementations.

This becomes a problem in production setups where:

  • Multiple replicas need a shared task store so A2A push callbacks can be routed back to the right server
  • Operators want task state to survive restarts (e.g. using DatabaseTaskStore backed by SQLite or Postgres from a2a-sdk)

Current behaviour

# Inside get_fast_api_app — no way to override
a2a_task_store = InMemoryTaskStore()

Expected behaviour

Callers should be able to pass a custom store:

from a2a.server.tasks import DatabaseTaskStore
from sqlalchemy.ext.asyncio import create_async_engine

engine = create_async_engine("sqlite+aiosqlite:///tasks.db")
app = get_fast_api_app(
    agents_dir="agents/",
    web=True,
    a2a=True,
    a2a_task_store=DatabaseTaskStore(engine),
)

Notes

The lower-level to_a2a() helper already supports this via the task_store parameter added in #3839. This issue tracks extending the same capability to get_fast_api_app.

A fix is proposed in #4970.

Activity

  1. added theissue type on Mar 24, 2026
  2. added
    web[Component] This issue will be transferred to adk-web
    on Mar 24, 2026
  3. sanketpatil06 commented on Mar 24, 2026

    @sanketpatil06

    @STHITAPRAJNAS, Thank you for your submission. Our team is currently reviewing the details, and I will be sure to notify you as soon as there is an update. We value your contribution!

  4. added
    needs review[Status] The PR/issue is awaiting review from the maintainer
    on Mar 24, 2026
  5. GWeale commented on Jun 17, 2026

    @GWeale
    Collaborator

    Landed on main via #5597 (commit cd78d87): persistent/custom A2A task stores are now plumbed through to_a2a() and get_fast_api_app(). Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs review[Status] The PR/issue is awaiting review from the maintainerweb[Component] This issue will be transferred to adk-web

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions