Skip to content

Inflexible fastapi app. #2250

@racinmat

Description

@racinmat

Describe the bug
The code for fastapi app makes it very hard to modify anything if needed, because everything is hidden in local variables on the function.

To Reproduce
Steps to reproduce the behavior:

  1. Make the agent
from pathlib import Path
import uvicorn
from google.adk.cli.fast_api import get_fast_api_app
app = get_fast_api_app(
    agents_dir=str((Path(__file__) / '..').absolute()),
    session_service_uri="sqlite:///:memory:",
    allow_origins=["*"],
    web=True,
)
uvicorn.run(app, host="0.0.0.0", port=8081)
  1. Try to modify anything.
  2. Fail to do so, because the app does not expose almost anything.

Expected behavior
Easier extendability and modifications.

Desktop (please complete the following information):

  • OS: Windows 11
  • Python version(python -V): Python 3.12.8
  • ADK version(pip show google-adk): 1.7.0

Model Information:
Regardless of the model.

Additional context
I don't think anyting more is needed.

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK botweb[Component] This issue will be transferred to adk-web

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions