You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def receive(incoming_msg, sender):
# 1. print incoming_msg
# 2. process the incoming_msg and generate outbound_msg. (ask for human input or automatic reply)
# 3. call send(outbound_msg, receiver = "sender") to complete the loop
def send(outbound_msg, receiver):
# call receiver.receive(outbound_msg, self)
# sender sending the message is equivalent to the receiver receiving the message from sender
After two agent are created, calling receive from one agent will start the interactions between two agents. We cannot construct a pipeline of multiple single-hop agents with this.
For example I want a workflow: question -> Planning Agent -> question and plan -> Solver Agent -> result.
Idea
moving step 2: process the incoming_msg and generate outbound_msg out as an individual functionality
distinguish interactive agents and static agents.
Agent.py
classAgent:
defsend(self, message: Union[Dict, str], recipient: "Agent"):
"""(Aabstract method) Send a message to another agent."""defreceive(self, message: Union[Dict, str], sender: "Agent"):
"""(Abstract method) Receive a message from another agent."""# basically taking `auto_reply` out defprocess(self, message):
"""(Abstract method) Process incoming message and generate reply"""
Static + Interactive: First call a static planner to devise a plan, and then call two interactive agents with the plan, after get the answer, call a goal_checker static agent.
This is different from define planners as a function in UserProxyAgent.
Current logic of generic agent:
Pseudo code:
After two agent are created, calling receive from one agent will start the interactions between two agents. We cannot construct a pipeline of multiple single-hop agents with this.
For example I want a workflow: question -> Planning Agent -> question and plan -> Solver Agent -> result.
Idea
step 2: process the incoming_msg and generate outbound_msg
out as an individual functionalityAgent.py
InteractiveAgent (previous GenericAgent):
StaticAgent (new):
Examples
Use static agent planner and solver to complete workflow: question -> Planning Agent -> question and plan -> Solver Agent -> result:
Static + Interactive: First call a static planner to devise a plan, and then call two interactive agents with the plan, after get the answer, call a goal_checker static agent.
This is different from define planners as a function in UserProxyAgent.
The text was updated successfully, but these errors were encountered: