Skip to content

feat(examples): add async tool runner example#1328

Open
Vansh1811 wants to merge 1 commit intoanthropics:mainfrom
Vansh1811:main
Open

feat(examples): add async tool runner example#1328
Vansh1811 wants to merge 1 commit intoanthropics:mainfrom
Vansh1811:main

Conversation

@Vansh1811
Copy link
Copy Markdown

Summary

Adds an async version of the tools_runner.py example using AsyncAnthropic and async for.

The existing tools_runner.py demonstrates the synchronous tool runner helper. This PR adds the async counterpart tools_runner_async.py, mirroring the pattern already established in the repo (e.g. text_completions_demo_sync.py / text_completions_demo_async.py).

Changes

  • Added examples/tools_runner_async.py — async version of the tool runner that uses AsyncAnthropic, async def main(), and async for message in runner

This script fetches weather information for a specified location in either Celsius or Fahrenheit using an asynchronous approach.
@Vansh1811 Vansh1811 requested a review from a team as a code owner April 3, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant