9 Star 32 Fork 11

agentUniverse/agentUniverse

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

agentUniverse


语言版本: English | 中文 | 日本語

Static Badge


agentUniverse是什么?

agentUniverse 是一个基于大型语言模型的多智能体框架。 agentUniverse为您提供灵活易拓展的单智能体构建能力;agentUniverse核心拥有丰富的多智能体协同模式组件(可视为一个协同模式工厂Pattern Factory),它能让智能体们各司其职在解决不同领域问题时发挥最大的能力;同时agentUniverse专注于领域经验的融合,帮助您轻松将领域经验融入到智能体的工作中。🎉🎉🎉

🌈🌈🌈agentUniverse帮助开发者、企业轻松构建出领域专家级别的强大智能体协同为您工作。

我们期待您通过社区对不同领域的Pattern进行实践与交流共享,框架也预置有若干已在真实产业中验证有效的多智能体协作模式组件,并在未来持续丰富。目前即将开放的模式组件包括:

  • PEER 模式组件: 该pattern通过计划(Plan)、执行(Execute)、表达(Express)、评价(Review)四个不同职责的智能体,实现对复杂问题的多步拆解、分步执行,并基于评价反馈进行自主迭代,最终提升推理分析类任务表现。典型适用场景:事件解读、行业分析
  • DOE 模式组件: 该pattern通过数据精制(Data-fining)、观点注入(Opinion-inject)、表达(Express)三个智能体,实现对数据密集、高计算精度、融合专家观点的生成任务的效果提升。典型适用场景:财报生成

更多模式组件持续推出中...


目录


快速开始

快速安装

使用pip:

pip install agentUniverse

运行第一个教程案例

运行您的第一个案例,您可以通过教程快速体验agentUniverse构建出的智能体(组)运行效果。

详细步骤请阅读文档: 运行第一个教程案例


如何搭建一个智能体应用

标准工程脚手架

⌨️ 标准工程脚手架:agentUniverse Standard Project

快速构建单体智能体

您可以通过 快速构建单体智能体 章节的阅读与体验了解如何快速构建单个智能体,并掌握如何通过工具、知识库、RAG技术等能力增强您的智能体能力,同时掌握智能体配置、测试、调优、服务化、效果评估等一系列基本的智能体应用研发流程。

构建典型的多智能体应用

您可以通过 构建典型的多智能体应用 章节进一步了解在复杂的任务场景,如何将智能体能力拆分成多个智能体,并让其通过协同进一步提升您的任务表现。

沉淀与使用智能体模版

您可以通过 沉淀与使用智能体模版 章节了解如何将有效的智能体模式沉淀成模版,这将大大提升后续智能体的构建效率并便于传播。

常用使用技巧

您可以通过 常用使用技巧 章节了解智能体应用构建过程中的常用使用技巧,例如如何在智能体过程中加入记忆模块、如何有效的管理项目中的prompt等。

画布式研发平台搭建

agentUniverse提供基于本地的画布式研发平台能力,请按照如下步骤快速启动。

通过pip安装

pip install magent-ui ruamel.yaml

一键运行

运行sample_standard_app/bootstrap下的product_application.py文件,一键启动。

更多详情参考 产品化平台快速开始产品化平台进阶指南 。本功能由 🔗difizen 项目组 X agentUniverse 项目组联合推出。


为什么使用agentUniverse

设计思路

agentUniverse核心提供了搭建单一智能体的全部关键组件、多智能体之间的协作机制、以及专家经验的注入机制,可以帮助开发者轻松构建具备专业KnowHow的智能应用。

多智能体协同机制

agentUniverse提供了若干已在真实产业中验证有效的多智能体协作模式组件,其中,“PEER”是最具特色的模式之一。

PEER模式通过计划(Planning)、执行(Executing)、表达(Expressing)、评价(Reviewing)四个不同职责的智能体,实现对复杂问题的多步拆解、分步执行,并基于评价反馈进行自主迭代,最终提升推理分析类任务表现。这一模式显著适用于需要多步拆解、深度分析的场景,比如对于事件的解读、宏中观经济分析、商业方案的可行性分析等。

PEER模式取得了令人兴奋的效果,最新的研究成果与实验结果我们可以在下列文献中阅读。

文献

BibTeX formatted

@misc{wang2024peerexpertizingdomainspecifictasks,
      title={PEER: Expertizing Domain-Specific Tasks with a Multi-Agent Framework and Tuning Methods}, 
      author={Yiying Wang and Xiaojing Li and Binzhu Wang and Yueyang Zhou and Han Ji and Hong Chen and Jinshi Zhang and Fei Yu and Zewei Zhao and Song Jin and Renji Gong and Wanqing Xu},
      year={2024},
      eprint={2407.06985},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2407.06985}, 
}

