-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] translate tutorial into chinese
- Loading branch information
Showing
9 changed files
with
421 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
(101-agentscope)= | ||
|
||
# About AgentScope | ||
|
||
In this tutorial, we will provide an overview of AgentScope by answering | ||
several questions, including what's AgentScope, what can AgentScope provide, | ||
and why we should choose AgentScope. Let's get started! | ||
|
||
## What is AgentScope? | ||
|
||
AgentScope is a developer-centric multi-agent platform, which enables | ||
developers to build their LLM-empowered multi-agent applications with less | ||
effort. | ||
|
||
With the advance of large language models, developers are able to build | ||
diverse applications. | ||
In order to connect LLMs to data and services and solve complex tasks, | ||
AgentScope provides a series of development tools and components for ease of | ||
development. | ||
It features | ||
- **usability**, | ||
- **robustness**, and | ||
- **the support of multi-modal data** and | ||
- **distributed deployment**. | ||
|
||
## Key Concepts | ||
|
||
### Message | ||
Message is a carrier of information (e.g. instructions, multi-modal | ||
data, and dialogue). In AgentScope, message is a Python dict subclass | ||
with `name` and `content` as necessary fields, and `url` as an optional | ||
field referring to additional resources. | ||
|
||
### Agent | ||
Agent is an autonomous entity capable of interacting with environment and | ||
agents, and taking actions to change the environment. In AgentScope, an | ||
agent takes message as input and generates corresponding response message. | ||
|
||
### Service | ||
Service refers to the functional APIs that enable agents to perform | ||
specific tasks. In AgentScope, services are categorized into model API | ||
services, which are channels to use the LLMs, and general API services, | ||
which provide a variety of tool functions. | ||
|
||
### Workflow | ||
Workflow represents ordered sequences of agent executions and message | ||
exchanges between agents, analogous to computational graphs in TensorFlow, | ||
but with the flexibility to accommodate non-DAG structures. | ||
|
||
|
||
## Why AgentScope? | ||
|
||
**Exceptional usability for developers.** | ||
AgentScope provides high usability for developers with flexible syntactic | ||
sugars, ready-to-use components, and pre-built examples. | ||
|
||
**Robust fault tolerance for diverse models and APIs.** | ||
AgentScope ensures robust fault tolerance for diverse models, APIs, and | ||
allows developers to build customized fault-tolerant strategies. | ||
|
||
**Extensive compatibility for multi-modal application.** | ||
AgentScope supports multi-modal data (e.g., files, images, audio and videos) | ||
in both dialog presentation, message transmission and data storage. | ||
|
||
**Optimized efficiency for distributed multi-agent operations.** AgentScope | ||
introduces an actor-based distributed mechanism that enables centralized | ||
programming of complex distributed workflows, and automatic parallel | ||
optimization. | ||
|
||
|
||
## How is AgentScope designed? | ||
|
||
[]() | ||
|
||
The architecture of AgentScope comprises three hierarchical layers. The | ||
layers provide supports for multi-agent applications from different levels, | ||
including elementary and advanced functionalities of a single agent | ||
(**utility layer**), resources and runtime management (**manager and wrapper | ||
layer**), and agent-level to workflow-level programming interfaces (**agent | ||
layer**). AgentScope introduces intuitive abstractions designed to fulfill | ||
the diverse functionalities inherent to each layer and simplify the | ||
complicated interlayer dependencies when building multi-agent systems. | ||
Furthermore, we offer programming interfaces and default mechanisms to | ||
strengthen the resilience of multi-agent systems against faults within | ||
different layers. | ||
|
||
## AgentScope Code Structure | ||
|
||
```bash | ||
AgentScope | ||
├── src | ||
│ ├── agentscope | ||
│ | ├── agents # Core components and implementations pertaining to agents. | ||
│ | ├── memory # Structures for agent memory. | ||
│ | ├── models # Interfaces for integrating diverse model APIs. | ||
│ | ├── pipeline # Fundamental components and implementations for running pipelines. | ||
│ | ├── rpc # Rpc module for agent distributed deployment. | ||
│ | ├── service # Services offering functions independent of memory and state. | ||
| | ├── web # WebUI used to show dialogs. | ||
│ | ├── utils # Auxiliary utilities and helper functions. | ||
│ | ├── message.py # Definitions and implementations of messaging between agents. | ||
│ | ├── prompt.py # Prompt engineering module for model input. | ||
│ | ├── ... .. | ||
│ | ├── ... .. | ||
├── scripts # Scripts for launching local Model API | ||
├── examples # Pre-built examples of different applications. | ||
├── docs # Documentation tool for API reference. | ||
├── tests # Unittest modules for continuous integration. | ||
├── LICENSE # The official licensing agreement for AgentScope usage. | ||
└── setup.py # Setup script for installing. | ||
├── ... .. | ||
└── ... .. | ||
``` | ||
|
||
[[Return to the top]](#fundamental-concepts) |
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...x_doc/source/tutorial/101-installation.md → ...x_doc/source/tutorial/102-installation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(101-installation)= | ||
(102-installation)= | ||
|
||
# Installation | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
(101-agentscope)= | ||
|
||
# 关于AgentScope | ||
|
||
在此教程中,我们将通过回答问题的方式向您介绍AgentScope,包括什么是AgentScope,AgentScope | ||
能做什么,以及我们为什么应该选择AgentScope。让我们开始吧! | ||
|
||
## 什么是AgentScope? | ||
|
||
AgentScope是以开发者为中心的多智能体平台,它使开发者能够更轻松地构建基于大语言模型的多智能体应用程序。 | ||
|
||
大模型的出现使得开发者能够构建多样化的应用程序,为了连接大语言模型和数据以及服务,并更好地解 | ||
决复杂任务,AgentScope提供了一系列的开发工具和组件来提高开发效率。AgentScope以 | ||
- **易用性**, | ||
- **鲁棒性**, | ||
- **支持多模态数据**和 | ||
- **分布式部署** | ||
|
||
为特点。 | ||
|
||
## 关键概念 | ||
|
||
### 信息(Message) | ||
是信息的载体(例如指令、多模态数据和对话内容)。在AgentScope中,消息是Python字典的子类, | ||
具有`name`和`content`作为必要字段,`url`作为可选字段并指向额外的资源。 | ||
|
||
### 智能体(Agent) | ||
是能够与环境和其他智能体交互,并采取行动改变环境的自主实体。在AgentScope中, | ||
智能体以消息作为输入,并生成相应的响应消息。 | ||
|
||
### 服务(Service) | ||
是使智能体能够执行特定任务的功能性API。在AgentScope中,服务分为模型API服务 | ||
(用于使用大预言模型)和通用API服务(提供各种工具函数)。 | ||
|
||
### 工作流(Workflow) | ||
表示智能体执行和智能体之间的消息交换的有序序列,类似于TensorFlow中的计算图, | ||
但其并不一定是DAG结构。 | ||
|
||
|
||
## 为什么选择AgentScope? | ||
|
||
**面向开发者的易用性。** | ||
AgentScope为开发者提供了高易用性,包括灵活易用的语法糖、即拿即用的组件和预构建的multi-agent样例。 | ||
|
||
**可靠稳定的容错机制。** | ||
AgentScope确保了对多种模型和APIs的容错性,并允许开发者构建定制的容错策略。 | ||
|
||
**全面兼容多模态数据。** | ||
AgentScope支持多模态数据(例如文件、图像、音频和视频)的对话展示、消息传输和数据存储。 | ||
|
||
**高效分布式运行效率。** | ||
AgentScope引入了基于actor的分布式机制,使得复杂的分布式工作流的集中式编程和自动并行优化成为可能。 | ||
|
||
## AgentScope是如何设计的? | ||
|
||
[]() | ||
|
||
AgentScope由三个层次的层次结构组成。 | ||
这些层次提供了对多智能体应用程序的支持,包括单个智能体的基本和高级功能(实用程序层)、资源和运行时管理(管理器和包装层)以及智能体级到工作流级的编程接口(智能体层)。 | ||
AgentScope引入了直观的抽象,旨在满足每个层次固有的多样化功能,并简化构建多智能体系统时的复杂层间依赖关系。 | ||
此外,我们提供了编程接口和默认机制,以增强多智能体系统在不同层次上对故障的韧性。 | ||
|
||
## AgentScope代码结构 | ||
|
||
```bash | ||
AgentScope | ||
├── src | ||
│ ├── agentscope | ||
│ | ├── agents # 与智能体相关的核心组件和实现。 | ||
│ | ├── memory # 智能体记忆相关的结构。 | ||
│ | ├── models # 用于集成不同模型API的接口。 | ||
│ | ├── pipeline # 基础组件和实现,用于运行工作流。 | ||
│ | ├── rpc # Rpc模块,用于智能体分布式部署。 | ||
│ | ├── service # 为智能体提供各种功能的服务。 | ||
| | ├── web # 基于网页的用户交互界面。 | ||
│ | ├── utils # 辅助工具和帮助函数。 | ||
│ | ├── prompt.py # 提示工程模块。 | ||
│ | ├── message.py # 智能体之间消息传递的定义和实现。 | ||
│ | ├── ... .. | ||
│ | ├── ... .. | ||
├── scripts # 用于启动本地模型API的脚本。 | ||
├── examples # 不同应用程序的预构建示例。 | ||
├── docs # 教程和API参考文档。 | ||
├── tests # 单元测试模块,用于持续集成。 | ||
├── LICENSE # AgentScope使用的官方许可协议。 | ||
└── setup.py # 用于安装的设置脚本。 | ||
├── ... .. | ||
└── ... .. | ||
``` | ||
|
||
[[返回顶端]](#关于agentscope) |
Oops, something went wrong.