Skip to content

Fix Python streaming examples in docs#455

Open
sztoplover-bit wants to merge 1 commit into
2FastLabs:mainfrom
sztoplover-bit:fix/python-streaming-docs
Open

Fix Python streaming examples in docs#455
sztoplover-bit wants to merge 1 commit into
2FastLabs:mainfrom
sztoplover-bit:fix/python-streaming-docs

Conversation

@sztoplover-bit

Copy link
Copy Markdown

Summary

  • fix the Python streaming examples in the root README and Python README
  • update the quickstart and python local demo docs to pass stream_response=True
  • show streamed output by iterating over response.output as AgentStreamResponse chunks

Why this is a local SDK/docs issue

The current Python examples show streaming usage that does not match the local AgentSquad.route_request() implementation in python/src/agent_squad/orchestrator.py. In the Python SDK, streamed chunk iteration happens when stream_response=True is passed and response.output is consumed as an async stream.

Validation

  • verified the route_request(..., stream_response=False) signature and streaming branch in python/src/agent_squad/orchestrator.py
  • verified the updated examples now match that behavior

Fixes #220

@cornelcroi

Copy link
Copy Markdown
Collaborator

Hey @sztoplover-bit, both fixes are correct — the nested would silently exhaust the iterator and produce no output, and the missing meant callers would never get streaming. The import fix is also right. Just needs CI to go green before merging.

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.

Bug: Update examples for direct usage

2 participants