Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion doc/docs/en/user-guide/agent-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,28 @@ Based on the selected collaborative agents and tools, you can now describe in si

1. In the editor under "Describe how should this agent work", enter a brief description, such as "You are a professional knowledge Q&A assistant with local knowledge search and online search capabilities, synthesizing information to answer user questions"
2. Select a model (choose a smarter model when generating prompts to optimize response logic), click the "Generate Agent" button, and Nexent will generate detailed agent content for you, including basic information and prompts (role, usage requirements, examples)
3. You can edit and fine-tune the auto-generated content (especially the prompts) in the Agent Detail Content below
3. You can edit and fine-tune the auto-generated content (including agent information and prompts) in the Agent Detail Content below

#### 📋 Agent Basic Information Configuration

In the basic information section, if you are not satisfied of the auto-generated content, you can configure the following fields by your own:

| Field | Description |
|-------|-------------|
| **Agent Name** | The display name shown in the interface and recognized by users. |
| **Agent Variable Name** | The internal identifier for the agent, used to reference it in code. Can only contain letters, numbers, and underscores, and must start with a letter or underscore. |
| **Author** | The creator of the agent. Defaults to the current logged-in user's email. |
| **User Group** | The user group the agent belongs to, used for permission management and organization. If empty, the agent has no assigned user group. |
| **Group Permission** | Controls how users in the same group can access this agent:<br>- **Editable**: Group members can view and edit the agent<br>- **Read-only**: Group members can only view, not edit<br>- **Private**: Only the creator and administrators can access |
| **Model** | The LLM used by the agent for reasoning and generating responses. |
| **Max Steps of Agent Run** | The maximum number of think-act cycles the agent can execute in a single conversation. More steps allow the agent to handle more complex tasks, but also consume more resources. |
| **Provide Run Summary** | Controls whether the agent provides run details to the main agent when used as a sub-agent:<br>- **Enabled (default)**: When used as a sub-agent, provides a detailed run summary to the main agent<br>- **Disabled**: When used as a sub-agent, only returns the final result without detailed run information |
| **Description** | A description of the agent's functionality, explaining its purpose and capabilities. |

> 💡 **Usage Suggestions**:
> - Use meaningful English names for the agent variable name, such as `code_assistant`, `data_analyst`, etc.
> - Set the max steps based on task complexity: 3-5 steps for simple Q&A, 10-20 steps for complex reasoning tasks
> - Keep "Provide Run Summary" enabled if the sub-agent's run process is valuable for the main agent's decision-making. Disable it if you only need the final result to reduce context consumption.

<div style="display: flex; justify-content: left;">
<img src="./assets/agent-development/generate-agent.png" style="width: 50%; height: auto;" />
Expand Down
4 changes: 2 additions & 2 deletions doc/docs/en/user-guide/agent-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Each agent appears as a card showing:

Click a card to open its details:

- **Basic info:** ID, name, description, and status.
- **Model configuration:** Model name, max tokens, business logic model, etc.
- **Basic info:** ID, name, description, status, max steps, and whether to provide run summary.
- **Model configuration:** Model name, business logic model, etc.
- **Prompts:** Role, constraints, examples, and the original description.
- **Tools:** Every tool the agent can use.
- **Sub-agents:** Any collaborative agents that are configured.
Expand Down
51 changes: 36 additions & 15 deletions doc/docs/zh/user-guide/agent-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 🔧 创建智能体

在 Agent 管理页签下,点击"创建 Agent"即可创建一个空白智能体,点击"退出创建"即可退出创建模式。
在智能体管理页签下,点击"创建 Agent"即可创建一个空白智能体,点击"退出创建"即可退出创建模式。
如果您有现成的智能体配置,也可以导入使用:

1. 点击"导入 Agent"
Expand All @@ -16,8 +16,8 @@
</div>

> ⚠️ **提示**:如果导入了重名的智能体,系统会弹出提示弹窗。您可以选择:
> - **直接导入**:保留重复名称,导入后的智能体会处于不可用状态,需手动修改 Agent 名称和变量名后才能使用
> - **重新生成并导入**:系统将调用 LLM 对 Agent 进行重命名,会消耗一定的模型 token 数,可能耗时较长
> - **直接导入**:保留重复名称,导入后的智能体会处于不可用状态,需手动修改智能体名称和变量名后才能使用
> - **重新生成并导入**:系统将调用 LLM 对智能体进行重命名,会消耗一定的模型 token 数,可能耗时较长

