From 170cc3d7237cdaab0b2067629401457ea3854cdf Mon Sep 17 00:00:00 2001 From: houxu Date: Thu, 21 Aug 2025 10:09:48 +0800 Subject: [PATCH] update agent manager --- scripts/deploy/1-check-env/check_env.sh | 6 +++--- .../install_openEulerIntelligence.sh | 4 ++-- scripts/deploy/deploy.sh | 8 -------- ...\250\347\275\262\346\211\213\345\206\214.md" | 17 ++++++++--------- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/scripts/deploy/1-check-env/check_env.sh b/scripts/deploy/1-check-env/check_env.sh index 17cddb5..df90c3e 100644 --- a/scripts/deploy/1-check-env/check_env.sh +++ b/scripts/deploy/1-check-env/check_env.sh @@ -64,8 +64,8 @@ base_urls_arm=( # RAG专用URL列表(仅当RAG启用时检测) rag_urls=( - "https://gitee.com/fromhsc/pgvector.git" - "https://gitee.com/fromhsc/zhparser.git" + "https://bgithub.xyz/pgvector/pgvector.git" + "https://bgithub.xyz/amutu/zhparser.git" ) # 检测URL可达性的函数 @@ -384,7 +384,7 @@ function check_dns { } function check_ram { - local RAM_THRESHOLD=3000 + local RAM_THRESHOLD=1024 local current_mem=$(free -m | awk '/Mem/{print $2}') echo -e "${COLOR_INFO}[Info] 当前内存:$current_mem MB${COLOR_RESET}" diff --git a/scripts/deploy/2-install-dependency/install_openEulerIntelligence.sh b/scripts/deploy/2-install-dependency/install_openEulerIntelligence.sh index da65c13..9c54384 100644 --- a/scripts/deploy/2-install-dependency/install_openEulerIntelligence.sh +++ b/scripts/deploy/2-install-dependency/install_openEulerIntelligence.sh @@ -111,7 +111,7 @@ install_and_verify() { # 安装pgvector服务 install_pgvector() { local pgvector_dir="/opt/pgvector" - local zhparser_url="https://gitee.com/fromhsc/pgvector.git" + local zhparser_url="https://bgithub.xyz/pgvector/pgvector.git" local pgvector_installed_marker="/usr/share/pgsql/extension/vector.control" # pgvector安装后的标志文件 echo -e "${COLOR_INFO}[Info] 开始安装pgvector...${COLOR_RESET}" if [ -f "$pgvector_installed_marker" ]; then @@ -229,7 +229,7 @@ install_scws() { install_zhparser() { # 目标目录 local zhparser_dir="/opt/zhparser" - local zhparser_url="https://gitee.com/fromhsc/zhparser.git" + local zhparser_url="https://bgithub.xyz/amutu/zhparser.git" local zhparser_installed_marker="/usr/share/pgsql/extension/zhparser.control" # zhparser安装后的标志文件 echo -e "${COLOR_INFO}[Info] 开始安装zhparser...${COLOR_RESET}" # 检查是否已安装 diff --git a/scripts/deploy/deploy.sh b/scripts/deploy/deploy.sh index 799b2c2..c62a82e 100644 --- a/scripts/deploy/deploy.sh +++ b/scripts/deploy/deploy.sh @@ -305,14 +305,6 @@ agent_manager() { cd "$MAIN_DIR" || exit 1 fi - # 安装 MCP 服务 - ./3-install-server/install_mcpserver.sh - # 初始化 MCP 服务 - ./3-install-server/init_mcpserver.sh || { - echo -e "\n${COLOR_ERROR} 初始化 Agent 失败,请检查 MCP 服务是否可用,使用 Agent 初始化工具创建 Agent,详见部署文档...${COLOR_RESET}" - exit 1 - } - # 将所有接收的参数传递给 Python 脚本 python3 4-other-script/agent_manager.py "$@" return 0 diff --git "a/scripts/deploy/\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md" "b/scripts/deploy/\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md" index c20b795..26ffe2b 100644 --- "a/scripts/deploy/\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md" +++ "b/scripts/deploy/\345\256\211\350\243\205\351\203\250\347\275\262\346\211\213\345\206\214.md" @@ -42,7 +42,7 @@ openEuler Intelligence 是一款智能问答工具,使用 openEuler Intelligen - 建议通过调用 OpenAI 接口来实现功能。 ## 快速开始 #### 1. 获取轻量化部署客户端 -- dnf install openEuler-Intelligence-Installer +- dnf install openeuler-intelligence-installer #### 2. 修改基础配置文件 ~~~bash @@ -100,7 +100,7 @@ domain = '192.168.2.112' #修改ip为部署服务器ip #### 3. 执行一键部署 ~~~bash -[root@localhost 5-resource]# openEuler-Intelligence-Installer #启动后直接输入 0 开启一键部署 等待部署完成,视网络情况好坏,大概在10~40分钟 +[root@localhost 5-resource]# openeuler-intelligence-installer #启动后直接输入 0 开启一键部署 等待部署完成,视网络情况好坏,大概在10~40分钟 一键部署菜单 0) 自动部署 1) 手动部署 @@ -110,14 +110,13 @@ domain = '192.168.2.112' #修改ip为部署服务器ip 请输入选项编号(0-4): 说明:0 是默认轻量部署,只部署framework框架;1 手动部署支持选择轻量部署还是全量部署,全量部署包含web端和知识库rag。 - - +一键部署完openeuler-intelligence之后,轻量部署需要调用下面的初始化agent来构建agent服务。如果是全量部署,可以在web界面进行agent的构建。 ~~~ #### 4. 初始化mcp agent ~~~bash #创建mcp服务 -openEuler-Intelligence-Installer --a init config.json +openeuler-intelligence-installer --a init config.json #config.json 为copilot对应的mcp服务配置文件,参考如下,传入全路径 { "name": "systrace_mcp_server", @@ -137,7 +136,7 @@ openEuler-Intelligence-Installer --a init config.json } #说明:init 多次调用会删除之前注册的mcp 服务,重新注册 #创建一一对应的agent应用 -openEuler-Intelligence-Installer --a create config.json +openeuler-intelligence-installer --a create config.json #config.json 同上,是调用init之后,会在原始json里面添加serviceId字段标识mcp服务 { "name": "systrace_mcp_server", @@ -157,7 +156,7 @@ openEuler-Intelligence-Installer --a create config.json "serviceId":"p2qQke" } #创建多对一的agent应用 -openEuler-Intelligence-Installer --a comb config.json +openeuler-intelligence-installer --a comb config.json #config.json是组合多个mcp创建agent { "appType": "agent", #应用类型,不需要修改 @@ -184,7 +183,7 @@ openEuler-Intelligence-Installer --a comb config.json ~~~ ~~~ -[root@localhost deploy]# openEuler-Intelligence-Installer --a init /root/mcp_config/perf_mcp/config.json +[root@localhost deploy]# openeuler-intelligence-installer --a init /root/mcp_config/perf_mcp/config.json 2025-08-15 09:49:54,874 - mcp_manager - INFO - 成功加载配置文件: /root/mcp_config/perf_mcp/config.json 2025-08-15 09:49:54,874 - mcp_manager - INFO - 删除MCP服务: dJsLV4 2025-08-15 09:49:54,960 - mcp_manager - INFO - 已删除旧的MCP服务ID @@ -192,7 +191,7 @@ openEuler-Intelligence-Installer --a comb config.json 2025-08-15 09:49:55,060 - mcp_manager - INFO - MCP服务创建成功,service_id: XMZ7Pb 2025-08-15 09:49:55,061 - mcp_manager - INFO - 配置文件已更新: /root/mcp_config/perf_mcp/config.json 2025-08-15 09:49:55,061 - mcp_manager - INFO - 操作执行成功 -[root@localhost deploy]# openEuler-Intelligence-Installer --a create /root/mcp_config/perf_mcp/config.json +[root@localhost deploy]# openeuler-intelligence-installer --a create /root/mcp_config/perf_mcp/config.json 2025-08-15 09:50:03,819 - mcp_manager - INFO - 成功加载配置文件: /root/mcp_config/perf_mcp/config.json 2025-08-15 09:50:03,819 - mcp_manager - INFO - 安装MCP服务: XMZ7Pb 2025-08-15 09:50:04,052 - mcp_manager - INFO - 等待MCP服务就绪: XMZ7Pb -- Gitee