Skip to content

Python: Minor updates to response-stream example and Foundry hosted agent doc - #8985

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 12 commits into
microsoft:mainfrom
dargilco:dargilco/response_stream_sample
Oct 9, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 12 commits into
microsoft:mainfrom
dargilco:dargilco/response_stream_sample

Conversation

@dargilco

@dargilco Darren Cohen (dargilco) commented Oct 2, 2026 •

Copy link
Copy Markdown
Member
  • Update all "a Agent" to "an Agent"
  • Minor update to python\samples\02-agents\response_stream.py
    • Update comment at the top to move the Python code below the pattern title, just like done in the above two patterns.
    • In example 4, show that the cleanup hook was called after streaming is done, by printing streaming updates. If we don't print the updates, there is no way to see when it was done.
  • Minor edits to \python\samples\04-hosting\foundry-hosted-agents\README.md to get a sample to run following exact instructions

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 18:15
@dargilco Darren Cohen (dargilco) changed the title Minor fix to response_stream.py sample [Work in progress] Minor fix to response_stream.py sample Oct 2, 2026
@dargilco Darren Cohen (dargilco) changed the title [Work in progress] Minor fix to response_stream.py sample [Work in progress] Minor fixes to code comments Oct 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 3 Medium severity

Open (3)
What changed in this PR

This PR primarily corrects grammar in Python samples/docstrings (notably “a Agent” → “an Agent”) and adjusts the markdown flow in the response_stream.py sample.

Changes:

  • Fixes article/grammar issues across samples, packages, and tests (“a agent/Agent” → “an agent/Agent”).
  • Reorders/rewraps the “Pattern 3: Combined Usage” explanation in response_stream.py.
  • Minor docstring wording cleanup in multiple modules.
File Description
python/​samples/​03-workflows/​agents/​group_chat_workflow_as_agent.py Grammar fix in sample description bullet.
python/​samples/​03-workflows/​agents/​custom_agent_executors.py Grammar fix in Writer docstring bullet list.
python/​samples/​02-agents/​response_stream.py Reflows markdown around “Pattern 3” and “Chaining” explanations.
python/​samples/​02-agents/​providers/​anthropic/​anthropic_skills.py Comment grammar fix.
python/​samples/​02-agents/​observability/​workflow_observability.py Docstring grammar fix.
python/​packages/​orchestrations/​agent_framework_orchestrations/​_magentic.py Docstring grammar fix.
python/​packages/​declarative/​agent_framework_declarative/​_workflows/​_factory.py Docstring grammar fix.
python/​packages/​declarative/​agent_framework_declarative/​_loader.py Docstring grammar fixes across multiple factory methods.
python/​packages/​core/​agent_framework/​_workflows/​_typing_utils.py Docstring grammar fix.
python/​packages/​core/​agent_framework/​_agents.py Docstring grammar fix for Agent initializers.
python/​packages/​ag-ui/​tests/​ag_ui/​test_tooling.py Test helper docstring grammar fix.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread python/samples/02-agents/response_stream.py
Comment thread python/samples/02-agents/response_stream.py
Comment thread python/samples/03-workflows/agents/group_chat_workflow_as_agent.py Outdated
Reverts 79f5bc2 and 6306057.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@agent-framework-automation agent-framework-automation Bot added the documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs label Oct 8, 2026
@dargilco
Darren Cohen (dargilco) marked this pull request as ready for review October 9, 2026 00:11
@dargilco Darren Cohen (dargilco) changed the title Python: Correct Agent wording and clarify response-stream examples Python: Improve response-stream examples and polish Agent documentation Oct 9, 2026
@dargilco Darren Cohen (dargilco) changed the title Python: Improve response-stream examples and polish Agent documentation Python: Minor updates to response-stream example and Foundry hosted agent doc Oct 9, 2026
Merged via the queue into microsoft:main with commit 4e99842 Oct 9, 2026
55 checks passed

This branch was previously deployed

1 inactive deployment
github-app-auth — 9838f996 Deployed Oct 9, 2026 by dargilco via add_label #24849
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants