Skip to main content
Tests SSE stream reconnection for agent continue-run (HITL) scenarios. When an agent run pauses (e.g., tool requires approval), the client calls /continue with background=True to resume in a detached task that survives client disconnections. Events are buffered for reconnection via /resume.
This example’s source docstring names a removed cookbook path: cookbook/05_agent_os/human_in_the_loop/agent_tool_requires_confirmation.py. Follow the generated Run step below.
continue_run_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 confirmation server

In another terminal, start an AgentOS whose tool requires confirmation on port 7777:
6

Run the example

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