Files
agentUniverse/docs/guidebook/zh/How-to/画布式研发平台使用/画布式研发平台快速开始.md
2025-04-28 19:32:16 +08:00

88 lines
4.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 画布式研发平台进阶指南
在本部分我们将向您展示如何:
* 启动agentUniverse产品化服务
* 配置agentUniverse产品模块
* 快速上手产品化功能
* 在线调试和体验智能体,优化智能体效果
## 环境与应用工程准备
### 应用工程准备
我们将**产品化模块样例**放在了agentUniverse的sample_apps/difizen_app工程中你可以到 [这里](../../../../../examples/sample_apps/difizen_app) 查看。这部分可以在后台通过yaml配置当然通过产品页面可以自动创建和管理这些功能。
### 安装依赖
**通过pip安装**
```shell
pip install magent-ui ruamel.yaml
```
### 配置文件
如果您之前已经使用过aU的样例工程请在`config.toml`文件配置中加入下列信息增加产品化模块路径如sample_standard_app中配置的
```toml
# 上下文内容忽略
[CORE_PACKAGE]
# Scan and register product components for all paths under this list, with priority over the default.
product = ['sample_standard_app.platform.difizen.product']
# 上下文内容忽略
```
如果您是第一次使用aU直接使用最新样例工程的`config.toml`即可。
#### 私有配置文件
当然您使用智能体时用到的各类LLM模型密钥/Tool工具密钥等也需提前配置好否则无法串联智能体整体流程。该部分目前没有在产品页面提供配置管理请复用aU原本的密钥配置方式在后续版本中我们将直接在产品化中提供各个模型的密钥管理能力。
## 使用agentUniverse产品化平台
### 启动产品化服务
运行sample_standard_app/bootstrap下的[product_application](../../../../../examples/sample_apps/difizen_app/bootstrap/platform/product_application.py)文件,一键启动。
![img.png](../../../_picture/product_start.png)
启动成功后自动跳转产品化主页主页包含系统预制和您自定义的Agent/Tool/Knowledge产品模块。
![agentuniverse_product_homepage](../../../_picture/agentuniverse_product_homepage.png)
### 体验智能体
如上图所示点击peer多智能体组的右一聊天按钮即进入会话页面。
会话管理系统包含近10次智能体会话历史记录可以直接进行多轮对话体验peer多智能体组能力默认流式对话多智能体组包含运行中间思考过程
![agentuniverse_product_agent_chat](../../../_picture/agentuniverse_product_agent_chat.png)
### 调试智能体
在产品化主页,点击智能体的左一编辑按钮,即进入在线调试页面。
可以在线调试智能体的Prompt/Tool/Knowledge/LLM等点击保存按钮aU-product将配置自动保存到对应的yaml文件中。
![agentuniverse_product_agent_editor](../../../_picture/agentuniverse_product_agent_editor.png)
点击上图中右上角的调试按钮可查看智能体具体调用过程的Token消耗/调用链条/时延等Trace信息。
![agentuniverse_product_agent_trace](../../../_picture/agentuniverse_product_agent_trace.png)
## 配置agentUniverse产品模块
### 创建产品模块
```yaml
id: demo_rag_agent
nickname: rag智能体
type: AGENT
opening_speech: |
欢迎使用rag chatbot根据您的提问我将结合实时信息及我个人掌握的知识给您提供合理的解答。
你可以这样问我:
问题1: 巴黎奥运会中国获得了几块奖牌
问题2: 巴菲特为什么减持苹果股票
avatar: ../../../resources/rag_agent_logo.png
metadata:
class: AgentProduct
module: agentuniverse_product.base.agent_product
type: PRODUCT
```
如上yaml文件所示
- `product id`对应agent yaml中的`name`
- `type`对应`AGENT`
- `metadata`配置为上方所示value即可
- 其他参数按需配置tool/knowledge等模块同理
### 配置全局config
在全局config.toml中配置product模块对应的包扫描路径一键启动产品化平台即可展示对应的智能体/工具/知识等信息。
## 更多
agentUniverse-product产品化平台在持续迭代中后续会有更多便捷好用的功能供社区用户体验也欢迎大家提出宝贵建议。
本功能由 [difizen](https://github.com/difizen/magent) X agentUniverse联合推出。
让我们共同探索,共同进步!