Skip to content

Add wait_s and wait_for tools for async workflows#115

Closed
erikgaas wants to merge 7 commits intomainfrom
add-wait-tools
Closed

Add wait_s and wait_for tools for async workflows#115
erikgaas wants to merge 7 commits intomainfrom
add-wait-tools

Conversation

@erikgaas
Copy link
Copy Markdown
Contributor

Summary

Adds two new tools for async prompt workflows:

  • wait_s(seconds) — Simple async sleep
  • wait_for(msg_id, timeout=10) — Poll until message finishes running, return its output

Use case

Enables workflows where one prompt spawns other prompts/code cells and waits for their results:

msg_id = _add_msg_unsafe('Say hello', msg_type='prompt', run=True)
output = await wait_for(msg_id)
print(f'Got: {output}')

Used with solveit's async prompts feature (PR #1439).

- wait_s(seconds): Simple async sleep
- wait_for(msg_id): Poll until message finishes, return output

Enables workflows where prompts spawn other prompts/code and wait for results.
@jph00 jph00 closed this Mar 31, 2026
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.

2 participants