diff --git a/python/packages/core/agent_framework/_workflows/_agent.py b/python/packages/core/agent_framework/_workflows/_agent.py index 509a3379435..f4aa653310d 100644 --- a/python/packages/core/agent_framework/_workflows/_agent.py +++ b/python/packages/core/agent_framework/_workflows/_agent.py @@ -113,8 +113,14 @@ def __init__( id: Unique identifier for the agent. If None, will be generated. name: Optional name for the agent. description: Optional description of the agent. - context_providers: Optional sequence of context providers for the agent. - **kwargs: Additional keyword arguments passed to BaseAgent. + context_providers: Optional sequence of context providers. Provider lifecycle hooks + run, and provider-contributed messages are passed to the workflow. Provider- + contributed instructions, tools, and chat or function middleware are not + propagated to executors; configure them on the agents or clients within the + workflow instead. + **kwargs: Additional keyword arguments passed to BaseAgent. Middleware stored by + BaseAgent is not executed by WorkflowAgent; configure middleware on the agents + or clients within the workflow instead. Note: Only output events (type='output') and request_info events (type='request_info') from diff --git a/python/packages/core/agent_framework/_workflows/_workflow.py b/python/packages/core/agent_framework/_workflows/_workflow.py index 7a929f00a55..be6d8ffc707 100644 --- a/python/packages/core/agent_framework/_workflows/_workflow.py +++ b/python/packages/core/agent_framework/_workflows/_workflow.py @@ -1484,8 +1484,14 @@ def as_agent( Args: name: Optional name for the agent. Defaults to workflow name. description: Optional description of the agent. Defaults to workflow description. - context_providers: Optional sequence of context providers for the agent. - **kwargs: Additional keyword arguments passed to BaseAgent. + context_providers: Optional sequence of context providers. Provider lifecycle hooks + run, and provider-contributed messages are passed to the workflow. Provider- + contributed instructions, tools, and chat or function middleware are not + propagated to executors; configure them on the agents or clients within the + workflow instead. + **kwargs: Additional keyword arguments passed to BaseAgent. Middleware stored by + BaseAgent is not executed by WorkflowAgent; configure middleware on the agents + or clients within the workflow instead. Returns: A WorkflowAgent instance that wraps this workflow.