> 📌 **重要说明**:通过导入创建的智能体,如果其工具中包含 `knowledge_base_search` 等知识库检索工具,这些工具只会检索**当前登录用户在本环境中有权限访问的知识库**。导入文件中原有的知识库配置不会自动继承,因此实际检索结果和回答效果,可能与智能体原作者环境下的表现存在差异。

Expand All @@ -40,11 +40,11 @@
<img src="./assets/agent-development/set-collaboration.png" style="width: 50%; height: auto;" />
</div>

### 🛠️ 选择 Agent 的工具
### 🛠️ 选择智能体的工具

智能体可以使用各种工具来完成任务,如知识库检索、文件解析、图片解析、收发邮件、文件管理等本地工具,也可接入第三方 MCP 工具,或自定义工具。

1. 在"选择 Agent 的工具"页签右侧,点击"刷新工具"来刷新可用工具列表
1. 在"选择智能体的工具"页签右侧,点击"刷新工具"来刷新可用工具列表
2. 选择想要添加工具所在的分组
3. 查看分组下可选用的所有工具,可点击 ⚙️ 查看工具描述,进行工具参数配置
4. 点击工具名即可选中该工具,再次点击可取消选择
Expand All @@ -64,7 +64,7 @@

### 🔌 添加 MCP 工具

在"选择 Agent 的工具"页签右侧,点击"MCP 配置",可在弹窗中进行 MCP 服务器的配置,查看已配置的 MCP 服务器
在"选择智能体的工具"页签右侧,点击"MCP 配置",可在弹窗中进行 MCP 服务器的配置,查看已配置的 MCP 服务器

您可以通过以下两种方式在 Nexent 中添加 MCP 服务

Expand Down Expand Up @@ -110,15 +110,15 @@

### ⚙️ 自定义工具

您可参考以下指导文档,开发自己的工具,并接入 Nexent 使用,丰富 Agent 能力
您可参考以下指导文档,开发自己的工具,并接入 Nexent 使用,丰富智能体能力

- [LangChain 工具指南](../backend/tools/langchain)
- [MCP 工具开发](../backend/tools/mcp)
- [SDK 工具文档](../sdk/core/tools)

### 🧪 工具测试

无论是什么类型的工具(内置工具、外部接入的 MCP 工具,还是自定义开发工具),Nexent 都提供了"工具测试"能力。如果您在创建 Agent 时不确定某个工具的效果,可以使用测试功能来验证工具是否按预期工作。
无论是什么类型的工具(内置工具、外部接入的 MCP 工具,还是自定义开发工具),Nexent 都提供了"工具测试"能力。如果您在创建智能体时不确定某个工具的效果,可以使用测试功能来验证工具是否按预期工作。

1. 点击工具的小齿轮按钮 ⚙️,进入工具的详细配置弹窗
2. 首先确保已经配置了工具的必备参数(带红色星号的参数)
Expand All @@ -138,21 +138,42 @@

## 📝 描述业务逻辑

### ✍️ 描述 Agent 应该如何工作
### ✍️ 描述智能体应该如何工作

根据选择的协作 Agent 和工具,您现在可以用简洁的语言来描述,您希望这个 Agent 应该如何工作。Nexent 会根据您的配置和描述,自动为您生成 Agent 名称、描述以及提示词等信息
根据选择的协作智能体和工具,您现在可以用简洁的语言来描述,您希望这个智能体应该如何工作。Nexent 会根据您的描述,自动为您生成智能体配置以及提示词等信息

1. 在"描述 Agent 应该如何工作"下的编辑框中,输入简洁描述,如"你是一个专业的知识问答小助手,具备本地知识检索和联网检索能力,综合信息以回答用户问题"
2. 选择模型(生成提示词时选择更聪明的模型以优化回复逻辑),点击"生成智能体"按钮,Nexent 会为您生成 Agent 详细内容,包括基础信息以及提示词(角色、使用要求、示例)
3. 您可在下方 Agent 详细内容中,针对自动生成的内容(特别是提示词)进行编辑微调
1. 在"描述智能体应该如何工作"下的编辑框中,输入简洁描述,如"你是一个专业的知识问答小助手,具备本地知识检索和联网检索能力,综合信息以回答用户问题"
2. 选择模型(生成提示词时选择更聪明的模型以优化回复逻辑),点击"生成智能体"按钮,Nexent 会为您生成智能体详细内容,包括基础信息以及提示词(角色、使用要求、示例)
3. 您可在下方智能体详细内容中,针对自动生成的内容(包括基础信息和提示词)进行编辑微调

