AutoGPT
AutoGPT copied to clipboard
Agent group
Duplicates
- [X] I have searched the existing issues
Summary 💡
Having a group of agents is very important to us. Instead of working with just one agent, each agent can create a new agent in front of it. The agents can effectively perform tasks with more specialized prompts. My proposal for this issue is as follows.
AgentMember(Agent):
properties:
id: string: uuid based for recognizing an agent
name: string
description: string
initial_promt: string
boss: AgentMember: agent should reutrn result of task to its boss
task_queue: queue<Task>: a storge for saving messages from other angets
pending_tasks: Dict<id, Task>: all tasks have roles in it
llm_provider: LLM Provier
childs: List<AgentMember>: all agents work for this Agent
able_to_create_agent: bool: This agent can create another agent
methods:
async_send(agenet_id, task: TaskRequestBody):
async_recieve(sender_id, task: TaskRequestBody):
async_reply(agent_id, task_id, taskResult: TaskResult):
AgentGroup:
properties:
ceo: the head of AgentGroup
tasks:
create_task(TaskRequestBody):
Task(we have this right now):
properties:
status: enum: can be pending or wait for doing by other agents
commands that we need:
assign_task_to_child_agent
tell_father_I_can't_do_it
create_an_agent_for_this_task (if create agent is enable)
recruite_agent_for_an_agent
Examples 🌈
ceo = AgentMember(
name="ceo",
description="you are ceo of a company",
able_to_create_agent=true,
boss=null
)
cto = AgentMember(
name="cto",
description="you are cto of a company",
able_to_create_agent=false,
boss=ceo
)
techLead = AgentMember(
name="techLead",
description="you are techLead of a company you'll reveiew and merge merge requests",
able_to_create_agent=false,
boss=cto
)
devops_lead = AgentMember(
name="devops_lead",
description="you are devops_lead of a company you should prepare infrustructre like gitlab, servers for deploy",
able_to_create_agent=false,
boss=cto
)
hr_lead = AgentMember(
name="hr_lead",
description="you are hr_lead of a company You'll recruite agents when we need it",
able_to_create_agent=true,
boss=ceo
)
agentGroup = AgentGrouop(
ceo = ceo
)
agentGroup.create_task("make and deploy a selling webiste")
Motivation 🔦
Agents in Autogpt can't talk with each other. they just can with themselves. we can create specific agents with specific tasks.
@Pwuts thoughts on the datastructure
Data structure looks pretty good in itself. Comments:
AgentMemberhas both abossand achildsproperty. Are these redundant?- Do all
AgentMembers have access to the same set of commands/actions?
AgentMemberhas both abossand achildsproperty. Are these redundant?
Sometimes we need to access our boss to report our work. And sometimes find a good child or employee to assign tasks to it. Can we handle this in just one way?
- Do all
AgentMembers have access to the same set of commands/actions?
I'm not sure about this. One of the main challenges in implementation that I have is the create_agent part. My idea for that right now is to create an array of all agents that can create_agent (able_to_create_agent is true)(its name will be AgentFactory). When a normal agent needs to create a new agent (request for create agent) it will reach to CEO of AgentGroup and it will send this request to AgentFactory. It's not clean I think. In a normal company HR team will hire new employees. I'm trying to do something like this.
For report: I tried to implement whatever I said. I was forced to change some of the structure. It has a lot of work to do. I'm working on it right now https://github.com/MKdir98/AutoGPT/tree/feat/agent-group