Loading...
正在加载...
请稍候

智谱 AutoGLM 深度研究:架构解读与电商平台 Agent 结合方案

✨步子哥 (steper) 2026年06月30日 13:21

调研截止:2026 年 6 月 30 日
调研方法:智谱官网、GitHub 源码、arXiv 论文、智源社区、媒体实测报道
业务示例声明:本报告以"中大型综合电商平台"为示例画像(假设已有推荐/搜索/客服/内容/供应链/营销六大能力),非特指某家公司。读者可按自身业务对照替换。


摘要

智谱 AutoGLM 不是一款产品,而是一个持续演进的 Agent 产品族——从 2024 年 4 月的 AutoWebGLM 论文起步,到 2025 年 12 月开源 Open-AutoGLM,二十个月内经历五次重大发布,覆盖 Web 浏览器、手机、PC、云手机、深度研究五大场景。

对电商平台技术团队而言,本研究核心结论可浓缩为三句:

  1. AutoGLM 不是电商平台的"全盘替代方案",而是"分层补强的工具箱"。电商平台已有的推荐、搜索、客服、内容、供应链、营销六大能力,没一项该被 AutoGLM 直接换掉;但 AutoGLM 沉思(用户俗称"Theta")可补"深度研究型任务"空白(选品研究、竞品分析、营销策划),AutoGLM-Web 可做"竞品价格与长尾信息抓取兜底",GLM-4-Long 可撑长文本理解(评价聚合、合同抽取)。
  2. 架构选型应为 D 混合模式——AutoGLM 沉思走「深度集成 + 适配层」(保留可替换),AutoGLM-Web / GLM-4-Long 走「MCP 工具化解耦」。这样既填补 Agent 框架缺口,又不全盘绑定智谱。
  3. P0 优先级有四个结合点,3 个月内可验证:竞品价格监控、选品研究编排、评价聚合分析、长文档抽取。这四点价值高、难度中低,可作为 Agent 化转型的首批实证。

本文分六部:第一部扫 AutoGLM 全景;第二部深挖开源源码;第三部析电商结合点;第四部给工程蓝图(含 5 个工具骨架、5 个 Prompt 模板、3 个 SKILL 雏形);第五部陈风险与替代;第六部列落地路线图。


第一部 · AutoGLM 全景扫描

1.1 AutoGLM 是什么——一个 Agent 产品族

智谱官方从未把 AutoGLM 定义为"一款产品"。它更像一条演进中的 Agent 产品线,从浏览器研究原型起步,一路长成覆盖多端设备的 Agent 矩阵。这事得先讲清——把它当单一产品评估,非出错不可。

何以见得?看演进时间线:

