Skip to content

[Python] Expand Core API documentation on RPC and Pub/Sub messaging #5333

@ekzhu

Description

@ekzhu

Currently the only documentation for RPC and Pub/Sub messaging is in the two sub sections: https://microsoft.github.io/autogen/stable/user-guide/core-user-guide/framework/message-and-communication.html#message-and-communication

Several recent issues show a gap of understanding in using this. e.g., #5317

Let's expand the documentation on messaging into two new sections:

  • Direct (RPC) Messages
  • Broadcast (Pub-Sub) Messages

In the Broadcast Messages section, explain the following topics:

  1. How to publish a message: from the runtime directly, and from an agent to a TopicId
  2. How to subscribe to a topic type: using typic_subscription decorator, and using runtime.add_subscription method.
  3. Show an simple example of the Modifier-Checker using add_subscription and publish to TopicId specifically.
  4. A more advanced example of multiple subscriptions for Checker and two Modifier agents.
  5. Show how to use default_subscription and DefaultTopicId to simplify the code -- and a note on a global publishing scope.

Other tasks:

  • Link to the topic and subscription core concept and cookbook.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions