RolePlaying
and BabyAGI
, which are used to run the interaction behaviors of agents to achieve objectives.
Taking RolePlaying
as an example, this framework was designed in an instruction-following manner. These roles independently undertake the responsibilities of executing and planning tasks, respectively. The dialogue is continuously advanced through a turn-taking mechanism, thereby collaborating to complete tasks. The main concepts include:
RolePlaying
RolePlaying
is a unique cooperative agent framework of CAMEL. Through this framework, agents in CAMEL overcome numerous challenges, such as role flipping, assistant repeats instructions, flake replies, infinite loop of messages, and conversation termination conditions.
When using RolePlaying
framework in CAMEL, predefined prompts are used to create unique initial settings for different agents. For example, if the user wants to initialize an assistant agent, the agent will be initialized with the following prompt.
ASSISTANT_ROLE
and I am a USER_ROLE
.
This assigns the chosen role to the assistant agent and provides it with information about the userβs role.
<YOUR_SOLUTION>
. <YOUR_SOLUTION>
should be specific, and provide preferable implementations and examples for task-solving.
This encourages the assistant to always responds in a consistent format, avoiding any deviation from the structure of the conversation, and preventing vague or incomplete responses, which we refer to as flake responses, such as βI will do somethingβ.
RolePlaying
AttributesAttribute | Type | Description |
---|---|---|
assistant_role_name | str | The name of the role played by the assistant. |
user_role_name | str | The name of the role played by the user. |
critic_role_name | str | The name of the role played by the critic. |
task_prompt | str | A prompt for the task to be performed. |
with_task_specify | bool | Whether to use a task specify agent. |
with_task_planner | bool | Whether to use a task planner agent. |
with_critic_in_the_loop | bool | Whether to include a critic in the loop. |
critic_criteria | str | Critic criteria for the critic agent. |
model | BaseModelBackend | The model backend to use for generating responses. |
task_type | TaskType | The type of task to perform. |
assistant_agent_kwargs | Dict | Additional arguments to pass to the assistant agent. |
user_agent_kwargs | Dict | Additional arguments to pass to the user agent. |
task_specify_agent_kwargs | Dict | Additional arguments to pass to the task specify agent. |
task_planner_agent_kwargs | Dict | Additional arguments to pass to the task planner agent. |
critic_kwargs | Dict | Additional arguments to pass to the critic. |
sys_msg_generator_kwargs | Dict | Additional arguments to pass to the system message generator. |
extend_sys_msg_meta_dicts | List[Dict] | A list of dicts to extend the system message meta dicts with. |
extend_task_specify_meta_dict | Dict | A dict to extend the task specify meta dict with. |
output_language | str | The language to be output by the agents. |
BabyAGI
RolePlaying