microsoft / microsoft/agent-framework

Python: Add middleware sample to show filtering messages between agents

Open
#3,556 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

orchestration python workflows
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

## Summary

Add middleware sample for message interception between agents.

## Files

| File | Line |
|------|------|
| sample: `group_chat_agent_manager.py` | before GroupChatBuilder |

## Context

```python
# 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.