Problem Statement
Strands' current async->sync wrapper executes tools on a separate event loop, so they cannot access resources bound to the application's main loop -- cached tasks, preexisting httpx.AsyncClient instances, and other awaitables that were initialized there.
Proposed Solution
Either:
- Enable greenback as an explicitly-supported optional dependency, using it in favor of the current approach if-and-only-if (a) greenback is installed, and (b) greenback.ensure_portal() has been called to initialize it; or
- Provide a supported, non-monkeypatching extension point for application authors to supply their own async→sync wrapper.
Use Case
Integrating Strands into a larger async-native application where tools need access to resources (HTTP/database/other natively-async client connection pools, cached coroutines, etc.) that are bound to the main event loop and cannot be accessed from a secondary loop.
Alternatives Solutions
No response
Additional Context
No response
Problem Statement
Strands' current async->sync wrapper executes tools on a separate event loop, so they cannot access resources bound to the application's main loop -- cached tasks, preexisting
httpx.AsyncClientinstances, and other awaitables that were initialized there.Proposed Solution
Either:
Use Case
Integrating Strands into a larger async-native application where tools need access to resources (HTTP/database/other natively-async client connection pools, cached coroutines, etc.) that are bound to the main event loop and cannot be accessed from a secondary loop.
Alternatives Solutions
No response
Additional Context
No response