Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
2 years ago | |
|---|---|---|
| .. | ||
| autogencap | 2 years ago | |
| demo | 2 years ago | |
| README.md | 2 years ago | |
| pyproject.toml | 2 years ago | |
Python Instructions (Windows, Linux, MacOS):
pip install autogencap
## 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 Library
from autogencap.ComponentEnsemble import ComponentEnsemble
from autogencap.Actor import Actor
# A simple Agent
class GreeterAgent(Actor):
def __init__(self):
super().__init__(
agent_name="Greeter",
description="This is the greeter agent, who knows how to greet people.")
# Prints out the message it receives
def on_txt_msg(self, msg):
print(f"Greeter received: {msg}")
return True
ensemble = ComponentEnsemble()
# Create an agent
agent = GreeterAgent()
# Register an agent
ensemble.register(agent) # start message processing
# call on_connect() on all Agents
ensemble.connect()
# Get a channel to the agent
greeter_link = ensemble.find_by_name("Greeter")
#Send a message to the agent
greeter_link.send_txt_msg("Hello World!")
# Cleanup
greeter_link.close()
ensemble.disconnect()
py/demo directory. We show the following:This is a mirror of AutoGen from GitHub. AutoGen is a framework that enables the development of LLM applications using multiple agents that can converse with each other to solve tasks.
Python SVG Jupyter Notebook C# TSX other