Skip to content

Python: Add middleware sample to show filtering messages between agents #3556

Description

Summary

Add middleware sample for message interception between agents.

Files

File Line
sample: group_chat_agent_manager.py before GroupChatBuilder

Context

# TODO: think about using middleware to help filter messages between agents
workflow = (
    GroupChatBuilder()
    .with_agent_orchestrator(orchestrator_agent)

Use cases: content filtering, message transformation, access control between agents.

Action Items

  • Design middleware interface for message interception
  • Document use cases and patterns

Activity

  1. changed the title [-]Python: Add middleware to filter messages between agents[/-] [+]Python: Add middleware sample to show filtering messages between agents[/+] on Jan 30, 2026
  2. 1aifanatic commented on Oct 3, 2026

    @1aifanatic
    Contributor

    I will add a group-chat interception sample using a custom orchestrator, following the review guidance on #6143. Filtering will run before participant responses enter shared conversation state or are broadcast, rather than post-processing workflow output events. I will verify that downstream participants receive only the filtered text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

orchestrationUsage: [Issues, PRs], Target: multi-agent orchestration (high-level patterns)pythonUsage: [Issues, PRs], Target: PythonworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions