Skip to content

Convert temporal-direct loop to use ToolRunner - #95

Merged
msullivan merged 1 commit into
mainfrom
temporal
May 11, 2026
Merged

Convert temporal-direct loop to use ToolRunner#95
msullivan merged 1 commit into
mainfrom
temporal

Conversation

@msullivan

Copy link
Copy Markdown
Contributor

The custom @agent.loop now mirrors Agent.default_loop closely: a
streaming model call feeds a ToolRunner, tool calls are scheduled
as they arrive, and results are folded back into the context via
context.add(stream.message) and context.add(tr.get_tool_message()).

To support this we add a replay_message_events function to
ai.events.

The custom @agent.loop now mirrors Agent.default_loop closely: a
streaming model call feeds a ToolRunner, tool calls are scheduled
as they arrive, and results are folded back into the context via
context.add(stream.message) and context.add(tr.get_tool_message()).

To support this we add a `replay_message_events` function to
`ai.events`.
@msullivan
msullivan requested a review from anbuzin May 11, 2026 02:02
@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
py-ai Ready Ready Preview, Comment May 11, 2026 2:02am

Request Review

@msullivan
msullivan merged commit 65629f0 into main May 11, 2026
6 checks passed
@msullivan
msullivan deleted the temporal branch May 11, 2026 05:00
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