mirror of
https://github.com/microsoft/autogen.git
synced 2026-02-13 10:55:03 -05:00
* Search directory for list of actors using regex '.*' gets all actors * docs changes * pre-commit fixes * Use ActorInfo from protobuf * pre-commit * Added zmq tests to work on removing sleeps * minor refactor of zmq tests * 1) Change DirSvr to user Broker. 2) Add req-router to broker 3) In ActorConnector use handshake and req/resp to remove sleep * 1) Change DirSvr to user Broker. 2) Add req-router to broker 3) In ActorConnector use handshake and req/resp to remove sleep * move socket creation to thread with recv * move socket creation to thread with recv * Better logging for DirectorySvc * better logging for directory svc * Use logging config * Start removing sleeps * pre-commit * Cleanup monitor socket
56 lines
2.2 KiB
Markdown
56 lines
2.2 KiB
Markdown
# Composable Actor Platform (CAP) for AutoGen
|
|
|
|
## I just want to run the demo!
|
|
*Python Instructions (Windows, Linux, MacOS):*
|
|
|
|
0) cd py
|
|
1) pip install -r autogencap/requirements.txt
|
|
2) python ./demo/App.py
|
|
|
|
*Demo Notes:*
|
|
1) Options involving AutoGen require OAI_CONFIG_LIST.
|
|
AutoGen python requirements: 3.8 <= python <= 3.11
|
|
2) For option 2, type something in and see who receives the message. Quit to quit.
|
|
3) To view any option that displays a chart (such as option 4), you will need to disable Docker code execution. You can do this by setting the environment variable `AUTOGEN_USE_DOCKER` to `False`.
|
|
|
|
*Demo Reference:*
|
|
```
|
|
Select the Composable Actor Platform (CAP) demo app to run:
|
|
(enter anything else to quit)
|
|
1. Hello World Actor
|
|
2. Complex Actor Graph
|
|
3. AutoGen Pair
|
|
4. AutoGen GroupChat
|
|
5. AutoGen Agents in different processes
|
|
Enter your choice (1-5):
|
|
```
|
|
|
|
## What is Composable Actor Platform (CAP)?
|
|
AutoGen is about Agents and Agent Orchestration. CAP extends AutoGen to allows Agents to communicate via a message bus. CAP, therefore, deals with the space between these components. CAP is a message based, actor platform that allows actors to be composed into arbitrary graphs.
|
|
|
|
Actors can register themselves with CAP, find other agents, construct arbitrary graphs, send and receive messages independently and many, many, many other things.
|
|
```python
|
|
# CAP Platform
|
|
network = LocalActorNetwork()
|
|
# Register an agent
|
|
network.register(GreeterAgent())
|
|
# Tell agents to connect to other agents
|
|
network.connect()
|
|
# Get a channel to the agent
|
|
greeter_link = network.lookup_agent("Greeter")
|
|
# Send a message to the agent
|
|
greeter_link.send_txt_msg("Hello World!")
|
|
# Cleanup
|
|
greeter_link.close()
|
|
network.disconnect()
|
|
```
|
|
### Check out other demos in the `py/demo` directory. We show the following: ###
|
|
1) Hello World shown above
|
|
2) Many CAP Actors interacting with each other
|
|
3) A pair of interacting AutoGen Agents wrapped in CAP Actors
|
|
4) CAP wrapped AutoGen Agents in a group chat
|
|
5) Two AutoGen Agents running in different processes and communicating through CAP
|
|
6) List all registered agents in CAP
|
|
### Coming soon. Stay tuned! ###
|
|
1) AutoGen integration to list all registered agents
|