Skip to main content
Tests SSE stream reconnection for team runs using background=True, stream=True. When background=True, the team runs in a detached task that survives client disconnections. Events are buffered so the client can reconnect via /resume.
team_sse_reconnect.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your API keys

4

Clone Agno

Clone the repository and run the remaining commands from its root:
5

Start the AgentOS server

In another terminal, start the client example server on port 7777:
6

Run the example

Run the example from the repository root:
Full source: cookbook/05_agent_os/client/11_team_sse_reconnect.py