Repository navigation
Description
Is your feature request related to a problem? Please describe.
I'm currently utilizing the get_fast_api_app() function from the ADK to initialize my FastAPI application.
app: FastAPI = get_fast_api_app(
agent_dir = AGENT_DIR,
session_db_url = SESSION_DB_URL,
allow_origins = ALLOWED_ORIGINS,
web = SERVE_WEB_INTERFACE
)
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
While I can configure the session storage using the session_db_url parameter, I've encountered a limitation: there's no straightforward way to configure or override the artifact_service. This restricts my ability to manage artifacts using custom storage solutions.
Describe the solution you'd like
It would be beneficial to have the ability to specify a custom artifact_service when using get_fast_api_app(), similar to how session_db_url allows for session storage configuration. This could be achieved by adding an artifact_service parameter to the function, enabling developers to inject their preferred artifact storage mechanism.
Describe alternatives you've considered
As a workaround, I've attempted to subclass or monkey-patch the Runner instance created within get_fast_api_app(). However, due to the encapsulation of the Runner within the function's scope and the lack of exposure of its internal components, this approach is not feasible. The only viable alternative currently is to bypass get_fast_api_app() entirely and manually set up the FastAPI application and Runner, which negates the convenience that get_fast_api_app() is intended to provide.
Additional context
Providing a parameter to configure the artifact_service would align with the existing design pattern of get_fast_api_app() and enhance its flexibility. This addition would facilitate the integration of custom artifact storage solutions, thereby broadening the applicability of the ADK in diverse deployment scenarios.
Activity
jeyong-shin commentedon Apr 23, 2025
Totally agree.
artifact_serviceisn’t handled properly during agent deployment.DeanChensj commentedon May 28, 2025
Thanks for reporting this, we will add option to specify this in future release
feat: Add an option to use gcs artifact service in adk web.
feat: Add an option to use gcs artifact service in adk web.
feat: Add an option to use gcs artifact service in adk web.
feat: Add an option to use gcs artifact service in adk web.