You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
4111f85b61
Merge https://github.com/google/adk-python/pull/3875 # Problem The example in `contributing/samples/human_in_loop/README.md` shows: ```python await runner.run_async(...) ``` However, `run_async` returns an **async generator**, so awaiting it raises: ``` TypeError: object async_generator can't be used in 'await' expression ``` Additionally, the example payload uses `"ticket-id"` while ADK tools and other examples use `"ticketId"`, creating a mismatch that breaks copy/paste usage. # Solution - Updated the snippet to consume the async generator correctly: ```python async for event in runner.run_async(...): ... ``` - Aligned the payload key from `"ticket-id"` → `"ticketId"` for consistency with ADK schema and other examples. These changes make the example runnable and consistent with the API’s actual behavior. # Testing Plan This PR is a **small documentation correction**, so no unit tests are required per contribution guidelines. - Verified the corrected snippet manually to ensure it no longer raises `TypeError`. # Checklist - [x] I have read the CONTRIBUTING.md document. - [x] I have performed a self-review of my own code. - [ ] I have commented my code, particularly in hard-to-understand areas. *(N/A – docs only)* - [ ] I have added tests that prove my fix is effective or that my feature works. *(N/A – docs only)* - [ ] New and existing unit tests pass locally with my changes. *(N/A – docs only)* - [x] I have manually tested my changes end-to-end. - [ ] Any dependent changes have been merged and published in downstream modules. *(N/A)* COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3875 from krishna-dhulipalla:docs/fix-adk-run_async-example 83fc5b430690b63b8b7bf1025ef03b0761264751 PiperOrigin-RevId: 842952362
Contributing Resources
This folder host resources for ADK contributors, for example, testing samples etc.
Samples
Samples folder host samples to test different features. The samples are usually minimal and simplistic to test one or a few scenarios.
Note: This is different from the google/adk-samples repo, which hosts more complex e2e samples for customers to use or modify directly.
ADK project and architecture overview
The adk_project_overview_and_architecture.md describes the ADK project overview and its technical architecture from high-level.
This is helpful for contributors to understand the project and design philosophy. It can also be feed into LLMs for vibe-coding.