文献简介:该文献详细介绍了介绍了PEER多智能体框架的机制原理,同时在实验部分分别从完整性、相关性、紧凑性、事实性、逻辑性、结构性和全面性七个维度进行打分(各纬度满分为5分),PEER模式在每个测评维度的平均分数均高于BabyAGI,且在完整性、相关性、逻辑性、结构性和全面性五个纬度有显著优势;同时PEER模式在 GPT-3.5 turbo (16k) 模型下相较于 BabyAGI 的择优胜率达到 83%,在 GPT-4o 模型下择优胜率达到 81%,更多详情请阅读文献。 🔗https://arxiv.org/pdf/2407.06985

核心特性

通过上述的介绍我们将其归纳总结,agentUniverse包含如下主要特点:

灵活易拓的智能体构建能力: 提供智能体构建所必须的全部关键组件,所有组件均可支持定制供用户增强专属智能体;

丰富有效的多智能体协同模式: 提供PEER(Plan/Execute/Express/Review)、DOE(Data-fining/Opinion-inject/Express)等产业中验证有效的协同模式,支持用户自定义编排新模式,让多个智能体有机合作;

轻松融入领域经验: 提供领域prompt、知识构建与管理的能力,支持领域级SOP编排与注入,将智能体对齐至领域专家级别;

💡 更多特点见agentUniverse核心特性部分。


应用实践

应用实践案例

🚩 法律咨询Agent_v2

🚩 Python代码生成与执行Agent

🚩 基于多轮多Agent的讨论小组

🚩 基于PEER协同模式的金融事件分析

🚩 吴恩达反思工作流翻译智能体复刻

使用aU构建的典型产品

🔗支小助-金融从业专家AI助手

投研支小助:助推大模型落地严谨产业,提升投研专家效率

投研支小助是大模型落地严谨产业的高效解决方案,基于专注严谨应用的凤凰大模型和善于专业定制的agentUniverse智能体框架,主要面向投研、ESG、财经、财报等投研相关细分领域的一系列专业AI业务助手,已在蚂蚁大规模场景充分验证,提升专家效率。

https://private-user-images.githubusercontent.com/39180831/355437700-192f712d-1b03-46a6-8422-1ca10aa94331.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI5NDk4NTAsIm5iZiI6MTcyMjk0OTU1MCwicGF0aCI6Ii8zOTE4MDgzMS8zNTU0Mzc3MDAtMTkyZjcxMmQtMWIwMy00NmE2LTg0MjItMWNhMTBhYTk0MzMxLm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA2VDEzMDU1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4NWMzNzVjOGZjZDNjMDMzMTE4YjQzOTk0ZWQwZGZkNWNmNWQxNWMzYWIzMTk4MzY1MjA5NWRhMjU2NGNiNzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.q1vdSg_Ghxr-DHLXfmQ_fVVRVSFn7H8VMHMi-_2QrjA


用户指南手册

💡 更多详细信息,请阅读用户指南手册


更多

API参考

💡 请阅读readthedocs

支持

通过github issue提交疑问

😊 我们建议您使用github issue 提交您的疑问, 我们通常会在2日内回复。

通过Discord联系我们

😊 加入我们的 Discord频道 与我们进行交流。

通过钉钉群联系我们

😊 加入我们的钉钉答疑群与我们联系。

通过管理员Email联系我们

😊 Email:

jihan.hanji@antgroup.com jerry.zzw@antgroup.com jinshi.zjs@antgroup.com

微信公众号

😊 公众号ID:agentUniverse智多星

更多相关的文章与资讯你可以在微信公众号中获取。

twitter

ID: @agentuniverse_

鸣谢

本项目部分基于langchain、pydantic、gunicorn、flask、SQLAlchemy、chromadb等(详细依赖列表可见pyproject.toml)优秀开源项目实现,在此特别感谢相关项目与关联方。 🙏🙏🙏

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2024 Alipay Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

简介

agentUniverse是一个大模型多智能体框架,开发者可以基于本框架轻松构建多智能体应用,并通过社区对不同领域的pattern实践进行交流共享。 展开 收起
Python
Apache-2.0
取消

发行版 (12)

全部
4天前

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/agentUniverse/agentUniverse.git
git@gitee.com:agentUniverse/agentUniverse.git
agentUniverse
agentUniverse
agentUniverse
master

搜索帮助