Skip to main content
Expose a Team running in tasks mode via AgentOS. You can use the AgentOS API to send requests and test task streaming.
This example docstring contains a stale file path and an invalid JSON request to a removed /v1/.../runs/stream route. Use the generated run and streaming steps below instead.
team_tasks_streaming.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run PgVector

5

Start AgentOS

Save the code above as team_tasks_streaming.py, then run:
Keep the server running while you send the streaming request.
6

Test task streaming

In a second terminal, send form fields to the v2.7.2 team run endpoint:
Full source: cookbook/05_agent_os/team_tasks/team_tasks_streaming.py