Runs
A run is a single execution of a teammate. Runs stream events in real-time (tool calls, reasoning, output) and persist results.
Create a Run
Streaming (default)
The simplest way to get real-time output:
Python
Use the context manager for automatic cleanup:
Python
Non-Streaming
For simpler use cases, disable streaming and poll for the result:
Quick Start Mode
Omit teammate_id to auto-create a teammate:
Python
This finds or creates a teammate named "Weekly Bot" and runs it immediately.
Run Options
Follow-Up Messages
Continue a conversation with runs.reply(). This creates a new run that inherits the teammate and context from the original:
Convenience Helpers
Shortcuts for common patterns:
Python
List Runs
Get a Run
Python
Cancel a Run
Run Files
Agents can generate files during execution. List and download them after the run completes:
Run Statuses
What's Next
- Streaming & Events — event types and real-time patterns
- Permissions — control tool approval flow
- Files — working with teammate-generated files
