Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PublishMessage differences between .NET and Python #4998

Open
lokitoth opened this issue Jan 10, 2025 · 1 comment
Open

PublishMessage differences between .NET and Python #4998

lokitoth opened this issue Jan 10, 2025 · 1 comment

Comments

@lokitoth
Copy link
Member

PublishMessageAsync on the .NET side sends a message to all agents, including the sender (so if sender also handles messages of that type, it will receive the message).

In Python, this is explicitly avoided (https://github.com/microsoft/autogen/blob/main/python/packages/autogen-core/src/autogen_core/_single_threaded_agent_runtime.py#L376-L379):

# Avoid sending the message back to the sender
if message_envelope.sender is not None and agent_id == message_envelope.sender:
    continue

What should the desired behaviour be here?

@ekzhu
Copy link
Collaborator

ekzhu commented Jan 10, 2025

Agent should not receive its own message. It complicates things for developers.

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

No branches or pull requests

2 participants