JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.
Python
docs: refresh configuration documentation and screenshots
cycong_1fcd8c3a1842b
diff --git a/docs/assets/images/config-model-test.png b/docs/assets/images/config-model-test.pngindex e8b92c6ae8..338ddd4c99 100644Binary files a/docs/assets/images/config-model-test.png and b/docs/assets/images/config-model-test.png differdiff --git a/docs/assets/images/config-vision-model-test-en.png b/docs/assets/images/config-vision-model-test-en.pngindex 0a0c9339db..1994adde84 100644Binary files a/docs/assets/images/config-vision-model-test-en.png and b/docs/assets/images/config-vision-model-test-en.png differdiff --git a/docs/assets/images/config-vision-model-test.png b/docs/assets/images/config-vision-model-test.pngindex 52cfb2d2d6..bcf7290783 100644Binary files a/docs/assets/images/config-vision-model-test.png and b/docs/assets/images/config-vision-model-test.png differdiff --git a/docs/assets/images/config.png b/docs/assets/images/config.pngindex 22aac3fbeb..82b73a5366 100644Binary files a/docs/assets/images/config.png and b/docs/assets/images/config.png differdiff --git a/docs/assets/images/config_audio_model_demo.png b/docs/assets/images/config_audio_model_demo.pngindex 5328f8f4c1..1d8b59dc28 100644Binary files a/docs/assets/images/config_audio_model_demo.png and b/docs/assets/images/config_audio_model_demo.png differdiff --git a/docs/assets/images/config_context_compress.png b/docs/assets/images/config_context_compress.pngindex 912e50bbda..246f791ece 100644Binary files a/docs/assets/images/config_context_compress.png and b/docs/assets/images/config_context_compress.png differdiff --git a/docs/assets/images/config_model_connect_test.png b/docs/assets/images/config_model_connect_test.pngindex 7a87b75536..1f0ed8ecc8 100644Binary files a/docs/assets/images/config_model_connect_test.png and b/docs/assets/images/config_model_connect_test.png differdiff --git a/docs/assets/images/config_video_model_demo.png b/docs/assets/images/config_video_model_demo.pngindex f3eb137d02..55e7ef3dde 100644Binary files a/docs/assets/images/config_video_model_demo.png and b/docs/assets/images/config_video_model_demo.png differdiff --git "a/docs/assets/images/\345\244\251\346\260\224.png" "b/docs/assets/images/\345\244\251\346\260\224.png"index d1e0fa1db3..aeaa4a08fc 100644Binary files "a/docs/assets/images/\345\244\251\346\260\224.png" and "b/docs/assets/images/\345\244\251\346\260\224.png" differdiff --git a/docs/en/Configuration.md b/docs/en/Configuration.mdindex 9e1fcccdd8..f58bc98c90 100644--- a/docs/en/Configuration.md+++ b/docs/en/Configuration.md@@ -21,6 +21,8 @@ The configuration panel contains the following main sections:- **Context Compression**: Dialogue history management (see [6. Context Compression](#6-context-compression))- **Tool Security Guardrails**: Tool invocation permission checks (see [7. Tool Security Guardrails](#7-tool-security-guardrails))+The panel also includes **Free Search Engine Configuration**, **Multi-Agent / Team Configuration**, **A2UI**, **Agentic Skill Retrieval**, **Memory Sensitive-Info Filtering**, and **Email Configuration** sections. Configure them as needed.+> 💡 **Tip**: Model configuration (`api_base`, `api_key`, `model`, `model_provider`) is required; all other configurations are optional.---@@ -41,7 +43,7 @@ JiuwenSwarm supports multiple model types to meet diverse scenario requirements:| **Vision Model** | Image understanding and analysis; supports image Q&A, OCR, captioning | Must support **image understanding** and process image input | ⭕ No || **Image Generation Model** | Generate images from text descriptions; supports AI painting, image creation | Must support **image generation** and create images from text | ⭕ No |-> 💡 **Tip**: The default model is essential for system operation and must be configured correctly. Video, audio, vision, and image generation models are optional; configure them only when multimodal capabilities are needed.+> 💡 **Tip**: The default model is essential for system operation and must be configured correctly. Video, audio, vision, and image generation models are optional; configure them only when multimodal capabilities are needed. The image generation model is not shown in the frontend configuration panel yet; configure it via the main config (`models.image_gen`) or environment variables (`IMAGE_GEN_API_BASE`, etc.).### 2.2 Configuration Fields@@ -52,7 +54,7 @@ Each model type supports the following parameters:| `api_base` | Base URL for model API | Use the provider's API endpoint; **do not include `/chat/completions`**; appended automatically || `api_key` | Model API key | Obtained from the model provider; keep confidential || `model` | Model identifier | Use exact model ID such as `gpt-4o`, `claude-3-opus`, `deepseek-chat` |-| `model_provider` | Model provider type | Supports `OpenAI`, `Azure`, `SiliconFlow`, etc., for API format adaptation |+| `model_provider` | Model provider type | Supports `OpenAI`, `DeepSeek`, `DashScope`, `SiliconFlow`, `InferenceAffinity`, `OpenRouter` for API format adaptation; video/audio/vision models currently support `OpenAI` only |> 💡 **Test Function**: The configuration panel provides a **Test button**. After filling in the model configuration, you can click "Test" to verify the API connection. The system will send a simple test request and display "Test Successful" if successful, or show error information otherwise.@@ -84,12 +86,13 @@ Each model entry contains the following fields:| `api_base` | Yes | API endpoint for this model || `api_key` | Yes | API key for this model || `model_provider` | Yes | Provider (e.g., `OpenAI`, `DeepSeek`) |+| `reasoning_level` | No | Reasoning intensity; optional `off` / `low` / `medium` / `high`; leave empty to unset || `temperature` | No | Sampling temperature, default `0.95` |**`alias` Rules**:- If empty, it automatically defaults to `model_name` when saved;- Must be globally unique across all configured models: cannot duplicate another model's `alias` or `model_name`;-- When switching models (Web dropdown / CLI `\model <name>`), you can use either `alias` or `model_name` as the identifier.+- When switching models (Web dropdown / CLI `/model <name>`), you can use either `alias` or `model_name` as the identifier.The first item in the list is the default model; you can drag to reorder or click "Set as Default" to change the default.@@ -101,13 +104,6 @@ Once video, audio, or vision models are configured, JiuwenSwarm enables correspoUsing **GLM-4.6V-Flash11** video understanding API as an example:-```-api_base: https://open.bigmodel.cn/api/paas/v4-api_key: your-zhipu-api-key-model: GLM-4.6V-Flash11-model_provider: ZhiPu-```-When you send a video file to JiuwenSwarm, the system will invoke the video model for analysis:```@@ -127,13 +123,6 @@ JiuwenSwarm: Based on video analysis, the main scenes are:Using **GLM-ASR-2512** audio model as an example:-```-api_base: https://open.bigmodel.cn/api/paas/v4-api_key: your-zhipu-api-key-model: glm-asr-2512-model_provider: ZhiPu-```-When you send an audio file, the system will invoke the audio model for speech recognition or analysis:```@@ -150,12 +139,7 @@ JiuwenSwarm: Transcription:Using **GLM-4.6V-Flash11** vision model as an example:-```-api_base: https://open.bigmodel.cn/api/paas/v4-api_key: your-zhipu-api-key-model: GLM-4.6V-Flash11-model_provider: ZhiPu-```+When you send an image and ask a question, the system will invoke the vision model for image understanding:```User: Extract data from the table in this image.@@ -170,26 +154,6 @@ Showing an upward trend...-#### Image Generation Model--Using **GLM-4.6V-Flash11** image generation model as an example:--```-api_base: https://open.bigmodel.cn/api/paas/v4-api_key: your-zhipu-api-key-model: GLM-4.6V-Flash11-model_provider: ZhiPu-```--When you request image generation, the system will invoke the image generation model:--```-User: Generate an image of a beach at sunset.--JiuwenSwarm: [Generated image]-Generated an image of a beach at sunset, golden sunlight sparkling on the shimmering sea...-```----## 3. Embedding Configuration@@ -226,7 +190,7 @@ embed_model: BAAI/bge-large-zh-v1.5## 4. Third-Party Service Configuration-This section mirrors **§1.4** and **§1.5** for readers who jump here first. All items below appear on the **Configuration** page (all optional).+This section summarizes configuration for search and external services. All items below appear on the **Configuration** page (all optional).| Field | Description | Reference || --- | --- | --- |@@ -235,10 +199,15 @@ This section mirrors **§1.4** and **§1.5** for readers who jump here first. Al| `serper_api_key` | Serper | [Serper](https://serper.dev/) || `perplexity_api_key` | Perplexity | [Perplexity](https://www.perplexity.ai/) || `github_token` | GitHub; SkillNet, etc. | [GitHub tokens](https://github.com/settings/tokens) |-| `teamskills_hub_token` | TeamSkillsHub user token | [TeamSkillsHub](https://teamskills.openjiuwen.com) |+| `teamskills_user_token` | TeamSkillsHub user token | [TeamSkillsHub](https://teamskills.openjiuwen.com) |> ⚠️ **Note**: All optional. If unset, related features may be unavailable or fall back; exact behavior depends on your product version.+Two additional related configuration groups:++- **Free Search Engine Configuration**: `free_search_ddg_enabled` (DuckDuckGo) and `free_search_bing_enabled` (Bing) toggles control whether free search engines are enabled.+- **Other TeamSkillsHub settings**: `teamskills_market_url` (marketplace URL), `teamskills_system_token` (system token), and `teamskills_allowed_download_hosts` (allowed download hosts), configured as needed.+---## 5. Self-Evolution Configuration@@ -251,8 +220,8 @@ Self-evolution controls the automatic improvement of JiuwenSwarm's Skills.The frontend shows two options under **Self-Evolution Configuration**:-- **Auto-detect evolution signals**: disabled by default. When enabled, the system scans failures, corrections, and other evolution signals after chat and tool execution. This maps to `evolution.auto_scan`; env `EVOLUTION_AUTO_SCAN` takes precedence.-- **Auto-suggest new skill creation**: disabled by default. When enabled, the system can propose creating a new Skill when no suitable Skill exists. This maps to `evolution.skill_create`; env `SKILL_CREATE` takes precedence.+- **Auto-detect evolution signals**: disabled by default. When enabled, the system scans failures, corrections, and other evolution signals after chat and tool execution. This maps to `react.evolution.auto_scan`; env `EVOLUTION_AUTO_SCAN` takes precedence.+- **Auto-suggest new skill creation**: disabled by default. When enabled, the system can propose creating a new Skill when no suitable Skill exists. This maps to `react.evolution.skill_create`; env `SKILL_CREATE` takes precedence.> 📖 For details on the self-evolution mechanism, see [Skill self-evolution](SkillSelfEvolution.md).@@ -266,10 +235,12 @@ Context compression manages dialogue history retention strategies.### Toggle-- **Field**: `context_engine.enabled`+- **Field**: `react.context_engine_config.enabled`- **Default**: `true` (enabled)- **Purpose**: Automatically compress and offload dialogue history when exceeding context window limits to maintain fluent interaction.+This section also provides a **Compute Affinity (KV Release)** toggle (`react.context_engine_config.enable_kv_cache_release`, default `false`).+When enabled, the system will:1. Monitor message count and token usage@@ -303,14 +274,23 @@ When enabled, the system will:```yamlpermissions:enabled: true+ schema: tiered_policy+ permission_mode: normal # normal | strict; maps severity to actiondefaults:"*": "allow" # Allow all actions by defaulttools:- mcp_exec_command:- "*": "ask" # Require confirmation for command execution- patterns:- - pattern: "rm -rf"- action: "deny" # Reject dangerous commands+ bash: ask # Require confirmation for command execution+ mcp_exec_command: ask+ write_file: ask+ rules:+ - id: shell_allow_ls+ tools: [bash, mcp_exec_command, create_terminal]+ pattern: "ls *"+ severity: LOW # normal mode: LOW/MEDIUM → allow+ - id: shell_ask_rm+ tools: [bash, mcp_exec_command, create_terminal]+ pattern: "rm *"+ severity: HIGH # normal mode: HIGH/CRITICAL → ask```---@@ -330,8 +310,8 @@ These are **conceptual** paths in the main configuration for cross-reference wit| `models.*.model_client_config.verify_ssl` | Verify SSL | `false` || `models.*.model_config_obj.temperature` | Temperature | `0.95` || `heartbeat.every` | Heartbeat interval (seconds) | `3600` |-| `context_engine.max_messages` | Message count threshold | `100` |-| `context_engine.max_tokens` | Token threshold | `100000` |+| `react.context_engine_config.dialogue_compressor_config.tokens_threshold` | Dialogue compression token threshold | `100000` |+| `react.context_engine_config.round_level_compressor_config.tokens_threshold` | Round-level compression token threshold | `230000` |<a id="dotenv-configuration"></a>@@ -351,7 +331,7 @@ Generally, from highest to lowest: **values you save in the web Configuration UI### Q: Configurations not taking effect after saving?-A: The backend restarts automatically after saving. Please wait a few moments and retry. If issues persist, verify configuration format correctness.+A: The system hot-reloads configuration after saving (and only schedules a process restart when necessary). Please wait a few moments and retry. If issues persist, verify configuration format correctness.### Q: How to view the currently active model?diff --git "a/docs/zh/\351\205\215\347\275\256\344\277\241\346\201\257.md" "b/docs/zh/\351\205\215\347\275\256\344\277\241\346\201\257.md"index 72f96ce29d..1d3e7239ec 100644--- "a/docs/zh/\351\205\215\347\275\256\344\277\241\346\201\257.md"+++ "b/docs/zh/\351\205\215\347\275\256\344\277\241\346\201\257.md"@@ -21,6 +21,8 @@ JiuwenSwarm 的配置信息是您与智能体交互的基础设置。通过合- **上下文压缩**:对话历史管理策略(详见 [六、上下文压缩](#六上下文压缩))- **工具安全护栏**:工具调用权限检查(详见 [七、工具安全护栏](#七工具安全护栏))+此外,面板中还包含 **免费搜索引擎配置**、**多Agent/Team 配置**、**A2UI**、**Agentic 技能检索**、**记忆系统敏感信息过滤**、**邮箱配置** 等区域,按需配置即可。+> 💡 **提示**:模型配置(`api_base`、`api_key`、`model`、`model_provider`)为必填项,其他配置均为可选。---@@ -41,7 +43,7 @@ JiuwenSwarm 支持配置多种类型的模型,以满足不同场景的需求| **视觉模型** | 图像理解与分析,支持图像问答、OCR、场景描述等 | 需具备**图像理解**能力,能处理图片输入 | ⭕ 可选 || **图片生成模型** | 根据文本描述生成图片,支持AI绘画、图像创作等 | 需具备**图像生成**能力,能根据文本生成图片 | ⭕ 可选 |-> 💡 **提示**:默认模型是系统运行的基础,必须正确配置。视频、音频、视觉、图片生成模型为可选配置,当您需要相应多模态能力时再配置即可。+> 💡 **提示**:默认模型是系统运行的基础,必须正确配置。视频、音频、视觉、图片生成模型为可选配置,当您需要相应多模态能力时再配置即可。其中图片生成模型暂不在前端配置面板中展示,需通过主配置(`models.image_gen`)或环境变量(`IMAGE_GEN_API_BASE` 等)配置。### 2.2 配置项说明@@ -52,7 +54,7 @@ JiuwenSwarm 支持配置多种类型的模型,以满足不同场景的需求| `api_base` | 模型 API 基础地址 | 填写服务商提供的 API 地址,**无需包含 `/chat/completions` 后缀**,系统会自动补齐 || `api_key` | 模型 API 密钥 | 从模型服务商官网获取,注意保密 || `model` | 模型名称 | 填写具体的模型 ID,如 `gpt-4o`、`claude-3-opus`、`deepseek-chat` 等 |-| `model_provider` | 模型提供商类型 | 支持 `OpenAI`、`Azure`、`SiliconFlow` 等,用于适配不同服务商的 API 格式 |+| `model_provider` | 模型提供商类型 | 支持 `OpenAI`、`DeepSeek`、`DashScope`、`SiliconFlow`、`InferenceAffinity`、`OpenRouter`,用于适配不同服务商的 API 格式;视频/音频/视觉模型当前仅支持 `OpenAI` |> 💡 **测试功能**:配置面板提供了**测试按钮**,填写完模型配置后,可以点击"测试"按钮验证 API 连接是否正常。系统会发送一个简单的测试请求,如果成功会显示"测试成功",否则会提示错误信息。@@ -71,7 +73,7 @@ model_provider: OpenAI> 💡 **提示**:大多数模型服务商都提供 OpenAI 兼容的 API,您可以根据实际使用的服务商调整 `api_base` 和 `model` 参数。-### 2.4 多模型管理与别名+### 2.3 多模型管理与别名配置面板的**模型列表**区块支持同时维护多个模型,方便在不同模型间快速切换。@@ -84,16 +86,17 @@ model_provider: OpenAI| `api_base` | 必填 | 该模型的 API 地址 || `api_key` | 必填 | 该模型的 API 密钥 || `model_provider` | 必填 | 提供商(如 `OpenAI`、`DeepSeek`) |+| `reasoning_level` | 选填 | 推理强度,可选 `off` / `low` / `medium` / `high`,留空表示不设置 || `temperature` | 选填 | 采样温度,默认 `0.95` |**`alias` 规则**:- 留空时存储时自动赋值为 `model_name`;- 在所有已配置模型中必须全局唯一:不能与其他模型的 `alias` 或 `model_name` 相同;-- 切换模型时(Web 下拉 / CLI `\model <name>`)可用 `alias` 或 `model_name` 作为标识符。+- 切换模型时(Web 下拉 / CLI `/model <name>`)可用 `alias` 或 `model_name` 作为标识符。列表首位为默认使用的模型;可在 UI 中拖拽排序或点击"设为默认"调整首位。-### 2.3 多模态模型效果展示+### 2.4 多模态模型效果展示当您配置了视频、音频或视觉模型后,JiuwenSwarm 将自动启用相应的多模态能力。以下是各模型的应用场景示例:@@ -180,7 +183,7 @@ Embed 模型的主要作用:## 四、第三方服务配置-本节与 **「一、1.4」「一、1.5」** 对应,便于单独查阅「搜索与外部服务」相关能力。以下配置项均在 **配置信息** 面板中展示(均为可选)。+本节汇总「搜索与外部服务」相关能力的配置。以下配置项均在 **配置信息** 面板中展示(均为可选)。| 配置项 | 说明 | 参考 || --- | --- | --- |@@ -189,10 +192,15 @@ Embed 模型的主要作用:| `serper_api_key` | Serper 搜索 | [Serper](https://serper.dev/) || `perplexity_api_key` | Perplexity | [Perplexity](https://www.perplexity.ai/) || `github_token` | GitHub;SkillNet 等 | [GitHub Tokens](https://github.com/settings/tokens) |-| `teamskills_hub_token` | TeamSkillsHub 用户 Token | [TeamSkillsHub](https://teamskills.openjiuwen.com) |+| `teamskills_user_token` | TeamSkillsHub 用户 Token | [TeamSkillsHub](https://teamskills.openjiuwen.com) |> ⚠️ **注意**:均为可选。不填写时,对应能力可能不可用或走降级策略,以实际产品行为为准。+此外还有两类相关配置:++- **免费搜索引擎配置**:`free_search_ddg_enabled`(DuckDuckGo)、`free_search_bing_enabled`(Bing)两个开关,控制免费搜索引擎的启用。+- **TeamSkillsHub 其他配置**:`teamskills_market_url`(市场地址)、`teamskills_system_token`(系统 Token)、`teamskills_allowed_download_hosts`(允许下载的主机列表),按需配置。+---## 五、自演进配置@@ -205,8 +213,8 @@ Embed 模型的主要作用:前端在 **自演进配置** 中展示两个开关:-- **自动检测可演进信号**:默认关闭。开启后,系统会在对话和工具执行后自动扫描失败、纠错等演进信号。对应配置 `evolution.auto_scan`,环境变量 `EVOLUTION_AUTO_SCAN` 优先。-- **自动建议创建新技能**:默认关闭。开启后,系统可以在缺少合适 Skill 时提出自动创建建议。对应配置 `evolution.skill_create`,环境变量 `SKILL_CREATE` 优先。+- **自动检测可演进信号**:默认关闭。开启后,系统会在对话和工具执行后自动扫描失败、纠错等演进信号。对应配置 `react.evolution.auto_scan`,环境变量 `EVOLUTION_AUTO_SCAN` 优先。+- **自动建议创建新技能**:默认关闭。开启后,系统可以在缺少合适 Skill 时提出自动创建建议。对应配置 `react.evolution.skill_create`,环境变量 `SKILL_CREATE` 优先。> 📖 **详情**:关于自演进机制的详细说明,请参考 [Skill 自演进](Skill自演进.md) 文档。@@ -220,10 +228,12 @@ Embed 模型的主要作用:### 开关说明-- **配置项**:`context_engine.enabled`+- **配置项**:`react.context_engine_config.enabled`- **默认值**:`true`(开启)- **作用**:启用后,当对话内容超出上下文窗口限制时,系统会自动压缩和卸载部分内容,保持对话流畅+该区域还提供 **算力亲和(KV 释放)** 开关(配置项 `react.context_engine_config.enable_kv_cache_release`,默认 `false`)。+当开启上下文压缩后,系统会:1. 监控对话消息数量和 Token 数量@@ -257,14 +267,23 @@ Embed 模型的主要作用:```yamlpermissions:enabled: true+ schema: tiered_policy+ permission_mode: normal # normal | strict,决定 severity 到动作的映射defaults:"*": "allow" # 默认允许所有操作tools:- mcp_exec_command:- "*": "ask" # 命令执行默认需确认- patterns:- - pattern: "rm -rf"- action: "deny" # 危险命令直接拒绝+ bash: ask # 命令执行默认需确认+ mcp_exec_command: ask+ write_file: ask+ rules:+ - id: shell_allow_ls+ tools: [bash, mcp_exec_command, create_terminal]+ pattern: "ls *"+ severity: LOW # normal 模式下 LOW/MEDIUM → allow+ - id: shell_ask_rm+ tools: [bash, mcp_exec_command, create_terminal]+ pattern: "rm *"+ severity: HIGH # normal 模式下 HIGH/CRITICAL → ask```---@@ -284,8 +303,8 @@ permissions:| `models.*.model_client_config.verify_ssl` | 是否校验 SSL | `false` || `models.*.model_config_obj.temperature` | 温度 | `0.95` || `heartbeat.every` | 心跳间隔(秒) | `3600` |-| `context_engine.max_messages` | 上下文消息数阈值 | `100` |-| `context_engine.max_tokens` | 上下文 Token 阈值 | `100000` |+| `react.context_engine_config.dialogue_compressor_config.tokens_threshold` | 历史对话压缩 Token 阈值 | `100000` |+| `react.context_engine_config.round_level_compressor_config.tokens_threshold` | 轮次级压缩 Token 阈值 | `230000` |<a id="dotenv-configuration"></a>@@ -305,7 +324,7 @@ permissions:### Q: 配置保存后没有生效?-A: 配置保存后系统会自动重启后端服务,请等待几秒钟后再试。如果仍未生效,请检查配置格式是否正确。+A: 配置保存后系统会自动热更新(必要时才会安排进程重启),请等待几秒钟后再试。如果仍未生效,请检查配置格式是否正确。### Q: 如何查看当前使用的模型?