adk-samples icon indicating copy to clipboard operation
adk-samples copied to clipboard

Example usage: adk_web_server modular server extension

Open FrigaZzz opened this issue 4 months ago • 3 comments

Is your feature request related to a problem? Please describe. With the release of v1.9.0, the fast_api.py module was refactored to allow simpler construction of custom API servers. Currently, the documentation does not provide a reference implementation or example usage showing how developers can extend these new modular capabilities in practice. This makes it harder for teams to quickly adopt the new design, especially when:

  • Adding custom routers
  • Overriding ADK endpoints
  • Optimizing SSE streaming
  • Enabling hot-reload during development

Describe the solution you'd like Add a contributed example project that demonstrates:

  • A modular FastAPI server implementation built on top of the v1.9.0 changes
  • Example project structure (fastapi_modular_server/) with routers, agents, config, and utilities
  • Optimized SSE event mapper with multiple streaming modes
  • Agent hot-reload example
  • A README.md that walks through extending ADK servers

This example would serve as a starting point/template for developers building production-ready servers without modifying ADK core.


Describe alternatives you've considered

  • Inline code snippets in the docs
  • Relying on release notes alone

Additional context This request is based on the following release item:

[CLI] Modularize fast_api.py to allow simpler construction of API Server ([bfc203a](https://github.com/google/adk-python/commit/bfc203a92fdfbc4abaf776e76dca50e7ca59127b), [dfc25c1](https://github.com/google/adk-python/commit/dfc25c17a98aaad81e1e2f140db83d17cd78f393), [e176f03](https://github.com/google/adk-python/commit/e176f03e8fe13049187abd0f14e63afca9ccff01))

FrigaZzz avatar Sep 15 '25 19:09 FrigaZzz

Example usage PR submitted: google/adk-python#2967

FrigaZzz avatar Sep 15 '25 19:09 FrigaZzz

@FrigaZzz thanks for the PR! Actually, we don't want to promote reusing fastapi web module yet.

Jacksunwei avatar Oct 24 '25 07:10 Jacksunwei

@FrigaZzz We discussed this, it will make more sense to be adk-samples. @polong-lin to help take over this.

hangfei avatar Nov 10 '25 23:11 hangfei