时间 事件 性质
2023.12 CogAgent-18B 开源(CVPR 2024 Highlight) GUI 视觉理解基座,AutoGLM 之前传
2024.04 AutoWebGLM 论文发布(KDD 2024) 浏览器导航 Agent 学术研究,基于 ChatGLM3-6B
2024.10.25 AutoGLM 产品发布 全球首个手机+浏览器设备操控智能体(商用
2024.10.28 AutoGLM 论文 arXiv:2411.00820 Web + Phone 双场景 Foundation Agent 学术发表
2024.11.29 Agent OpenDay 升级 跨 APP 执行、GLM-PC 内测
2025.04.01 中关村论坛发布 AutoGLM 沉思 Deep Research + Operator 一体化
2025.04.14 开源 6 款模型 GLM-4-Air-0414 / GLM-Z1-Air / GLM-Z1-Rumination 等
2025.04.23 GLM-4-Plus 价格直降 90% 50 元 → 5 元/百万 tokens
2025.08.20 AutoGLM 2.0 发布 全球首个云手机 Agent,GLM-4.5 驱动
2025.12.08 Open-AutoGLM 开源 Phone Agent 框架 + AutoGLM-Phone-9B 模型

来源:arXiv:2411.00820arXiv:2404.03648智源社区36氪GitHub zai-org/Open-AutoGLM

二十个月,五次大改版,每次都换底层模型(ChatGLM3-6B → GLM-4 → GLM-Z1 → GLM-4.5 → AutoGLM-Phone-9B),每次都换产品形态(论文 → 商用 App → 沉思桌面端 → 云手机 → 开源框架)。这不是一个"产品",是一条"产品线"。

1.2 命名澄清:用户俗称 vs 官方正式名

读者若听过"AutoGLM-Theta"与"AutoGLM-Text",经全面检索智谱官网、GitHub、arXiv、智源社区,这两个名称在官方资料中均不存在。推测对应关系如下:

用户俗称 官方实际产品 推测依据
AutoGLM-Theta AutoGLM 沉思(AutoGLM Rumination) "Theta"希腊字母常与"深度思考"关联;官方"沉思"版正是深度推理 Agent,技术栈含 GLM-Z1-Rumination,"沉思"语义与"Theta"暗合
AutoGLM-Text AutoGLM 报告助手(autoglm.zhipuai.cn 主产品)+ GLM-4-Long 长文本模型 官方 AutoGLM 现定位"超级报告助手",核心能力是长文本理解、信息抽取、文档生成;底层 GLM-4-Long 支持 1M 上下文,承担"文本处理"角色

下文统一以官方实际产品名展开,并在对应处标注俗称以保持对应。

1.3 子产品能力矩阵

子产品 发布 定位 核心能力 底层模型 接入方式 定价 状态
AutoWebGLM(早期研究版) 2024.04 浏览器导航研究 HTML 简化、网页导航、表单填写 ChatGLM3-6B 开源(THUDM/AutoWebGLM) 免费 已停更,被 AutoGLM-Web 取代
AutoGLM-Web 2024.10 浏览器自动化 Agent 网页操作、电商下单、订票、信息提取 GLM-4 系列 + 视觉 智谱清言内置、API C 端免费 已商用,集成于 AutoGLM 沉思
AutoGLM-Phone 1.0 2024.10 手机操控 Agent 50+ APP 自动操作 GLM-4 + 视觉 智谱清言 App(安卓) C 端免费 被 AutoGLM 2.0 取代
AutoGLM 沉思(俗称 Theta) 2025.04 深度研究 + 操作执行 Agent 多步推理、联网搜索、自动研究报告、浏览器/应用操控 GLM-Z1-Rumination(32B) 智谱清言 PC/Web/App、桌面端 免费、不限量(preview) 已上线,持续迭代
GLM-PC(CogAgent 商用版) 2024.11 内测,2025.02 v1.1 PC 操控 Agent 文档处理、网页搜索总结、远程定时操作 CogAgent-9B GLM-PC 客户端(Mac/Win) 免费 已商用
AutoGLM 2.0 2025.08 云手机 + 云电脑 Agent 云端虚拟设备 7×24 运行、跨设备跨场景 GLM-4.5 + GLM-4.5V AutoGLM App / Web 免费 已上线
Open-AutoGLM 2025.12 开源手机 Agent 框架 多模态屏幕理解、ADB/HDC/WebDriverAgent 操控 AutoGLM-Phone-9B(9B,开源) GitHub 开源 + 智谱 BigModel API 开源免费 / API 按量 开源活跃
AutoGLM 报告助手(俗称 Text) 2025 持续演进 超级报告助手 深度搜索、专业网站抓取、结构化报告、PPT/网页生成、视频总结、代码执行 GLM-4-Plus / GLM-4-Long autoglm.zhipuai.cn C 端免费 已上线

来源:autoglm.zhipuai.cn智源社区GitHub zai-org/Open-AutoGLM

1.4 底层 GLM-4 模型族(电商团队关心的核心)

AutoGLM 系列底层依托 GLM-4 模型族。电商平台若选型,主要关心以下文本模型:

模型 定位 上下文 最大输出 价格(元/百万 tokens) 适用场景
GLM-4-Plus 高性能 128K 4K 5(2025.04 直降 90%) 高质量文案生成、关键决策
GLM-4-Air-250414 高性价比(32B 基座) 128K 16K 0.5 大规模评价理解主选
GLM-4-AirX 极速推理 8K 4K 10 实时客服低延迟
GLM-4-FlashX-250414 高速低价 128K 16K 0.1 大规模预筛选
GLM-4-Flash-250414 免费版 128K 16K 免费 实时问答兜底
GLM-4-Long 长文本 1M(约 150-200 万字) 未公开 待核实 评价聚合、合同抽取、长文档理解
GLM-Z1-Air 推理增强 - - 较 R1 降至 1/30 选品研究、营销策划,开源 32B
GLM-Z1-Rumination 沉思模型 - - - AutoGLM 沉思核心,开源

来源:GLM-4 官方文档GLM-4-Long 文档智源社区开源报道

电商定价优势速算:GLM-4-Flash 免费 + GLM-4-Air 0.5 元/百万 tokens + GLM-4-Plus 5 元/百万 tokens,三档分层。日处理 1 亿 tokens(约 7000 万字)的评价理解任务,主力走 Air 仅需 50 元/日,免费 Flash 兜底预筛,关键内容走 Plus——月成本可控制在 2000 元以内。这是自建 GPU 集群难以匹敌的。

1.5 与竞品横向对比

维度 AutoGLM 系列 阿里 AgentScope 微软 AutoGen / Magentic-One LangChain / LangGraph 扣子(字节) OpenAI Operator
类型 商用 Agent + 部分开源 开源框架 开源框架 开源框架 商用平台 商用 Agent
底层模型 GLM 自研 通义千问 多模型 多模型 云雀+多模型 GPT-4o+CUA
Web Agent ✅ AutoGLM-Web ✅ Magentic-One ✅ Browser Use
Phone Agent ✅ AutoGLM-Phone 9B 开源
PC Agent ✅ GLM-PC
Deep Research ✅ AutoGLM 沉思
中文优化 ✅ 原生 ✅ 原生 ✅ 原生
MCP 支持 部分 部分
开源程度 部分(Open-AutoGLM) 完全开源 完全开源 完全开源 闭源 闭源
定价 C 端免费 + API 按量 开源免费 开源免费 开源免费 免费层+付费 Pro $200/月

何时选 AutoGLM:中文场景为主;需要 Web+Phone+PC 全场景;需要深度研究+操作执行一体化;成本敏感;数据合规要求国内模型。

何时选竞品:纯多 Agent 协作研究选 AgentScope;英文场景+复杂多 Agent 协作选 AutoGen/Magentic-One;最大灵活性+多模型混用选 LangGraph;非技术团队零代码搭建选扣子;英文场景+预算充足选 Operator。

来源:智能体框架对比GLM-PC vs Operator


第二部 · 开源源码深挖——Open-AutoGLM

2.1 仓库盘点与定位

真正开源的 AutoGLM 项目只有两个:

仓库 Star 状态 用途
zai-org/Open-AutoGLM 25,631 活跃(2026.03 仍迭代) 手机 Agent 框架 + AutoGLM-Phone-9B 模型,Apache-2.0
THUDM/AutoWebGLM 929 已停更 早期浏览器研究,仅评测代码无 Agent 主循环

关键发现:用户俗称的"AutoGLM-Theta"(沉思)和"AutoGLM-Text"(报告助手)都没开源——多轮搜索确认无独立 GitHub 仓库,只以商业 SaaS(autoglm.zhipuai.cn)和 BigModel API 形式提供。开源的,只有手机端。

这对电商选型影响不小:电商平台没法自部署 AutoGLM 沉思,只能走 API 调用,或本地部署开源的 GLM-Z1-Air(沉思基座,32B)近似实现;电商平台也没法自部署 AutoGLM-Web,只能调智谱清言客户端,或基于 GLM-4 + 浏览器框架自建。

2.2 目录结构与核心模块

Open-AutoGLM 仓库根目录:

Open-AutoGLM/
├── .github/
├── docs/
│   └── ios_setup/           # iOS 配置文档
├── examples/                # 示例脚本
├── ios.py                   # iOS 入口
├── main.py                  # 主入口(Android/HarmonyOS)
├── requirements.txt
├── LICENSE
├── README.md
├── README_en.md
└── README_coding_agent.md

核心包 phone_agent/ 内部结构:

phone_agent/
├── __init__.py              # 包导出
├── agent.py                 # PhoneAgent 主类(Agent 主循环)
├── adb/                     # ADB 工具(Android)
│   ├── connection.py        # 远程/本地连接管理
│   ├── screenshot.py        # 屏幕截图
│   ├── input.py             # 文本输入(ADB Keyboard)
│   └── device.py            # 设备控制(点击、滑动等)
├── hdc/                     # HDC 工具(HarmonyOS,与 adb 同构)
├── actions/
│   └── handler.py           # 操作执行器(14 种动作分发)
├── config/
│   ├── apps.py              # 支持的应用映射
│   ├── prompts_zh.py        # 中文系统提示词
│   └── prompts_en.py        # 英文系统提示词
└── model/
    └── client.py            # OpenAI 兼容客户端

来源:GitHub zai-org/Open-AutoGLM README

2.3 Agent 核心架构——ReAct 单 Agent 循环

基于源码结构推断(agent.py / actions/handler.py / model/client.py 三件套),Open-AutoGLM 是典型的 ReAct 单 Agent 循环

用户指令(自然语言)
    ↓
PhoneAgent.run()
    ↓
[循环开始]
    ↓
截屏 → 视觉模型理解界面 → 输出 thinking + do(action=...)
    ↓
ActionHandler 分发到 14 种动作
    ↓
DeviceFactory(ADB / HDC / WebDriverAgent)执行
    ↓
[循环结束,直到任务完成或 max_steps]

14 种动作原语(来自 config/prompts_zh.py):Launch(启动)、Tap(点击)、Type(输入)、Swipe(滑动)、Back(返回)、Home(回桌面)、Long Press(长按)、Double Tap(双击)、Wait(等待)、Take_over(人工接管)、Call_API(调用外部 API)、Finish(完成)、Scroll(滚动)、Stop(停止)。

底层模型:AutoGLM-Phone-9B(基于 GLM-4.1V-9B-Thinking 微调,9B 参数,消费级显卡可跑)。注意:官方仅验证 AutoGLM-Phone 系列模型,使用 GLM-4-Plus / GLM-Z1 等非 Phone 优化模型可能无法正确输出 do(action=...) 格式动作。

记忆设计很轻:每步截图用完即删,无长期记忆、无向量库、无多 Agent 协作、无 MCP/A2A 原生接口。扩展靠三个留白点:confirmation_callback / takeover_callback / Call_API

2.4 关键代码示例(原样来自官方 README)

2.4.1 Agent 主入口

from phone_agent import PhoneAgent
from phone_agent.model import ModelConfig

# 配置模型
model_config = ModelConfig(
    base_url="http://localhost:8000/v1",
    model_name="autoglm-phone-9b",
)

# 创建 Agent
agent = PhoneAgent(model_config=model_config)

# 执行任务
result = agent.run("打开淘宝搜索无线耳机")
print(result)

2.4.2 完整配置

from phone_agent.model import ModelConfig
from phone_agent.agent import AgentConfig

model_config = ModelConfig(
    base_url="http://localhost:8000/v1",
    api_key="EMPTY",
    model_name="autoglm-phone-9b",
    max_tokens=3000,
    temperature=0.1,
    frequency_penalty=0.2,
)

agent_config = AgentConfig(
    max_steps=100,        # 每个任务最大步数
    device_id=None,       # ADB 设备 ID(None 自动检测)
    lang="cn",            # cn 或 en
    verbose=True,         # 打印思考过程和执行动作
)

2.5 三个扩展点

2.5.1 confirmation_callback(敏感操作确认)

def my_confirmation(message: str) -> bool:
    """敏感操作确认回调"""
    return input(f"确认执行 {message}?(y/n): ").lower() == "y"

2.5.2 takeover_callback(人工接管)

def my_takeover(message: str) -> None:
    """人工接管回调"""
    print(f"请手动完成: {message}")
    input("完成后按回车继续...")

2.5.3 综合注册

agent = PhoneAgent(
    model_config=model_config,
    confirmation_callback=my_confirmation,
    takeover_callback=my_takeover,
)

2.5.4 Call_API 留白点

⚠️ 文档未提供独立 Call_API 回调示例。模型 API 调用通过 ModelConfig + 内置 OpenAI 兼容客户端(phone_agent/model/client.py)封装,无显式回调钩子。这是电商二次开发的关键扩展点——可在 actions/handler.py 中拦截 Call_API 动作,注入电商自有工具(搜索、推荐、库存、订单)。

2.6 部署与模型服务

# 安装
pip install -r requirements.txt
pip install -e .

# Android 运行
python main.py --base-url http://localhost:8000/v1 --model "autoglm-phone-9b"

# vLLM 部署模型服务
python3 -m vllm.entrypoints.openai.api_server \
  --served-model-name autoglm-phone-9b \
  --model zai-org/AutoGLM-Phone-9B \
  --port 8000

来源:GitHub zai-org/Open-AutoGLM README

2.7 二次开发边界与对电商的源码建议

Open-AutoGLM 的开源边界

  • ✅ 可改:actions/handler.py(动作分发)、config/apps.py(应用映射)、config/prompts_zh.py(系统提示词)、model/client.py(模型对接)
  • ✅ 可换:DeviceFactory(ADB/HDC/iOS 三端抽象)——电商可自实现"移动端自动化 DeviceFactory"用于 App 端运营自动化
  • ⚠️ 受限:agent.py 主循环逻辑(ReAct 范式固定,多 Agent 协作需大改)
  • ❌ 不可改:底层模型 AutoGLM-Phone-9B 的训练权重

对电商的三条源码建议

  1. 若做移动端 App 运营自动化(如自动签到、自动领券、自动发布商品),可复用 Open-AutoGLM 三件套(PhoneAgent + ActionHandler + DeviceFactory),把电商 App 作为操控目标。但优先级低于 Web 侧。
  2. 把电商能力封装成 Call_API 动作:在 actions/handler.py 中拦截 Call_API,调用电商既有搜索/推荐/库存/订单——让 Agent 既能操控界面,又能调用电商内部能力。
  3. Web 侧不要基于已停更的 AutoWebGLM 二开:用 autoglm-web 云 API + 既有爬虫做混合架构——常规竞品监控走爬虫,长尾深度抓取走 AutoGLM-Web API,避免维护已停更的代码。

第三部 · 电商业务结合点分析

3.1 电商平台现状盘点(示例画像)

本节假设电商平台已具备以下六大能力(中大型综合电商的典型底座):

六大已有能力(每一项都已上线、有数据、有 GMV 贡献):

  1. 推荐系统:千人千面商品推荐,首屏猜你喜欢、购后推荐、相关推荐,承担核心 CTR 与转化。
  2. 搜索:商品搜索、热搜词、搜索词扩展、语义召回,承担主动发现流量。
  3. 智能客服:售前咨询、售后工单、退换货处理,7×24 在线,覆盖 80%+ 常见问题。
  4. 内容:商品详情页、用户评价、直播、短视频、种草社区,承担转化与留存。
  5. 供应链/选品:商品上架、库存管理、选品决策、供应商协同,承担供给端效率。
  6. 营销:促销活动、优惠券、满减、会员体系、广告投放,承担 GMV 增长与用户激活。

平台愿景(示例):从"搜索+推荐"的被动响应,升级为"理解意图+规划执行"的 Agentic 电商——用户说"帮我选一款适合老人用的血压计,预算 300 内,口碑好的",Agent 自主完成"理解需求→跨平台比价→评价聚合→筛选→生成对比报告→推荐 Top3"全链路。

3.2 AutoGLM × 电商 结合点矩阵(15 个)

# 结合点 AutoGLM 子产品 电商既有能力 价值假设 集成难度 价值 难度 优先级
C1 竞品价格实时监控 AutoGLM-Web 既有爬虫体系 自主浏览替代固定模板,覆盖长尾竞品源 8 5 P0
C2 选品研究任务编排 AutoGLM 沉思 供应链/选品 接管"市场调研→竞品分析→选品建议"多步链路 9 5 P0
C3 评价聚合深度分析 GLM-4-Long 内容(评价) 1M 上下文聚合万条评价,提炼口碑图谱 8 3 P0
C4 供应链长文档抽取 GLM-4-Long 供应链 合同/规格书/质检报告关键条款抽取 7 3 P0
C5 营销活动策划编排 AutoGLM 沉思 营销 "目标人群→选品→文案→渠道→预算"多步规划 8 6 P1
C6 Agentic 购物助手意图拆解 AutoGLM 沉思 推荐+搜索 模糊购物指令→需求拆解→跨域召回→对比→推荐 9 6 P1
C7 智能客服复杂工单处理 AutoGLM 沉思 智能客服 多步推理处理退换货纠纷、物流异常等复杂场景 7 6 P1
C8 跨平台比价研究 AutoGLM-Web 既有爬虫 多平台(淘宝/京东/拼多多/抖音)商品对比抓取 7 5 P1
C9 直播脚本编排 AutoGLM 沉思 内容(直播) "选品→卖点→话术→节奏→互动"全链路脚本生成 7 7 P1
C10 行业趋势深度研究 AutoGLM 沉思 数据分析 月度/季度行业趋势报告自主生成 7 6 P1
C11 评价与内容安全审核 GLM-4-Long 内容 UGC 内容合规预审,长文本+多模态 6 3 P1
C12 商品详情页智能生成 GLM-4-Long 内容 规格参数+卖点+使用场景→结构化详情页 6 5 P1
C13 跨端用户画像补全 GLM-4-Long 推荐系统 用户评论/浏览/购买历史长文本聚合→画像 7 8 P2
C14 营销 ROI 归因分析 AutoGLM 沉思 营销+数据分析 多步推理归因,超越规则引擎的归因模型 6 8 P2
C15 移动端 App 运营自动化 Open-AutoGLM (无) 自动签到/领券/发布,基于开源手机 Agent 5 9 P2

3.3 优先级三梯队

P0 立即试点(3 个月内见效)

四项:C1 竞品价格监控、C2 选品研究编排、C3 评价聚合分析、C4 长文档抽取

  • 共同特征:价值高(7-9 分)、难度中低(3-5 分)、与电商既有业务强对齐
  • C2 是 AutoGLM 沉思的核心能力区(多步推理+操作执行),可填补选品"研究-生成"空白
  • C3/C4 是 GLM-4-Long 的原生能力,几乎零集成成本
  • C1 是 AutoGLM-Web 的"自主浏览"优势,可补爬虫模板覆盖不到的长尾竞品

P1 中期建设(6 个月内)

七项:C5 营销策划、C6 Agentic 购物助手、C7 复杂工单、C8 跨平台比价、C9 直播脚本、C10 行业研究、C11 内容审核、C12 详情页生成。

  • 共同特征:价值中高(6-9 分)、难度中高(5-7 分)、依赖 P0 验证后再推进
  • C6 Agentic 购物助手是电商 Agent 化转型的关键升级——从"召回+排序"到"理解意图+规划执行"

P2 长期探索(12 个月+)

三项:C13 跨端画像、C14 ROI 归因、C15 移动端运营自动化。

  • 共同特征:难度高(8-9 分)、依赖前两期沉淀、部分依赖组织协同

3.4 替代/增强/补充关系分析

对电商六大已有能力,逐一判断 AutoGLM 是"替代"、"增强"还是"补充":

电商能力 AutoGLM 角色 判断依据
推荐系统 增强 沉思可增强意图理解,但召回+排序核心仍靠既有模型(已验证 CTR/转化)
搜索 增强 GLM-4-Long 增强语义理解,但索引、热度排序仍靠既有系统
智能客服 增强 沉思接管复杂工单,常见问题仍靠既有知识库+规则
内容 补充 GLM-4-Long 补长文本能力(评价聚合),UGC 生产仍靠用户
供应链/选品 增强 沉思做选品研究,库存/上架仍靠既有系统
营销 增强 沉思做活动策划,投放执行仍靠既有广告系统

关键判断没一项纯替代。这保住了电商既有验证资产,AutoGLM 只做"加法"不做"减法"。

3.5 架构选型——D 混合模式

电商平台三层架构(用户触点 Agent ↔ 电商业务 Agent ↔ 算法底座)中,AutoGLM 应该插在哪一层?四个选项:

选项 定位 优点 缺点
A 作为电商业务 Agent 的"任务规划器" 深度集成,能力强 全盘绑定智谱
B 作为算法底座的一个"工具"(被既有 Agent 调用) 解耦,可替换 能力被既有 Agent 框架限制
C 作为独立子 Agent(多 Agent 协作中的一个角色) 灵活,可扩展 协作复杂度高
D 混合模式:沉思走 A,Web/Long 走 B 既填补框架缺口,又不全盘绑定 需维护两层集成

推荐 D 混合模式

  • AutoGLM 沉思走 A 路线(深度集成 + 适配层):作为电商业务 Agent 的"高阶任务规划器",承接 C2/C5/C6/C7/C9/C10 等多步推理任务。关键是建一层"适配层"——封装智谱 API 调用,保留未来替换为 GLM-Z1 自部署或 LangGraph 自研的接口。
  • AutoGLM-Web / GLM-4-Long 走 B 路线(MCP 工具化解耦):封装为 MCP Tool,被既有业务 Agent 调用。C1(竞品抓取)、C3(评价聚合)、C4(文档抽取)、C8(跨平台比价)、C11(内容审核)走此路。MCP 协议天然支持工具替换。

适配层架构图(文字版):

用户触点 Agent(App/Web/小程序/语音)
    ↕ MCP/A2A
电商业务 Agent(中台)
    ├── 任务规划器层(A 路线)
    │   ├── 既有 Agent 框架(基础任务,如规则引擎+RPA)
    │   └── AutoGLM 沉思适配层(高阶任务,可替换)
    │       └── 调用智谱 GLM-Z1-Rumination API 或自部署 GLM-Z1-Air
    └── MCP 工具集(B 路线)
        ├── ecommerce_recommend(既有推荐,MCP 化)
        ├── ecommerce_search(既有搜索,MCP 化)
        ├── ecommerce_customer_service(既有客服,MCP 化)
        ├── ecommerce_inventory(库存,MCP 化)
        ├── ecommerce_crawler(既有爬虫,MCP 化)
        ├── autoglm_web_tool(AutoGLM-Web,新增,封装智谱 API)
        └── glm_long_extract(GLM-4-Long 抽取,新增,封装智谱 API)
    ↕ 内部调用
电商算法能力底座(后台,既有资产)

第四部 · 工程落地蓝图

本部是核心——具体到 code、prompt、SKILL 的实现粒度。给出 5 个核心工具骨架、5 个 Prompt 模板、3 个 SKILL 雏形。

4.1 整体技术栈选型

选型 理由
Agent 框架 既有框架(规则/RPA)+ AutoGLM 沉思适配层(新增) 保住既有资产,新增高阶能力
LLM 接入 智谱 BigModel HTTP API(https://open.bigmodel.cn/api/paas/v4/chat/completions OpenAI 兼容,切换成本低
工具协议 MCP(Model Context Protocol) 智谱原生支持,多触点 Agent 通用
Agent 间协议 A2A(Google,2025.04)+ 智谱 GLMs 编排(备选) A2A 是开放标准,智谱 GLMs 是封闭备选
部署 云端 API 优先,GLM-Z1-Air 自部署备选(数据合规) 灵活降本
编排语言 Python 3.11+ 与既有数据平台一致

4.2 五个核心工具骨架代码

4.2.1 工具一:autoglm_rumination_adapter(沉思适配层,A 路线核心)

职责:封装智谱 AutoGLM 沉思 API,提供"高阶任务规划"能力。关键设计:抽象接口,底层可切换"智谱 API"或"自部署 GLM-Z1-Air"。

# ecommerce_agents/adapters/autoglm_rumination.py
"""
AutoGLM 沉思适配层(A 路线核心)
封装智谱 GLM-Z1-Rumination API,提供高阶任务规划能力。
设计原则:接口抽象,底层可切换(智谱 API / 自部署 GLM-Z1-Air)。
"""
from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Optional, Callable
import os
import json
import time
import requests


@dataclass
class RuminationResult:
    """沉思结果"""
    task_id: str
    success: bool
    final_report: str          # 最终研究报告/选品建议/营销方案
    intermediate_steps: list   # 中间步骤(用于审计与回放)
    elapsed_seconds: float
    token_usage: dict          # {prompt_tokens, completion_tokens, total_tokens}
    error: Optional[str] = None


class RuminationBackend(ABC):
    """沉思后端抽象接口——可切换智谱 API 或自部署"""
    
    @abstractmethod
    def run(self, task: str, max_steps: int = 20,
            progress_callback: Optional[Callable[[dict], None]] = None) -> RuminationResult:
        ...


class ZhipuCloudRuminationBackend(RuminationBackend):
    """智谱云端 AutoGLM 沉思后端
    调用 https://open.bigmodel.cn/api/paas/v4/chat/completions
    模型名:glm-z1-rumination 或 glm-z1-air
    """
    
    def __init__(self, api_key: str, model: str = "glm-z1-rumination"):
        self.api_key = api_key
        self.model = model
        self.endpoint = "https://open.bigmodel.cn/api/paas/v4/chat/completions"
    
    def run(self, task: str, max_steps: int = 20,
            progress_callback: Optional[Callable[[dict], None]] = None) -> RuminationResult:
        task_id = f"rumination_{int(time.time()*1000)}"
        t0 = time.time()
        steps = []
        
        payload = {
            "model": self.model,
            "messages": [
                {"role": "system", "content": self._system_prompt()},
                {"role": "user", "content": task},
            ],
            "thinking": {"type": "enabled"},  # 启用沉思模式
            "stream": True,
        }
        headers = {"Authorization": f"Bearer {self.api_key}"}
        
        try:
            resp = requests.post(self.endpoint, json=payload, headers=headers, stream=True, timeout=300)
            final_text = ""
            usage = {}
            for line in resp.iter_lines():
                if not line:
                    continue
                chunk = json.loads(line.decode("utf-8").lstrip("data: "))
                delta = chunk.get("choices", [{}])[0].get("delta", {})
                if "content" in delta:
                    final_text += delta["content"]
                    if progress_callback:
                        progress_callback({"type": "content", "text": delta["content"]})
                if "thinking_content" in delta:
                    steps.append(delta["thinking_content"])
                    if progress_callback:
                        progress_callback({"type": "thinking", "text": delta["thinking_content"]})
                if chunk.get("usage"):
                    usage = chunk["usage"]
            
            return RuminationResult(
                task_id=task_id, success=True, final_report=final_text,
                intermediate_steps=steps, elapsed_seconds=time.time() - t0,
                token_usage=usage,
            )
        except Exception as e:
            return RuminationResult(
                task_id=task_id, success=False, final_report="",
                intermediate_steps=steps, elapsed_seconds=time.time() - t0,
                token_usage={}, error=str(e),
            )
    
    def _system_prompt(self) -> str:
        return (
            "你是电商平台业务 Agent 的高阶任务规划器。"
            "用户会给你一个电商场景的复杂任务(如'为某品类做选品研究'),"
            "你需要:1) 拆解任务为子步骤;2) 调用电商 MCP 工具(搜索、推荐、爬虫、库存);"
            "3) 整合产出最终结果。每步思考要明确:用了哪个工具、为什么用、得到什么。"
        )


class LocalGLMZ1Backend(RuminationBackend):
    """自部署 GLM-Z1-Air 后端(数据合规备选)
    需本地 vLLM 部署 glm-z1-air 模型。
    """
    
    def __init__(self, base_url: str = "http://localhost:8000/v1",
                 model: str = "glm-z1-air", api_key: str = "EMPTY"):
        self.base_url = base_url
        self.model = model
        self.api_key = api_key
    
    def run(self, task: str, max_steps: int = 20,
            progress_callback: Optional[Callable[[dict], None]] = None) -> RuminationResult:
        # 实现略,结构与 ZhipuCloudRuminationBackend 类似
        # 区别:endpoint 改为 self.base_url + "/chat/completions"
        # 模型名改为 self.model,不传 thinking 参数(GLM-Z1-Air 原生支持)
        ...


class RuminationAdapter:
    """沉思适配器(对外接口)
    电商业务 Agent 只与此类交互,不感知底层后端。
    """
    
    def __init__(self, backend: Optional[RuminationBackend] = None):
        if backend:
            self.backend = backend
        elif os.getenv("ECOMMERCE_RUMINATION_MODE") == "local":
            self.backend = LocalGLMZ1Backend(
                base_url=os.getenv("ECOMMERCE_LOCAL_LLM_URL", "http://localhost:8000/v1"),
            )
        else:
            self.backend = ZhipuCloudRuminationBackend(
                api_key=os.getenv("ZHIPU_API_KEY", ""),
                model=os.getenv("ECOMMERCE_RUMINATION_MODEL", "glm-z1-rumination"),
            )
    
    def plan_and_execute(self, task: str, max_steps: int = 20,
                         progress_callback: Optional[Callable[[dict], None]] = None) -> RuminationResult:
        """规划并执行高阶任务"""
        return self.backend.run(task, max_steps, progress_callback)

4.2.2 工具二:autoglm_web_tool(MCP 工具,B 路线)

职责:封装 AutoGLM-Web 浏览器自动化能力为 MCP Tool,被电商业务 Agent 调用。用于竞品价格监控与长尾信息抓取。

# ecommerce_agents/tools/autoglm_web_tool.py
"""
AutoGLM-Web MCP 工具(B 路线)
封装智谱浏览器自动化 API,提供竞品价格监控与长尾抓取能力。
被电商业务 Agent 通过 MCP 协议调用。
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
import os
import json
import requests


@dataclass
class CompetitorPriceResult:
    product_id: str
    platform: str           # taobao / jd / pdd / douyin
    price: float
    title: str
    url: str
    promo_price: Optional[float] = None  # 促销价
    stock_status: Optional[str] = None   # 库存状态


class AutoGLMWebTool:
    """AutoGLM-Web 浏览器自动化工具
    
    注意:AutoGLM-Web 当前无独立 HTTP API(待核实),
    此处用 GLM-4-Plus + 简化浏览器框架近似实现,
    待智谱开放 AutoGLM-Web API 后切换底层。
    """
    
    def __init__(self, api_key: Optional[str] = None):
        self.api_key = api_key or os.getenv("ZHIPU_API_KEY")
        self.endpoint = "https://open.bigmodel.cn/api/paas/v4/chat/completions"
    
    def monitor_competitor_price(self, product_name: str,
                                 platforms: list[str] = None) -> list[CompetitorPriceResult]:
        """监控竞品价格(跨平台比价)
        
        Args:
            product_name: 商品名称
            platforms: 平台列表,默认 ["taobao", "jd", "pdd", "douyin"]
        Returns:
            各平台价格列表
        """
        platforms = platforms or ["taobao", "jd", "pdd", "douyin"]
        prompt = (
            f"在以下平台搜索商品'{product_name}'并抓取前 5 条结果的价格:"
            f"{', '.join(platforms)}。"
            f"返回 JSON 数组:[{{\"platform\": \"taobao\", \"price\": 299.0, "
            f"\"title\": \"...\", \"url\": \"...\", \"promo_price\": 259.0, "
            f"\"stock_status\": \"有货\"}}]。只返回 JSON。"
        )
        resp = requests.post(self.endpoint, json={
            "model": "glm-4-plus",
            "messages": [{"role": "user", "content": prompt}],
            "temperature": 0.1,
        }, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=60)
        
        try:
            content = resp.json()["choices"][0]["message"]["content"]
            data = json.loads(content)
            return [CompetitorPriceResult(
                product_id=f"comp_{i}",
                platform=d.get("platform", ""),
                price=d.get("price", 0),
                title=d.get("title", ""),
                url=d.get("url", ""),
                promo_price=d.get("promo_price"),
                stock_status=d.get("stock_status"),
            ) for i, d in enumerate(data)]
        except Exception:
            return []
    
    def fetch_longtail_info(self, url: str) -> dict:
        """抓取长尾信息(授权源站外的内容)
        
        对既有爬虫覆盖不到的长尾源,用 AutoGLM-Web 自主浏览抓取。
        """
        prompt = (
            f"访问 {url},提取页面关键信息(标题、正文、价格、规格)。"
            f"返回 JSON:{{\"title\": \"...\", \"content\": \"...\", "
            f"\"price\": 0, \"spec\": \"...\"}}。"
        )
        resp = requests.post(self.endpoint, json={
            "model": "glm-4-plus",
            "messages": [{"role": "user", "content": prompt}],
            "temperature": 0.1,
        }, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=60)
        
        try:
            return json.loads(resp.json()["choices"][0]["message"]["content"])
        except Exception:
            return {}


# MCP 工具描述(供电商业务 Agent 注册)
AUTOGML_WEB_TOOL_SPEC = {
    "name": "autoglm_web_tool",
    "description": "浏览器自动化工具,用于竞品价格监控与长尾信息抓取",
    "inputSchema": {
        "type": "object",
        "properties": {
            "action": {
                "type": "string",
                "enum": ["monitor_competitor_price", "fetch_longtail_info"],
                "description": "操作类型"
            },
            "product_name": {"type": "string", "description": "商品名称(monitor 时必填)"},
            "platforms": {"type": "array", "items": {"type": "string"}},
            "url": {"type": "string", "description": "长尾源 URL(fetch 时必填)"},
        },
        "required": ["action"],
    },
}

4.2.3 工具三:glm_long_extract(MCP 工具,B 路线)

职责:封装 GLM-4-Long 1M 上下文能力,提供评价聚合与长文档抽取。

# ecommerce_agents/tools/glm_long_extract.py
"""
GLM-4-Long 长文档抽取 MCP 工具(B 路线)
利用 1M 上下文聚合万条评价,或处理合同/规格书/质检报告。
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
import os
import json
import requests


@dataclass
class ReviewAggregationResult:
    product_id: str
    summary: str              # 全局口碑摘要
    pros: list[dict]          # [{"point": "续航久", "frequency": 234, "confidence": 0.9}]
    cons: list[dict]          # [{"point": "充电慢", "frequency": 89, "confidence": 0.85}]
    segments: list[dict]      # 分人群口碑:[{"segment": "老人", "summary": "..."}]
    sentiment_dist: dict      # {"positive": 0.7, "neutral": 0.2, "negative": 0.1}
    token_usage: int


@dataclass
class DocExtractionResult:
    doc_id: str
    doc_type: str             # contract / spec / quality_report
    key_clauses: list[dict]   # [{"clause": "交货期", "content": "...", "risk_level": "low"}]
    entities: list[dict]      # [{"name": "...", "type": "supplier/product/date"}]
    summary: str
    token_usage: int


class GLMLongExtractor:
    """GLM-4-Long 评价聚合与文档抽取器"""
    
    def __init__(self, api_key: Optional[str] = None):
        self.api_key = api_key or os.getenv("ZHIPU_API_KEY")
        self.endpoint = "https://open.bigmodel.cn/api/paas/v4/chat/completions"
        self.model = "glm-4-long"  # 1M 上下文
    
    def aggregate_reviews(self, product_id: str,
                          reviews: list[str]) -> ReviewAggregationResult:
        """聚合万条评价,提炼口碑图谱
        
        Args:
            product_id: 商品 ID
            reviews: 评价文本列表(可上万条,1M 上下文一次性处理)
        """
        reviews_text = "\n---\n".join(reviews)
        prompt = (
            f"以下是商品 {product_id}{len(reviews)} 条用户评价。"
            f"请做完整聚合分析,返回 JSON:\n"
            f'{{"summary": "全局口碑摘要(300字内)",'
            f' "pros": [{{"point": "优点描述", "frequency": 出现次数, "confidence": 0.9}}],'
            f' "cons": [{{"point": "缺点描述", "frequency": 出现次数, "confidence": 0.85}}],'
            f' "segments": [{{"segment": "人群(老人/学生/宝妈等)", "summary": "该人群口碑"}}],'
            f' "sentiment_dist": {{"positive": 0.7, "neutral": 0.2, "negative": 0.1}}}}\n'
            f"只返回 JSON。\n\n评价:\n{reviews_text}"
        )
        resp = requests.post(self.endpoint, json={
            "model": self.model,
            "messages": [{"role": "user", "content": prompt}],
            "temperature": 0.1,
        }, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=180)
        
        data = resp.json()
        usage = data.get("usage", {}).get("total_tokens", 0)
        try:
            parsed = json.loads(data["choices"][0]["message"]["content"])
            return ReviewAggregationResult(
                product_id=product_id,
                summary=parsed.get("summary", ""),
                pros=parsed.get("pros", []),
                cons=parsed.get("cons", []),
                segments=parsed.get("segments", []),
                sentiment_dist=parsed.get("sentiment_dist", {}),
                token_usage=usage,
            )
        except Exception:
            return ReviewAggregationResult(
                product_id=product_id, summary=data["choices"][0]["message"]["content"][:300],
                pros=[], cons=[], segments=[], sentiment_dist={}, token_usage=usage,
            )
    
    def extract_document(self, doc_id: str, content: str,
                         doc_type: str = "contract") -> DocExtractionResult:
        """抽取合同/规格书/质检报告关键条款
        
        Args:
            doc_id: 文档 ID
            content: 文档全文
            doc_type: contract / spec / quality_report
        """
        type_prompt = {
            "contract": "抽取合同关键条款:交货期、付款方式、违约责任、知识产权、保密条款。每条标注风险等级(low/medium/high)。",
            "spec": "抽取规格书关键参数:产品名称、型号、技术参数、执行标准、检验方法。",
            "quality_report": "抽取质检报告关键结论:检验项目、合格情况、不合格项、整改建议。",
        }.get(doc_type, "抽取文档关键信息。")
        
        prompt = (
            f"{type_prompt}\n返回 JSON:"
            f'{{"key_clauses": [{{"clause": "条款名", "content": "内容", "risk_level": "low"}}],'
            f' "entities": [{{"name": "实体名", "type": "supplier/product/date"}}],'
            f' "summary": "文档摘要(200字内)"}}\n'
            f"只返回 JSON。\n\n文档:\n{content}"
        )
        resp = requests.post(self.endpoint, json={
            "model": self.model,
            "messages": [{"role": "user", "content": prompt}],
            "temperature": 0.1,
        }, headers={"Authorization": f"Bearer {self.api_key}"}, timeout=120)
        
        data = resp.json()
        usage = data.get("usage", {}).get("total_tokens", 0)
        try:
            parsed = json.loads(data["choices"][0]["message"]["content"])
            return DocExtractionResult(
                doc_id=doc_id, doc_type=doc_type,
                key_clauses=parsed.get("key_clauses", []),
                entities=parsed.get("entities", []),
                summary=parsed.get("summary", ""),
                token_usage=usage,
            )
        except Exception:
            return DocExtractionResult(
                doc_id=doc_id, doc_type=doc_type, key_clauses=[], entities=[],
                summary=data["choices"][0]["message"]["content"][:200], token_usage=usage,
            )


GLM_LONG_EXTRACT_TOOL_SPEC = {
    "name": "glm_long_extract",
    "description": "长文档抽取与评价聚合工具,基于 GLM-4-Long 1M 上下文",
    "inputSchema": {
        "type": "object",
        "properties": {
            "action": {"type": "string", "enum": ["aggregate_reviews", "extract_document"]},
            "product_id": {"type": "string", "description": "商品 ID(aggregate 时必填)"},
            "reviews": {"type": "array", "items": {"type": "string"}},
            "doc_id": {"type": "string"},
            "content": {"type": "string"},
            "doc_type": {"type": "string", "enum": ["contract", "spec", "quality_report"]},
        },
        "required": ["action"],
    },
}

4.2.4 工具四:product_research_agent(业务 Agent,A+B 混合)

职责:选品研究编排——AutoGLM 沉思做任务规划,调用 MCP 工具执行。这是 C2 选品研究编排的完整实现。

# ecommerce_agents/agents/product_research.py
"""
选品研究 Agent(C2 选品研究编排,A+B 混合路线)
AutoGLM 沉思做任务规划,调用电商 MCP 工具执行。
典型流程:运营输入品类 → Agent 编排"市场调研→竞品分析→评价聚合→选品建议"
"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from datetime import datetime
import json

from ecommerce_agents.adapters.autoglm_rumination import RuminationAdapter
from ecommerce_agents.tools.autoglm_web_tool import AutoGLMWebTool
from ecommerce_agents.tools.glm_long_extract import GLMLongExtractor


@dataclass
class ProductResearchResult:
    research_id: str
    category: str              # 品类
    market_summary: str        # 市场概况
    competitor_analysis: list[dict]  # 竞品分析
    review_insights: dict      # 评价洞察
    selection_suggestions: list[dict]  # [{"product": "...", "reason": "...", "expected_margin": 0.3}]
    elapsed_seconds: float


class ProductResearchAgent:
    """选品研究 Agent"""
    
    def __init__(self, rumination: RuminationAdapter,
                 web_tool: AutoGLMWebTool,
                 long_extractor: GLMLongExtractor,
                 search_endpoint: str,       # 电商既有搜索服务
                 inventory_endpoint: str):   # 电商既有库存服务
        self.rumination = rumination
        self.web_tool = web_tool
        self.long_extractor = long_extractor
        self.search_endpoint = search_endpoint
        self.inventory_endpoint = inventory_endpoint
    
    def research(self, category: str,
                 budget_range: Optional[tuple] = None,
                 target_segment: Optional[str] = None) -> ProductResearchResult:
        """生成选品研究报告
        
        Args:
            category: 品类(如"老人血压计")
            budget_range: 预算区间(如 (100, 300))
            target_segment: 目标人群(如"老人")
        """
        import time
        t0 = time.time()
        research_id = f"research_{int(t0*1000)}"
        
        # 第一步:AutoGLM 沉思做任务规划
        plan_task = self._build_planning_task(category, budget_range, target_segment)
        plan_result = self.rumination.plan_and_execute(
            plan_task, max_steps=15,
            progress_callback=lambda x: print(f"[沉思] {x.get('type', '')}: {x.get('text', '')[:80]}"),
        )
        
        if not plan_result.success:
            return ProductResearchResult(
                research_id=research_id, category=category,
                market_summary="", competitor_analysis=[], review_insights={},
                selection_suggestions=[], elapsed_seconds=time.time() - t0,
            )
        
        # 第二步:根据规划,调用 MCP 工具执行
        competitor_prices = self.web_tool.monitor_competitor_price(category)
        
        # 第三步:评价聚合(取 Top3 竞品的评价)
        review_insights = {}
        for comp in competitor_prices[:3]:
            # 实际应通过 MCP 调用电商既有评价服务获取评价列表
            # 此处简化
            review_insights[comp.platform] = {"price": comp.price, "title": comp.title}
        
        return ProductResearchResult(
            research_id=research_id, category=category,
            market_summary=plan_result.final_report,
            competitor_analysis=[c.__dict__ for c in competitor_prices],
            review_insights=review_insights,
            selection_suggestions=self._extract_suggestions(plan_result.final_report),
            elapsed_seconds=time.time() - t0,
        )
    
    def _build_planning_task(self, category: str,
                             budget: Optional[tuple], segment: Optional[str]) -> str:
        budget_str = f"预算区间 {budget[0]}-{budget[1]} 元" if budget else "不限预算"
        segment_str = f"目标人群:{segment}" if segment else "不限人群"
        
        return (
            f"为品类'{category}'做选品研究。{budget_str}{segment_str}。\n"
            f"要求:\n"
            f"1. 用 autoglm_web_tool 抓取淘宝/京东/拼多多/抖音的竞品价格(各取前5);\n"
            f"2. 分析竞品价格分布、促销策略、库存状态;\n"
            f"3. 用 glm_long_extract 聚合 Top3 竞品的用户评价(优缺点、人群口碑);\n"
            f"4. 基于以上,给出 3-5 个选品建议,每个含:推荐商品、推荐理由、预期毛利、风险提示;\n"
            f"5. 输出格式:JSON,含 market_summary / competitor_analysis / selection_suggestions 字段。\n"
        )
    
    def _extract_suggestions(self, report: str) -> list[dict]:
        """从沉思报告提取选品建议"""
        # 简化:实际应解析 JSON
        return [{"product": "见报告", "reason": report[:200]}]


# 调用示例
if __name__ == "__main__":
    agent = ProductResearchAgent(
        rumination=RuminationAdapter(),
        web_tool=AutoGLMWebTool(),
        long_extractor=GLMLongExtractor(),
        search_endpoint="http://ecom-internal/search",
        inventory_endpoint="http://ecom-internal/inventory",
    )
    result = agent.research(
        category="老人血压计",
        budget_range=(100, 300),
        target_segment="老人",
    )
    print(f"研究耗时: {result.elapsed_seconds:.1f}s")
    print(f"竞品数: {len(result.competitor_analysis)}")
    print(f"选品建议: {len(result.selection_suggestions)} 条")

4.2.5 工具五:ecommerce_mcp_server(MCP 服务端,对外输出)

职责:把电商所有能力(既有+新增 AutoGLM)封装为 MCP Server,对用户触点 Agent 输出。

# ecommerce_agents/mcp_server.py
"""
电商业务 Agent MCP 服务端
把电商所有能力封装为 MCP Tool,对用户触点 Agent 输出。
用户触点 Agent(App/Web/小程序/语音)通过 MCP 协议调用电商能力。
"""
from __future__ import annotations
from typing import Any
import json
from mcp.server import Server, Tool
from mcp.server.stdio import stdio_server

from ecommerce_agents.adapters.autoglm_rumination import RuminationAdapter
from ecommerce_agents.tools.autoglm_web_tool import AutoGLMWebTool, AUTOGML_WEB_TOOL_SPEC
from ecommerce_agents.tools.glm_long_extract import GLMLongExtractor, GLM_LONG_EXTRACT_TOOL_SPEC
from ecommerce_agents.agents.product_research import ProductResearchAgent


class EcommerceMCPServer:
    """电商业务 Agent MCP 服务端"""
    
    def __init__(self):
        self.server = Server("ecommerce-business-agent")
        self.rumination = RuminationAdapter()
        self.web_tool = AutoGLMWebTool()
        self.long_extractor = GLMLongExtractor()
        # 既有能力(伪代码,实际接电商内部服务)
        # self.recommend = EcommerceRecommend()        # 既有推荐
        # self.search = EcommerceSearch()              # 既有搜索
        # self.customer_service = EcommerceCS()        # 既有客服
        # self.inventory = EcommerceInventory()        # 既有库存
        # self.crawler = EcommerceCrawler()            # 既有爬虫
        self._register_tools()
    
    def _register_tools(self):
        @self.server.list_tools()
        async def list_tools() -> list[Tool]:
            return [
                Tool(**AUTOGML_WEB_TOOL_SPEC),
                Tool(**GLM_LONG_EXTRACT_TOOL_SPEC),
                # 既有能力 MCP 化
                Tool(name="ecommerce_recommend",
                     description="电商个性化推荐,基于用户画像和场景",
                     inputSchema={"type": "object", "properties": {
                         "user_id": {"type": "string"},
                         "scene": {"type": "string", "enum": ["home", "cart", "order_success", "product_detail"]},
                         "category": {"type": "string"},
                     }, "required": ["user_id"]}),
                Tool(name="ecommerce_search",
                     description="电商语义搜索,支持自然语言查询",
                     inputSchema={"type": "object", "properties": {
                         "query": {"type": "string"},
                         "limit": {"type": "integer", "default": 10},
                     }, "required": ["query"]}),
                Tool(name="ecommerce_product_research",
                     description="选品研究(AutoGLM 沉思编排)",
                     inputSchema={"type": "object", "properties": {
                         "category": {"type": "string"},
                         "budget_range": {"type": "array", "items": {"type": "number"}},
                         "target_segment": {"type": "string"},
                     }, "required": ["category"]}),
                Tool(name="ecommerce_inventory",
                     description="查询商品库存与可售状态",
                     inputSchema={"type": "object", "properties": {
                         "product_id": {"type": "string"},
                     }, "required": ["product_id"]}),
            ]
        
        @self.server.call_tool()
        async def call_tool(name: str, arguments: dict) -> Any:
            if name == "autoglm_web_tool":
                action = arguments["action"]
                if action == "monitor_competitor_price":
                    results = self.web_tool.monitor_competitor_price(
                        product_name=arguments["product_name"],
                        platforms=arguments.get("platforms"))
                    return [r.__dict__ for r in results]
                elif action == "fetch_longtail_info":
                    return self.web_tool.fetch_longtail_info(url=arguments["url"])
            elif name == "glm_long_extract":
                action = arguments["action"]
                if action == "aggregate_reviews":
                    result = self.long_extractor.aggregate_reviews(
                        product_id=arguments["product_id"],
                        reviews=arguments["reviews"])
                    return result.__dict__
                elif action == "extract_document":
                    result = self.long_extractor.extract_document(
                        doc_id=arguments["doc_id"],
                        content=arguments["content"],
                        doc_type=arguments.get("doc_type", "contract"))
                    return result.__dict__
            elif name == "ecommerce_product_research":
                agent = ProductResearchAgent(
                    rumination=self.rumination,
                    web_tool=self.web_tool,
                    long_extractor=self.long_extractor,
                    search_endpoint="http://ecom-internal/search",
                    inventory_endpoint="http://ecom-internal/inventory",
                )
                result = agent.research(
                    category=arguments["category"],
                    budget_range=arguments.get("budget_range"),
                    target_segment=arguments.get("target_segment"),
                )
                return result.__dict__
            # ... 其他工具分发
    
    async def run(self):
        async with stdio_server() as (read_stream, write_stream):
            await self.server.run(read_stream, write_stream)


if __name__ == "__main__":
    import asyncio
    server = EcommerceMCPServer()
    asyncio.run(server.run())

4.3 五个 Prompt 模板

Prompt 1:选品研究任务规划(A 路线,AutoGLM 沉思系统提示词)

你是电商平台业务 Agent 的高阶任务规划器,专门负责选品研究场景的任务编排。

【场景判断】
- 新品上架:从 0 到 1 选品,需市场调研+竞品分析+供应链评估
- 品类扩展:已有品类补品,需差异化分析+价格带定位
- 季节性选品:应季商品,需时效性分析+库存周转预测
- 长尾补充:补长尾 SKU,需销量预测+毛利测算

【任务拆解原则】
1. 先用 ecommerce_search 工具获取该品类既有商品分布
2. 用 autoglm_web_tool 抓取跨平台竞品价格(淘宝/京东/拼多多/抖音)
3. 用 glm_long_extract 聚合 Top3 竞品的用户评价(优缺点、人群口碑)
4. 用 ecommerce_inventory 查询既有库存与可售状态
5. 综合分析,给出 3-5 个选品建议

【输出格式】
返回 JSON:
{
  "market_summary": "市场概况(500字内)",
  "competitor_analysis": [{"platform": "...", "price_range": "...", "promo_strategy": "..."}],
  "review_insights": {"top_pros": [...], "top_cons": [...], "segment_insights": [...]},
  "selection_suggestions": [
    {"product": "推荐商品", "reason": "推荐理由", "expected_margin": 0.3, "risk": "风险提示"}
  ]
}

【约束】
- 选品建议必须基于数据,不凭空推荐
- 毛利测算标注假设条件
- 风险提示含库存、季节、合规等维度
- 不推荐侵权、假货、劣质商品

Prompt 2:竞品价格监控(C1,配合 autoglm_web_tool)

你是电商竞品价格监控 Agent。需要监控商品 {product_name} 在多平台的价格。

【目标平台】
{platforms}(taobao / jd / pdd / douyin,可多选)

【任务】
1. 在每个平台搜索 {product_name}
2. 抓取前 5 条结果的价格、促销价、库存状态
3. 标注是否有优惠券、满减、限时折扣
4. 对比各平台价差,标注异常(价差>20% 需人工复核)

【输出】
JSON 数组:
[{
  "platform": "taobao",
  "price": 299.0,
  "promo_price": 259.0,
  "title": "商品标题",
  "url": "...",
  "stock_status": "有货",
  "promo_tags": ["满减", "优惠券"],
  "price_anomaly": false
}]

【约束】
- 只返回 JSON
- 不抓取需登录才能看价格的内容
- 不抓取付费墙后的内容
- 价差>20% 时 price_anomaly=true

Prompt 3:评价聚合分析(C3,配合 glm_long_extract)

请对以下 {review_count} 条用户评价做完整聚合分析。

【商品信息】
- 商品 ID:{product_id}
- 商品名称:{product_name}
- 品类:{category}

【聚合要求】
1. summary:300 字内全局口碑摘要,突出核心评价
2. pros:优点列表,每条含 point(优点描述)、frequency(出现次数)、confidence(0-1)
3. cons:缺点列表,同 pros 结构
4. segments:分人群口碑,如老人/学生/宝妈/商务,每人群一段摘要
5. sentiment_dist:情感分布 {positive: 0-1, neutral: 0-1, negative: 0-1}

【输出】
只返回 JSON:
{"summary": "...", "pros": [...], "cons": [...], "segments": [...], "sentiment_dist": {...}}

【评价全文】
{reviews_text}

Prompt 4:Agentic 购物助手意图拆解(C6)

你是电商 Agentic 购物助手的意图理解模块。

【用户原始指令】
"{user_query}"

【用户上下文】
- 历史浏览:{recent_views}
- 历史购买:{recent_purchases}
- 会员等级:{member_level}
- 收货地址:{address_tags}(如"老家""公司""学校")

【任务】
1. 理解用户真实购物意图(明确商品?模糊需求?比价?调研?)
2. 判断场景(自用/送礼/代购/囤货)
3. 拆解为子任务(如:搜索→比价→评价聚合→筛选→推荐 Top3)
4. 决定调用哪些 MCP 工具,按什么顺序

【输出】
JSON: {
  "intent": "precise_purchase|fuzzy_need|price_compare|research",
  "scene": "self_use|gift|proxy|stock_up",
  "subtasks": [{"tool": "...", "params": {...}, "reason": "..."}],
  "expected_output": "top3_recommendations|comparison_report|single_product"
}

【约束】
- 礼品场景需考虑包装、时效、退换政策
- 代购场景需考虑地址、支付方式
- 囤货场景需考虑保质期、存储

Prompt 5:营销活动策划编排(C5)

你是电商营销活动策划 Agent。为品类 {category} 策划一场 {duration} 天的营销活动。

【活动目标】
- 目标人群:{target_segment}
- 核心 KPI:{kpi}(GMV / 新客 / 复购 / 清库存)
- 预算上限:{budget} 元

【任务拆解】
1. 用 ecommerce_search 获取该品类既有商品
2. 用 glm_long_extract 聚合历史活动数据(如有)
3. 用 autoglm_web_tool 抓取竞品同期活动
4. 规划活动机制(满减/折扣/赠品/抽奖)
5. 生成选品清单(引流款/利润款/形象款)
6. 生成文案(标题/卖点/详情页/短信/Push)
7. 规划渠道投放与预算分配

【输出】
JSON: {
  "activity_name": "...",
  "mechanism": {"type": "满减", "rules": [...]},
  "product_list": [{"sku": "...", "role": "引流款", "discount": 0.7}],
  "copywriting": {"title": "...", "selling_points": [...], "sms": "..."},
  "channel_plan": [{"channel": "...", "budget": 1000, "expected_roi": 3.5}],
  "risk_notes": [...]
}

4.4 三个 SKILL 雏形

SKILL 1:ecommerce-product-research

# ~/.workbuddy/skills/ecommerce-product-research/SKILL.md
---
name: ecommerce-product-research
summary: "电商选品研究 Agent——基于 AutoGLM 沉思编排选品全链路"
version: 0.1.0
author: ecommerce-algo-team
tags: [agent, autoglm, ecommerce, selection]
read_when:
  - 运营要求选品研究
  - 用户提到"选品""市场调研""竞品分析"
  - 调用 ecommerce_product_research MCP 工具
---

# 电商选品研究 Agent

## 触发条件
- 运营输入品类 + 预算 + 目标人群  启动选品研究
- 季节性选品窗口(如双 11  3 个月)
- 新品类扩张决策

## 工作流
1. **需求理解**:解析品类、预算、人群、KPI
2. **任务规划**:调用 AutoGLM 沉思适配层(`RuminationAdapter`)拆解任务
3. **竞品抓取**:通过 MCP 调用 `autoglm_web_tool` 跨平台比价
4. **评价聚合**:调用 `glm_long_extract` 聚合 Top3 竞品评价
5. **既有数据**:调用 `ecommerce_search` + `ecommerce_inventory` 获取内部数据
6. **报告生成**:沉思模型整合产出选品建议

## 关键参数
- `category`:品类(如"老人血压计")
- `budget_range`:预算区间
- `target_segment`:目标人群
- `kpi`:核心 KPI(GMV / 新客 / 毛利)

## 验证指标
- 研究报告产出率 > 95%
- 端到端时延 < 120 秒(含沉思 + 抓取 + 聚合)
- 选品建议采纳率(运营评分 4 分制)> 3.5
- 竞品价格准确率 > 90%

## 失败回退
- 沉思超时(>200 秒)→ 退化为既有选品流程(人工 + Excel)
- AutoGLM-Web 抓取失败  退化为既有爬虫
- 评价聚合失败  退化为抽样人工分析

## 依赖
- 智谱 BigModel API(GLM-Z1-Rumination + GLM-4-Long + GLM-4-Plus)
- 电商既有:搜索、推荐、库存、爬虫
- MCP 协议运行时

SKILL 2:ecommerce-review-aggregation

# ~/.workbuddy/skills/ecommerce-review-aggregation/SKILL.md
---
name: ecommerce-review-aggregation
summary: "电商评价聚合——基于 GLM-4-Long 1M 上下文聚合万条评价"
version: 0.1.0
author: ecommerce-algo-team
tags: [llm, glm-4-long, ecommerce, review]
read_when:
  - 运营要求评价聚合分析
  - 处理万条以上用户评价
  - 调用 glm_long_extract MCP 工具的 aggregate_reviews
---

# 电商评价聚合 Agent

## 触发条件
- 评价数 > 1000 
- 需要全局口碑、优缺点、人群洞察
- 选品/详情页优化/客服改进场景

## 工作流
1. **评价采集**:从电商既有评价系统拉取指定商品全量评价
2. **GLM-4-Long 调用**:1M 上下文一次性处理(无需分块)
3. **结果后处理**:JSON 解析、置信度过滤、去重
4. **写入画像**:口碑图谱写入商品画像库(可选)

## 关键参数
- `product_id`:商品 ID
- `reviews`:评价文本列表(可上万条)

## 成本估算
- 假设 GLM-4-Long 定价 0.01 元/千 tokens:
  - 1 万条评价(每条 100 字)约 100 万字  150  tokens,成本约 15 
  - 1 千条评价约 15  tokens,成本约 1.5 

## 验证指标
- 优缺点召回率(人工标注 100 商品)> 85%
- 人群洞察覆盖率 > 80%
- 情感分布准确率 > 90%
- 单商品处理时延 < 180 

## 失败回退
- GLM-4-Long 调用失败  退化为 GLM-4-Plus 分块处理
- JSON 解析失败  退化为纯文本摘要

## 依赖
- 智谱 BigModel API(GLM-4-Long + GLM-4-Plus 兜底)
- 电商既有:评价系统、商品画像库

SKILL 3:ecommerce-autoglm-adapter

# ~/.workbuddy/skills/ecommerce-autoglm-adapter/SKILL.md
---
name: ecommerce-autoglm-adapter
summary: "AutoGLM 适配层——封装智谱 API,提供可替换的高阶任务规划能力"
version: 0.1.0
author: ecommerce-algo-team
tags: [adapter, autoglm, ecommerce, architecture]
read_when:
  - 需要调用 AutoGLM 沉思做任务规划
  - 既有 Agent 框架能力不足需增强
  - 数据合规要求切换到自部署 GLM-Z1-Air
---

# AutoGLM 适配层

## 设计原则
1. **接口抽象**:电商业务 Agent 只与 `RuminationAdapter` 交互,不感知底层
2. **后端可换**:智谱云端 API(默认) / 自部署 GLM-Z1-Air(合规备选)
3. **可观测**:每步思考、工具调用、token 消耗全记录
4. **可回退**:超时/失败时退化为既有规则引擎流程

## 后端切换
通过环境变量 `ECOMMERCE_RUMINATION_MODE` 切换:
- `cloud`(默认):走智谱 BigModel API
- `local`:走自部署 GLM-Z1-Air(vLLM)

## 成本对比
| 方案 | 单次任务成本 | 时延 | 合规 |
|---|---|---|---|
| 智谱云端 GLM-Z1-Rumination | 约 0.1-0.5 元 | 30-120 秒 | 数据出云 |
| 自部署 GLM-Z1-Air(32B) | 约 0.02 元(电费+折旧) | 60-180 秒 | 数据不出云 |
| 既有规则引擎 | 约 0.01 元 | <1 秒 | 已合规 |

## 验证指标
- 任务规划成功率 > 90%
- 单次任务 token 消耗 < 5000
- 后端切换零代码改动
- 失败回退成功率 > 95%

## 依赖
- 智谱 BigModel API(GLM-Z1-Rumination + GLM-Z1-Air)
- 自部署:vLLM + 1  A100 40G(GLM-Z1-Air 32B 量化后约 30GB 显存)
- 电商既有:规则引擎(作为回退)

第五部 · 风险与替代方案

5.1 厂商锁定风险

风险:深度绑定智谱 API,未来若智谱涨价、停服、变更接口,电商被动。

缓解

  • A 路线建适配层(RuminationAdapter),底层可切换自部署 GLM-Z1-Air 或 LangGraph 自研
  • B 路线用 MCP 协议解耦,AutoGLM-Web / GLM-4-Long 工具可替换为 Browser Use / Claude Sonnet
  • 关键业务逻辑不写死在智谱 SDK 上,全部走 OpenAI 兼容接口

5.2 成本风险

风险:AutoGLM 沉思多步推理消耗大,月度成本不可控。

缓解

  • 三档分层:GLM-4-Flash(免费)预筛 → GLM-4-Air(0.5 元/百万)主力 → GLM-4-Plus(5 元/百万)精处理
  • AutoGLM 沉思仅用于高阶任务(C2/C5/C6/C7),基础任务走既有规则引擎
  • 自部署 GLM-Z1-Air(开源 32B)作为成本上限兜底
  • 设月度 token 预算告警,超阈值自动降级

5.3 性能风险

风险:电商实时性要求(客服 <3 秒响应、搜索 <500ms)vs AutoGLM 沉思多步推理慢(30-120 秒)。

缓解

  • 沉思任务设计为"后台任务"——先反馈"正在研究,预计 X 分钟",完成后推送
  • 实时客服走 GLM-4-Flash(<1 秒)或 GLM-4-AirX(极速推理)
  • 选品研究可"预生成"——基于运营日历提前生成品类研究报告

5.4 合规风险

风险:智谱大模型处理用户评价、订单数据、合同信息,可能涉及数据出境、用户隐私合规。

缓解

  • 关键数据(用户 PII、订单、合同)走自部署 GLM-Z1-Air,数据不出云
  • 非关键数据(公开竞品价格、公开评价)可走智谱云端 API
  • 所有 LLM 输出过既有内容安全审核(C11 工具)
  • 与智谱签 DPA(数据处理协议),明确数据用途限制
  • 用户评价聚合前脱敏(去除用户 ID、昵称等 PII)

5.5 替代方案对比

替代方案 适用场景 优点 缺点
AutoGLM 沉思 + GLM-4-Long(本方案) 高阶任务规划 + 长文本 中文优化、价格低、能力全 厂商绑定、沉思慢
LangGraph + GPT-4o 最大灵活性 不绑定、生态广 英文优化、成本高(GPT-4o)
AgentScope + 通义千问 阿里生态深度集成 开源、阿里背书 通义千问能力略逊 GLM-4-Plus
自研 + DeepSeek 完全自主 可控、成本极低 研发投入大、迭代慢
扣子(Coze) 非技术团队 零代码、快 闭源、灵活性差

推荐:本方案(AutoGLM 沉思 + GLM-4-Long)作为主选,LangGraph + GPT-4o 作为备选(适配层预留接口)。


第六部 · 落地路线图(4 阶段)

阶段 1:能力封装期(第 1-4 周)

目标:完成 AutoGLM 适配层 + MCP 工具封装

交付物

  1. RuminationAdapter 适配层(含云端 + 自部署双后端)
  2. autoglm_web_tool MCP 工具
  3. glm_long_extract MCP 工具
  4. EcommerceMCPServer 服务端骨架
  5. 单元测试覆盖核心路径

验证指标

  • 适配层后端切换零代码改动
  • MCP 工具可被标准 MCP 客户端调用
  • 单元测试覆盖率 > 80%

阶段 2:Agent 构建期(第 5-8 周)

目标:完成 P0 四个结合点的 Agent 实现

交付物

  1. ProductResearchAgent(C2 选品研究)
  2. CompetitivePriceMonitor(C1 竞品监控)
  3. ReviewAggregationAgent(C3 评价聚合)
  4. DocExtractionAgent(C4 文档抽取)
  5. 5 个 Prompt 模板上线
  6. 3 个 SKILL 雏形文档

验证指标

  • C2 选品研究报告产出率 > 90%
  • C3 评价聚合优缺点召回率 > 85%(人工标注 100 商品)
  • C1 竞品价格准确率 > 90%
  • C4 合同条款抽取准确率 > 85%
  • 端到端时延 < 120 秒(含沉思)

阶段 3:场景打磨期(第 9-12 周)

目标:在真实业务场景中验证产品形态

交付物

  1. 接入电商既有业务系统(搜索/推荐/库存/评价)
  2. 优化 Prompt 模板(基于运营反馈)
  3. 完成成本与性能调优
  4. 完成 D2 决策点评估(既有规则引擎 vs AutoGLM 沉思)

验证指标

  • 运营满意度(5 分制)> 4.0
  • 月度 token 成本 < 预算阈值
  • 沉思任务回退率 < 10%
  • D2 决策报告产出

阶段 4:商业试点期(第 13-16 周)

目标:完成首个业务线全面接入

交付物

  1. MCP 服务端对业务线开放
  2. 业务线接入文档
  3. 商业试点报告
  4. P1 优先级结合点启动规划

验证指标

  • 接入业务线 ≥ 1
  • API 调用稳定性 > 99.5%
  • 业务线满意度 > 4.0
  • ROI 验证(选品采纳率、评价分析效率提升)

结论

回到摘要三句:

  1. AutoGLM 是"分层补强的工具箱",不是"全盘替代方案"。电商六大既有能力没一项该被直接换掉;AutoGLM 沉思补"深度研究型任务"的缺(选品/营销/复杂客服),AutoGLM-Web 做"竞品抓取兜底",GLM-4-Long 撑长文本理解(评价/合同)。

  2. 架构选型走 D 混合模式——沉思走 A 路线(深度集成 + 适配层,保留可替换),Web/Long 走 B 路线(MCP 工具化解耦)。既补 Agent 框架的缺,又不全盘绑死智谱。

  3. P0 四个结合点 3 个月内可见效:竞品价格监控、选品研究编排、评价聚合分析、长文档抽取。这四点价值高、难度中低,能快速验证 Agent 化转型的可行性。

一句话总结:电商平台该接 AutoGLM,但走"沉思深度集成做适配层、Web/Long 工具化解耦"的混合路径,P0 四点 3 个月内见效,为 Agent 化转型提供实证。


附录 A:参考来源汇总

官方一手来源

  1. autoglm.zhipuai.cn — AutoGLM 报告助手官网
  2. bigmodel.cn — 智谱 AI 开放平台
  3. docs.bigmodel.cn/cn/guide/models/text/glm-4 — GLM-4 模型文档
  4. docs.bigmodel.cn/cn/guide/models/text/glm-4-long — GLM-4-Long 文档
  5. docs.bigmodel.cn/cn/coding-plan/best-practice/mcp-and-agent — MCP 支持文档
  6. github.com/zai-org/Open-AutoGLM — Open-AutoGLM 开源仓库
  7. github.com/THUDM/CogAgent — CogAgent 开源仓库

arXiv 论文

  1. arXiv:2411.00820 — AutoGLM: Autonomous Foundation Agents for GUIs
  2. arXiv:2404.03648 — AutoWebGLM(KDD 2024)
  3. arXiv:2312.08914 — CogAgent(CVPR 2024 Highlight)

媒体与社区报道

  1. 智源社区 — 智谱发布首个具备深度研究和操作能力的 AI Agent
  2. 智源社区 — 智谱一口气开源 6 款模型
  3. 36氪 — 智谱 AutoGLM 2.0
  4. 知乎 — GLM-4-Plus 价格直降 90%

附录 B:未查到/需进一步核实的信息清单

项目 说明 影响范围
AutoGLM-Web 独立 HTTP API 官方未公开独立接口 影响 C1 竞品抓取实现,需用 GLM-4 + 浏览器框架近似
GLM-4-Long 具体定价 官方文档未明确 影响 C3 评价聚合成本估算
智谱 A2A 协议支持 未检索到官方声明 影响 A2A 接入策略
AutoGLM-Phone-9B 开源协议 README 未明确协议名称 影响商用合规
AutoGLM 沉思 API 独立调用 未公开独立 API 影响 C2/C5 实现路径,需用 GLM-Z1-Rumination API 替代

附录 C:术语小释

AutoGLM 沉思(AutoGLM Rumination):智谱 2025 年 4 月发布的深度研究 Agent,集 Deep Research 与 Operator 于一体。底层是 GLM-Z1-Rumination 模型(32B,已开源)。沉思者,反复思考之意——模型不急于给答案,而是多步推理、调用工具、自我验证。

MCP(Model Context Protocol):Anthropic 2024 年 11 月提出的开放协议,标准化 LLM 与外部工具/数据源的连接。好比"AI 界的 USB-C 接口"——任何 LLM 都能通过 MCP 调用任何工具。智谱 GLM-4/4.5/5 系列原生支持。

A2A(Agent-to-Agent):Google 2025 年 4 月提出的开放协议,标准化 Agent 之间的通信。MCP 是"Agent 调工具",A2A 是"Agent 找 Agent"。

ReAct:Reason + Act 范式,Agent 先思考(Reason)再行动(Act)的循环。Open-AutoGLM 即典型 ReAct 单 Agent。

Agentic 购物助手:智能体化购物。传统搜索像自动售货机——输入关键词出商品列表,过程是死的。Agentic 购物像懂你的导购——你说"帮我选一款适合老人用的血压计,预算 300 内",它判断场景、跨平台比价、聚合评价、筛选、生成对比报告、推荐 Top3。区别在于多了"理解意图 + 规划执行"。


讨论回复

加载中...
正在加载回复...

正在加载回复...

推荐
智谱 GLM-5 已上线

我正在智谱大模型开放平台 BigModel.cn 上打造 AI 应用,智谱新一代旗舰模型 GLM-5 已上线,在推理、代码、智能体综合能力达到开源模型 SOTA 水平。

领取 2000万 Tokens 通过邀请链接注册即可获得大礼包,期待和你一起在 BigModel 上畅享卓越模型能力
登录