|
2 | 2 | <a href="README_zh.md">中文</a>  |  <a>English  </a>
|
3 | 3 | </p>
|
4 | 4 |
|
5 |
| -# <p align="center">CodeFuse-muAgent: A Multi-Agent FrameWork For Faster Build Agents</p> |
| 5 | +# <p align="center">CodeFuse-muAgent: An Innovative Agent Framework Driven By KG Engine</p> |
6 | 6 |
|
7 | 7 | <p align="center">
|
8 | 8 | <a href="README.md"><img src="https://img.shields.io/badge/文档-中文版-yellow.svg" alt="ZH doc"></a>
|
9 | 9 | <a href="README_en.md"><img src="https://img.shields.io/badge/document-English-yellow.svg" alt="EN doc"></a>
|
10 |
| - <img src="https://img.shields.io/github/license/codefuse-ai/CodeFuse-muAgent" alt="License"> |
| 10 | + <a href="LICENSE.md"><img src="https://img.shields.io/badge/license-Apache%202.0-yellow" alt="License"> |
11 | 11 | <a href="https://github.com/codefuse-ai/CodeFuse-muAgent/issues">
|
12 | 12 | <img alt="Open Issues" src="https://img.shields.io/github/issues-raw/codefuse-ai/CodeFuse-muAgent" />
|
13 | 13 | </a>
|
|
17 | 17 |
|
18 | 18 |
|
19 | 19 | ## 🔔 News
|
20 |
| -- [2024.04.01] codefuse-muagent is now open source, featuring functionalities such as knowledge base, code library, tool usage, code interpreter, and more |
| 20 | +- [2024.04.01] codefuse-muAgent is now open source, featuring functionalities such as knowledge base, code library, tool usage, code interpreter, and more |
| 21 | +- [2024.09.05] we release muAgent v2.0 - EKG: An Innovative Agent Framework Driven By KG Engine. |
| 22 | + |
| 23 | + |
21 | 24 |
|
22 | 25 | ## 📜 Contents
|
23 | 26 | - [🤝 Introduction](#-Introduction)
|
24 | 27 | - [🚀 QuickStart](#-QuickStart)
|
25 |
| -- [🧭 Key Technologies](#-Key-Technologies) |
| 28 | +- [🧭 Features](#-Features) |
| 29 | +- [🤗 Contribution](#-Contribution) |
26 | 30 | - [🗂 Miscellaneous](#-Miscellaneous)
|
27 | 31 | - [📱 Contact Us](#-Contact-Us)
|
28 | 32 |
|
29 | 33 |
|
30 | 34 | ## 🤝 Introduction
|
31 |
| -Developed by the Ant CodeFuse Team, CodeFuse-muAgent is a Multi-Agent framework whose primary goal is to streamline the Standard Operating Procedure (SOP) orchestration for agents. muagent integrates a rich collection of toolkits, code libraries, knowledge bases, and sandbox environments, enabling users to rapidly construct complex Multi-Agent interactive applications in any field. This framework allows for the efficient execution and handling of multi-layered and multi-dimensional complex tasks. |
32 | 35 |
|
33 |
| - |
| 36 | +A brand new Agent Framework driven by LLM and EKG(Eventic Knowledge Graph, Industry Knowledge Carrier),collaboratively utilizing MultiAgent, FunctionCall, CodeInterpreter, etc. Through canvas-based drag-and-drop and simple text writing, the large language model can assists you in executing various complex SOP under human guidance. It is compatbile with existing frameworks on the market and can achieve four core differentiating technical functions: Complex Reasoning, Online Collaboration, Human Interaction, Knowledge On-demand. |
| 37 | +This framework has been validated in multiple complex DevOps scenarios within Ant Group. At the sametime, come and experience the Undercover game we quickly built! |
34 | 38 |
|
35 |
| -## 🚀 快速使用 |
36 |
| -For complete documentation, see: [CodeFuse-muAgent](https://codefuse-ai.github.io/docs/api-docs/MuAgent/overview/multi-agent) |
37 |
| -For more [demos](https://codefuse-ai.github.io/docs/api-docs/MuAgent/connector/customed_examples) |
| 39 | + |
38 | 40 |
|
39 |
| -1. Installation |
40 |
| -``` |
41 |
| -pip install codefuse-muagent |
42 |
| -``` |
| 41 | +## 🚀 QuickStart |
| 42 | +For complete documentation, see: [CodeFuse-muAgent](https://codefuse.ai/docs/api-docs/MuAgent/overview/multi-agent) |
| 43 | +For more [demos](https://codefuse.ai/docs/api-docs/MuAgent/connector/customed_examples) |
43 | 44 |
|
44 |
| -2. Code answer Prepare related llm and embedding model configurations |
45 |
| -``` |
46 |
| -import os |
47 |
| -
|
48 |
| -# set your config |
49 |
| -api_key = "" |
50 |
| -api_base_url= "" |
51 |
| -model_name = "" |
52 |
| -embed_model = "" |
53 |
| -embed_model_path = "" |
54 |
| -
|
55 |
| -from muagent.llm_models.llm_config import EmbedConfig, LLMConfig |
56 |
| -from muagent.connector.phase import BasePhase |
57 |
| -from muagent.connector.schema import Message, Memory |
58 |
| -from muagent.codechat.codebase_handler.codebase_handler import CodeBaseHandler |
59 |
| -
|
60 |
| -llm_config = LLMConfig( |
61 |
| - model_name=model_name, api_key=api_key, api_base_url=api_base_url, temperature=0.3 |
62 |
| -) |
63 |
| -
|
64 |
| -embed_config = EmbedConfig( |
65 |
| - embed_engine="model", embed_model=embed_model, embed_model_path=embed_model_path |
66 |
| -) |
67 |
| -``` |
68 | 45 |
|
69 |
| -<br> |
| 46 | +### EKG Services |
70 | 47 |
|
71 |
| -Initialize the codebase |
72 |
| -``` |
73 |
| -from muagent.base_configs.env_config import CB_ROOT_PATH |
74 |
| -codebase_name = 'client_local' |
75 |
| -code_path = "D://chromeDownloads/devopschat-bot/client_v2/client" |
76 |
| -
|
77 |
| -cbh = CodeBaseHandler( |
78 |
| - codebase_name, code_path, crawl_type='dir', use_nh=use_nh,local_graph_path=CB_ROOT_PATH, |
79 |
| - llm_config=llm_config, embed_config=embed_config |
80 |
| -) |
81 |
| -cbh.import_code(do_interpret=do_interpret) |
| 48 | +```bash |
| 49 | +# use ekg services only three steps |
| 50 | +# step1. git clone |
| 51 | +git clone https://github.com/codefuse-ai/CodeFuse-muAgent.git |
| 52 | + |
| 53 | +# step2. |
| 54 | +cd CodeFuse-muAgent |
| 55 | + |
| 56 | +# step3. start all container services, it might cost some time |
| 57 | +docker-compose up -d |
82 | 58 | ```
|
83 | 59 |
|
84 |
| -<br> |
| 60 | +The current image version includes only the basic EKG service. We expect to provide a front-end interface and back-end interaction services in September. |
| 61 | + |
| 62 | +To Be Continued! |
| 63 | + |
| 64 | + |
85 | 65 |
|
86 |
| -Start codebase Q&A |
| 66 | +### SDK |
| 67 | +We also provide a version of the SDK for using muagent. |
| 68 | +1. Installation |
87 | 69 | ```
|
88 |
| -# |
89 |
| -phase_name = "codeChatPhase" |
90 |
| -phase = BasePhase( |
91 |
| - phase_name, embed_config=embed_config, llm_config=llm_config, |
92 |
| -) |
93 |
| -# |
94 |
| -query_content = "what does the remove' function?" |
95 |
| -query = Message( |
96 |
| - role_name="user", role_type="human", input_query=query_content, |
97 |
| - code_engine_name=codebase_name, score_threshold=1.0, top_k=3, cb_search_type="tag", |
98 |
| - local_graph_path=CB_ROOT_PATH, use_nh=False |
99 |
| - ) |
100 |
| -output_message3, output_memory3 = phase.step(query) |
101 |
| -print(output_memory3.to_str_messages(return_all=True, content_key="parsed_output_list")) |
| 70 | +pip install codefuse-muagent |
102 | 71 | ```
|
103 | 72 |
|
104 |
| -## Key Technologies |
| 73 | +2. Code answer Prepare related llm and embedding model configurations |
| 74 | +you can see [docs](https://codefuse.ai/docs/api-docs/MuAgent/connector/customed_examples) and [~/examples](https://github.com/codefuse-ai/CodeFuse-muAgent/tree/main/examples) |
| 75 | + |
| 76 | + |
105 | 77 |
|
106 |
| -- Agent Base:Four fundamental Agent types are constructed – BaseAgent, ReactAgent, ExecutorAgent, SelectorAgent, supporting basic activities across various scenarios |
107 |
| -- Communication: Information transmission between Agents is accomplished through Message and Parse Message entities, interacting with Memory Manager and managing memories in the Memory Pool |
108 |
| -- Prompt Manager: Customized Agent Prompts are automatically assembled with the aid of Role Handler, Doc/Tool Handler, Session Handler, and Customized Handler |
109 |
| -- Memory Manager: Facilitates the management of chat history storage, information compression, and memory retrieval, culminating in storage within databases, local systems, and vector databases via the Memory Pool |
110 |
| -- Component: Auxiliary ecosystem components to construct Agents, including Retrieval, Tool, Action, Sandbox, etc. |
111 |
| -- Customized Model: Supports the integration of private LLM and Embedding models |
| 78 | +## 🧭 Features |
| 79 | +- **EKG Builder**:Through the design of virtual teams, scene intentions, and semantic nodes, you can experience the differences between online and local documentation, or annotated versus unannotated code handover. For a vast amount of existing documents (text, diagrams, etc.), we support intelligent parsing, which is available for one-click import. |
| 80 | +- **EKG Assets**:Through comprehensive KG Schema design—including Intention Nodes, Workflow Nodes, Tool Nodes, and Character Nodes—we can meet various SOP Automation requirements. The inclusion of Tool Nodes in the KG enhances the accuracy of tool selection and parameter filling. Additionally, the incorporation of Characters (whether human or agents) in the KG allows for human-involved process advancement, making it flexible for use in multiplayer text-based games. |
| 81 | +- **EKG Reasoning**:Compared to purely model-based or entirely fix-flow Reasoning, our framework allows LLM to operate under human guidance-flexibility, control, and enabling exploration in unknown scenarios. Additionally, successful exploration experiences can be summarized and documented into KG, minimizing detours for similar issues. |
| 82 | +- **Diagnose**:After KG editing, visual interface allows for quick debugging, and successful Execution path configurations will be automatically documented, which reduces model interactions, accelerates inference, and minimizes LLM Token costs. Additionally, during online execution, we provide comprehensive end-to-end visual monitoring. |
| 83 | +- **Memory**:Unified message pooling design supports categorized message delivery and subscription based on the needs of different scenarios, like multi-agent. Additionally, through message retrievel, rerank and distillation, it facilitates long-context handling, improving the overall question-answer quality. |
| 84 | +- **ActionSpace**:Adhering to Swagger protocol, we provide tool registration, tool categorization, and permission management, facilitating LLM Function Calling. We offer a secure and trustworthy code execution environment, and ensuring precise code generation to meet the demands of various scenarios, including visual plot, numerical calculations, and table editing. |
112 | 85 |
|
113 |
| -## Contribution |
| 86 | +## 🤗 Contribution |
114 | 87 | We are deeply grateful for your interest in the Codefuse project and warmly welcome any suggestions, opinions (including criticism), comments, and contributions.
|
115 | 88 |
|
116 | 89 | Feel free to raise your suggestions, opinions, and comments directly through GitHub Issues. There are numerous ways to participate in and contribute to the Codefuse project: code implementation, writing tests, process tool improvements, documentation enhancements, etc.
|
|
0 commit comments