#### 📋 智能体基础信息配置

在基础信息区域,若您对自动生成的内容不满意,您可以手工修改以下各项:

| 配置项 | 说明 |
|--------|------|
| **智能体名称** | 智能体的展示名称,用于界面显示和用户识别。 |
| **智能体变量名** | 智能体的内部标识名称,用于代码中引用该智能体。只能包含字母、数字和下划线,且必须以字母或下划线开头。 |
| **作者** | 智能体的创建者名称,默认值为当前登录用户的邮箱。 |
| **用户组** | 智能体所属的用户组,用于权限管理和组织管理。若为空,则表示无所属用户组。 |
| **组内权限** | 控制同组用户对该智能体的访问权限:<br>- **同组可编辑**:同组用户可以查看和编辑该智能体<br>- **同组只读**:同组用户只能查看,不能编辑<br>- **私有**:只有创建者和管理员可以访问 |
| **大语言模型** | 智能体运行时使用的大语言模型,用于处理推理和生成回复。 |
| **智能体运行最大步骤数** | 智能体在单次对话中最多可以执行的思考-行动循环次数。步数越多,智能体可以处理更复杂的任务,但也会消耗更多资源。 |
| **提供运行摘要** | 控制智能体在被用作子智能体时,是否向主智能体提供运行细节:<br>- **开启(默认)**:当此智能体被用作子智能体时,会向主智能体提供详细的运行过程摘要<br>- **关闭**:当此智能体被用作子智能体时,只返回最终结果,不提供详细的运行过程 |
| **智能体描述** | 智能体的功能描述,用于说明智能体的用途和能力。 |

> 💡 **使用建议**:
> - 智能体变量名应使用有意义的英文命名,如 `code_assistant`、`data_analyst` 等
> - 智能体运行最大步骤数建议根据任务复杂度设置,简单的问答任务可设为 3-5 步,复杂的推理任务可设为 10-20 步
> - 如果子智能体的运行过程对主智能体的决策有参考价值,建议开启"提供运行摘要"选项。如果只需要子智能体的最终结果以减少上下文消耗,建议关闭此选项

<div style="display: flex; justify-content: left;">
<img src="./assets/agent-development/generate-agent.png" style="width: 50%; height: auto;" />
</div>

### 🐛 调试与保存

在完成初步 Agent 配置后,您可以对 Agent 进行调试,根据调试结果微调提示词,持续提升 Agent 表现
在完成初步智能体配置后,您可以对智能体进行调试,根据调试结果微调提示词,持续提升智能体表现

1. 在页面右下角点击"调试"按钮,弹出智能体调试页面
2. 与智能体进行测试对话,观察智能体的响应和行为
Expand Down Expand Up @@ -187,7 +208,7 @@ Nexent 支持智能体的版本管理,您可以在调试过程中,保存不

### 📤 导出

可将调试成功的智能体导出为 JSON 配置文件,在创建 Agent 时可以使用此 JSON 文件以导入的方式创建副本。
可将调试成功的智能体导出为 JSON 配置文件,在创建智能体时可以使用此 JSON 文件以导入的方式创建副本。


### 📋 复制
Expand Down
4 changes: 2 additions & 2 deletions doc/docs/zh/user-guide/agent-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

点击智能体卡片,即可查看智能体详细信息:

- **基础信息**:智能体ID、名称、描述、状态等
- **模型配置**:模型名称、最大部署、业务逻辑模型名称等
- **基础信息**:智能体ID、名称、描述、状态、最大步数、提供运行摘要等
- **模型配置**:模型名称、业务逻辑模型名称等
- **提示词**:包含角色提示词、约束提示词、示例提示词、以及原始业务描述
- **工具**:配置的工具
- **子智能体**:配置的子智能体
Expand Down
Loading