Skip to content

Feature Request: Native FirestoreSessionService for production-ready persistent sessions #3776

@mohammadshamma

Description

@mohammadshamma

Is your feature request related to a problem? Please describe.

The Python ADK currently lacks a straightforward, serverless, and "happy path" solution for persistent session management in a Google Cloud environment. This presents a challenge for developers moving agents from local testing to production.

The current core options have limitations for this specific use case:

  • InMemorySessionService: Excellent for local dev, but not viable for production as state is lost on restart and cannot be shared across instances.
  • VertexAiSessionService: While powerful, it introduces a high barrier to entry (requires deploying a "Reasoning Engine" and complex setup).
  • DatabaseSessionService: Requires managing a SQL database (PostgreSQL/MySQL), which adds infrastructure overhead compared to a serverless NoSQL solution.

There is currently no native, serverless option in the core library that allows for immediate, low-config persistence on Google Cloud.

Describe the solution you'd like

I request the addition of a native FirestoreSessionService implementation as a core part of google.adk.sessions.

Why this solution is needed:

  • A Clear Production Path: Firestore is a scalable, serverless, and widely used Google Cloud database. It provides a simple "happy path" for developers needing persistent sessions without managing infrastructure.
  • Ease of Use: Enabling Firestore and configuring it is a well-understood process, offering a much lower barrier to entry than the Reasoning Engine or a full SQL database setup.
  • Parity & Demand: This aligns with similar requests in other ADK languages (e.g., Java ADK Issue #497) and addresses a common developer need for simple cloud persistence.

Describe alternatives you've considered

  • Using DatabaseSessionService: This works but forces the developer to provision and manage a SQL database instance, which is often overkill for simple session state storage.
  • Using VertexAiSessionService: Considered, but the setup complexity for Reasoning Engine is too high for simple persistence needs.
  • Third-party extensions: I am aware of adk-ext, but this functionality is fundamental enough to the Google Cloud ecosystem that it warrants inclusion in the core google/adk-python library to ensure standard support and maintenance.

Additional context

This request mirrors the "FirestoreSessionService/VertexAiSessionService gap" issue currently open in the Java ADK repository: google/adk-java#497

As noted in that issue, the demand for this is high enough that AI models often hallucinate the existence of FirestoreSessionService because it feels like a missing piece of the standard library.

Guidance on Repository Placement:
I would appreciate guidance on whether this implementation belongs in this core google/adk-python repository or in google/adk-python-community.

  • My reading of the Contributing Guide suggests that integrations often go to the community repo.
  • However, I noticed that FirestoreSessionService was recently considered for the Java core library.
    Given that Firestore is a fundamental "happy path" for GCP deployments, I believe it fits best in core to ensure feature parity and standard support, but I defer to the maintainers' judgment.

Metadata

Metadata

Assignees

Labels

needs review[Status] The PR/issue is awaiting review from the maintainerservices[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions