Skip to content

Python: clarify WorkflowAgent policy configuration - #8585

Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:workflow-agent-policy-docs
Sep 21, 2026
Merged

Eduard van Valkenburg (eavanvalkenburg) merged 1 commit into
microsoft:mainfrom
eavanvalkenburg:workflow-agent-policy-docs

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

Motivation & Context

Workflow.as_agent() accepts base-agent configuration and context providers, but the workflow wrapper supports a narrower policy surface than a chat agent. Clarifying that boundary helps callers configure middleware, tools, and instructions on the agents or clients that execute inside the workflow.

Description & Review Guide

  • What are the major changes? Updated the Workflow.as_agent() and WorkflowAgent constructor docstrings to describe which context-provider contributions are forwarded and where middleware should be configured.
  • What is the impact of these changes? Documentation only; runtime behavior and public signatures are unchanged.
  • What do you want reviewers to focus on? Whether the wording clearly distinguishes provider lifecycle/messages from policy configuration owned by agents and clients inside the workflow.

Related Issue

N/A — documentation-only clarification; no public issue.

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 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.

Copilot review overview

🟢 Approval recommended

The documentation accurately reflects the existing implementation and introduces no runtime changes.

Review effort: Balanced
Findings: None

What changed in this PR

Clarifies WorkflowAgent policy boundaries without changing runtime behavior.

Changes:

  • Documents forwarded context-provider lifecycle and messages.
  • Clarifies where middleware, tools, and instructions must be configured.
File Description
_workflow.py Clarifies Workflow.as_agent() configuration behavior.
_agent.py Documents WorkflowAgent policy limitations.

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

@github-actions github-actions Bot 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.

MAF Automated Review — Iteration 1

Result: No findings
Scope: full PR (1 commit(s)): 4309364ff24c
Model: gpt-5.6-sol-fast

Overview

This documentation-only change accurately explains that WorkflowAgent forwards provider-contributed messages while leaving policy configuration to agents and clients inside the workflow. The implementation and tests confirm the main distinctions around context providers, wrapper middleware, and explicit runtime tools. No Critical, High, or Medium issue was established.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

Merged via the queue into microsoft:main with commit 9dacc49 Sep 21, 2026
49 checks passed
@eavanvalkenburg
Eduard van Valkenburg (eavanvalkenburg) deleted the workflow-agent-policy-docs branch September 21, 2026 14:38
ZedingZhang (ZedingZhang) pushed a commit to ZedingZhang/agent-framework that referenced this pull request Sep 29, 2026

This branch was previously deployed

1 inactive deployment
github-app-auth — 4309364f Deployed Sep 21, 2026 by eavanvalkenburg via team_check #4943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants