Description
The get_fast_api_app
function supports a session_db_url
argument that allows constructing the session service with a DatabaseSessionService
.
adk-python/src/google/adk/cli/fast_api.py
Lines 193 to 202 in 484b33e
adk-python/src/google/adk/cli/fast_api.py
Line 276 in 484b33e
However, it does not support passing additional DB kwargs required for full control or advanced use cases that production resources require. DB kwargs are where users can configure their connection pool settings like pool size, timeouts, etc.
The DatabaseSessionService
supports database engine kwargs
and these should be configurable using the the FastAPI app.
adk-python/src/google/adk/sessions/database_session_service.py
Lines 304 to 314 in 484b33e
This is critical for creating DatabaseSessionServices
's with Cloud SQL and AlloyDB as the recommended best practice is to use an AlloyDB Python Connector which thousands of customers use today.
The Python Connectors for Cloud SQL and AlloyDB require the creator
SQLAlchemy kwarg to work. They can not be used with ADK via the FastAPI app until this is fixed.