-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: Implement a new modular FastAPI server for ADK agents with cust... #808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
FrigaZzz
wants to merge
1
commit into
google:main
from
FrigaZzz:feat/fastapi-modular-server-contribution
Open
feat: Implement a new modular FastAPI server for ADK agents with cust... #808
FrigaZzz
wants to merge
1
commit into
google:main
from
FrigaZzz:feat/fastapi-modular-server-contribution
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...om SSE streaming, logging, and an example greetings agent.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR: Example FastAPI Modular Server Usage
📖 Overview
This PR adds a reference implementation showcasing how to extend the newly modularized
adk_web_server.py(introduced in v1.9.0) into a production-ready FastAPI server.🎯 Motivation
Release v1.9.0 introduced the following change:
This PR provides a concrete template that leverages those changes, making it easier for teams to:
📚 What’s Included
fastapi_modular_server/) with routers, agents, config, and core utilities.MINIMAL,BALANCED,FULL_COMPAT).📝 Notes
v1.9.0.✅ Checklist
v1.14.0📖 Proposal for Python Docs
We should extend the ADK Python documentation with a new section.
Suggested Doc Location:
docs/runtime/fastapi_server_extensions.mdProposed Section Outline:
Why Modularization?
fast_api.pyrefactor in v1.9.0Building a Custom Server
Overriding Built-in Routes
Optimizing Streaming (straightforward example)
SSEEventMapperThis way, the docs PR will complement this usage example, turning it into a reusable guide for the community.
🔗 Associated Issue
Closes #618
🧪 Testing Plan
The server was tested locally by running it and issuing a streaming request via
fetchin the browser console:✅ The SSE stream responded successfully with generated content.
📸 Screenshot of the running server:
Screenshot 2025年09月15日 at 22 04 49📖 Proposal for Python Docs
We should extend the ADK Python documentation with a new section.
Suggested Doc Location:
docs/runtime/fastapi_server_extensions.mdProposed Section Outline:
Why Modularization?
fast_api.pyrefactor in v1.9.0Building a Custom Server
Overriding Built-in Routes
Optimizing Streaming (straightforward example)
SSEEventMapperThis way, the docs PR will complement this usage example, turning it into a reusable guide for the community.