AI Personal Learning
and practical guidance
讯飞绘镜

AIEvo: An Efficient Framework for Creating Multi-Intelligent Collaborative Applications

General Introduction

AIEvo is Ant Group's open source multi-agent framework designed to efficiently create multi-agent applications. The framework strictly follows the SOP task graph to improve the execution success rate of complex tasks and ensures high flexibility and scalability through feedback and monitoring mechanisms.AIEvo has been validated in Ant Group's internal production environment with stability and reliability. Users can utilize AIEvo to create a variety of multi-agent applications, such as debate competitions, werewolf killing games, undercover games, etc., as well as single-agent applications, such as an engineer agent that completes code writing tasks.

AIEvo:创建多智能体协作应用的高效框架-1


 

Function List

  • High SOP compliance: Performs complex tasks in strict adherence to SOP task maps.
  • High implementation success rate: Enhance mission success through feedback and monitoring mechanisms.
  • high flexibility: Supports dynamic task creation and subscription settings based on task attributes.
  • scalability: Provides numerous extension points to support customized enhancement frameworks.
  • Enterprise Verification: Validated in Ant Group's internal production environment to ensure the stability and reliability of the framework.
  • Multi-agent Application Example: Supports the creation of debate competitions, werewolf games, undercover games, and other multi-agent applications.
  • Single Agent Application Example: Supports the creation of Engineer Agents that accomplish code writing tasks.

 

Using Help

Installation process

  1. clone warehouse: Run the following command in a terminal to clone the AIEvo repository:
   git clone https://github.com/antgroup/aievo.git
  1. Access to the catalog: Enter the cloned AIEvo catalog:
   cd aievo
  1. Installation of dependencies: Install the required dependencies according to the project's dependency file:
   go mod tidy

Guidelines for use

Creating multi-agent applications

  1. Initialize the base model client::
   client, err := openai.New(openai.WithToken(os.Getenv("OPENAI_API_KEY")), openai.WithModel(os.Getenv("OPENAI_MODEL")), openai.WithBaseURL(os.Getenv("OPENAI_BASE_URL")))
if err != nil {
log.Fatal(err)
}
  1. File manipulation related tools::
   fileTools, _ := file.GetFileRelatedTools(workspace)
  1. command execution tool::
   bashTool, _ := bash.New()
  1. Build Toolset::
   engineerTools := make([]tool.Tool, 0)
engineerTools = append(engineerTools, fileTools...)
engineerTools = append(engineerTools, bashTool)
  1. callback processor::
   callbackHandler := &CallbackHandler{}
  1. Defining the environment::
   env := environment.NewEnv()
  1. Building Agents::
   engineer, _ := agent.NewBaseAgent(
agent.WithName("engineer"),
agent.WithDesc(EngineerDescription),
agent.WithPrompt(EngineerPrompt),
agent.WithInstruction(SingleAgentInstructions),
agent.WithVars("sop", Workflow),
agent.WithVars("workspace", workspace),
agent.WithTools(engineerTools),
)

Creating a Single Agent Application

  1. Initialize the base model client::
   client, err := openai.New(openai.WithToken(os.Getenv("OPENAI_API_KEY")), openai.WithModel(os.Getenv("OPENAI_MODEL")), openai.WithBaseURL(os.Getenv("OPENAI_BASE_URL")))
if err != nil {
log.Fatal(err)
}
  1. File manipulation related tools::
   fileTools, _ := file.GetFileRelatedTools(workspace)
  1. command execution tool::
   bashTool, _ := bash.New()
  1. Build Toolset::
   engineerTools := make([]tool.Tool, 0)
engineerTools = append(engineerTools, fileTools...)
engineerTools = append(engineerTools, bashTool)
  1. callback processor::
   callbackHandler := &CallbackHandler{}
  1. Defining the environment::
   env := environment.NewEnv()
  1. Building Agents::
   engineer, _ := agent.NewBaseAgent(
agent.WithName("engineer"),
agent.WithDesc(EngineerDescription),
agent.WithPrompt(EngineerPrompt),
agent.WithInstruction(SingleAgentInstructions),
agent.WithVars("sop", Workflow),
agent.WithVars("workspace", workspace),
agent.WithTools(engineerTools),
)

sample application

  • debate competition: Multiple agents participate in debate competitions.
  • Werewolf games: Multiple agents are involved in the game of Werewolf.
  • Undercover games: Multiple agents are involved in the undercover game.
  • Dissertation Writing: Multiple agents collaborate on papers.
  • Engineer's Agent: A single agent completes the coding task.

caveat

  • Ensure that you have configured the environment variables correctly before using theOPENAI_API_KEY,OPENAI_MODEL,OPENAI_BASE_URLetc.
  • Customize agent descriptions, prompts, and commands according to specific needs.
  • Use the callback processor to analyze the execution process of the agent and optimize the effectiveness of task execution.
May not be reproduced without permission:Chief AI Sharing Circle " AIEvo: An Efficient Framework for Creating Multi-Intelligent Collaborative Applications
en_USEnglish