Skip to content

Conversation

@evalstate
Copy link
Owner

Implements an async-iterable ToolRunner class that yields each message from Claude during a tool-calling conversation, similar to the Anthropic SDK's tool_runner pattern.

Key features:

  • Async iteration over intermediate messages (including tool_use)
  • until_done() method for simple cases
  • Advanced API: get_pending_tool_response(), set_request_params(), append_messages() for mid-loop modifications
  • Backward compatible - existing generate() behavior unchanged

New files:

  • src/fast_agent/agents/tool_runner.py - ToolRunner class
  • examples/tool-runner/tool_runner_example.py - Usage examples

Implements an async-iterable ToolRunner class that yields each message
from Claude during a tool-calling conversation, similar to the Anthropic
SDK's tool_runner pattern.

Key features:
- Async iteration over intermediate messages (including tool_use)
- until_done() method for simple cases
- Advanced API: get_pending_tool_response(), set_request_params(),
  append_messages() for mid-loop modifications
- Backward compatible - existing generate() behavior unchanged

New files:
- src/fast_agent/agents/tool_runner.py - ToolRunner class
- examples/tool-runner/tool_runner_example.py - Usage examples
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.

3 participants