Answer: You stream responses by iterating over run.messages() after calling agent.send(), checking each message's type (assistant, thinking, tool_call, status, usage) and printing the relevant content. The run stream is consumable once, and run.messages(), run.events(), and run.iter_text() all draw from the same underlying stream and advance it. Status: Confirmed Entry: tool/cursor/agents-and-automation/sdk-streaming Revision: 1 Digest: sha256:e5650d94cc1ce86b (changes whenever the content changes) Timeline: Created: 2026-11-14T12:37:23Z Last changed: 2026-11-14T12:37:23Z Last verified: 2026-11-20T12:40:51Z Next check: 2026-11-21T12:40:51Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of streaming method | run.messages() | [1] | 2026-11-20 send call | agent.send("Find the bug in src/auth.py") | [1] | 2026-11-20 stream consumption | A run stream is consumable once. | [1] | 2026-11-20 drain method | run.wait() | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/sdk/python.md". https://cursor.com/docs/sdk/python.md Role: primary. Accessed: 2026-11-20T12:40:51Z Quote: "for message in run.messages():" (Supports: streaming method) Quote: "run = agent.send("Find the bug in src/auth.py")" (Supports: send call) Quote: "A run stream is consumable once." (Supports: stream consumption) Quote: "Call `run.wait()` to drain any remaining events and return the typed `RunResult`." (Supports: drain method) Snapshot SHA-256: 7f116c85cadb25c7ac32393bd66ed3d69c23d887d8f086840440caaf15e53cd1 (captured 2026-11-13T03:12:08Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-14T12:37:23Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:40:51Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:40:51Z Last attempt: 2026-11-20T12:40:51Z Notes and limitations: Extracted automatically from a single official source (section "Streaming"). Related: https://latestn.com/tool/cursor/agents-and-automation/select-eval-cases How do I select specific Cursor Eval cases to run? https://latestn.com/tool/cursor/agents-and-automation/self-hosted-computer-use-flag How do I let a Cursor cloud agent control the desktop on a self-hosted machine? https://latestn.com/tool/cursor/agents-and-automation/send-follow-up-message How do I send a follow-up message to an existing Cursor Agent SDK session? https://latestn.com/tool/cursor/agents-and-automation/schedule-cron-cadence What cron format and timezone do Cursor schedules use, and what cadence options do reminders support? https://latestn.com/tool/cursor/agents-and-automation/schedules-vs-reminders What is the difference between schedules and reminders in the Cursor Agent SDK? https://latestn.com/tool/cursor/agents-and-automation/scope-skill-to-files How do I scope a Cursor skill to specific files? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-14T12:37:23Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cursor/agents-and-automation/sdk-streaming/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cursor/agents-and-automation/sdk-streaming POST: https://latestn.com/dispute/tool/cursor/agents-and-automation/sdk-streaming with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/agents-and-automation/sdk-streaming?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I stream responses from a Cursor Python SDK agent run? Revision 1, last verified 2026-11-20T12:40:51Z. https://latestn.com/tool/cursor/agents-and-automation/sdk-streaming (accessed 2026-11-21T10:02:27Z). @misc{LatestN_tool_cursor_agents_and_automation_sdk_streaming_r1, title = {How do I stream responses from a Cursor Python SDK agent run?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/agents-and-automation/sdk-streaming}}, note = {Revision 1; digest sha256:e5650d94cc1ce86b; last verified 2026-11-20T12:40:51Z; accessed 2026-11-21T10:02:27Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cursor/agents-and-automation/sdk-streaming