AutoGLM Toolkit (智谱 AI 工具箱)
A comprehensive AI agent toolkit powered by Zhipu AI. Includes 6 capabilities:
- 1. 🌐 Browser Automation — Autonomous browser agent for any web task
- 🔍 Deep Research — Multi-round search + deep reading for structured reports
- 🔎 Web Search — Quick web search with concise results
- 🎨 Image Generation — Text-to-image generation
- 🖼️ Image Search — Search for stock images by keywords
- 📄 Web Page Reader — Extract full-text content from web pages
Authentication
All API calls share the same authentication mechanism.
Token
Obtain via local AutoGLM service or manual configuration.
Signing Headers (required for all requests)
Every request must include these headers:
| Header | Value |
|---|
| INLINECODE0 | INLINECODE1 |
| INLINECODE2 |
Your app ID |
|
X-Auth-TimeStamp | Current Unix timestamp (seconds) |
|
X-Auth-Sign | MD5(
appid +
"&" +
timestamp +
"&" +
secret) |
CODEBLOCK0
1. Browser Automation Agent
Autonomous browser automation agent that can perform any web task.
Capabilities
- - Open web pages, search engines (Baidu/Google/Bing)
- Browse social media (Weibo, Xiaohongshu, Zhihu, Douyin, Bilibili)
- Like, comment, repost, bookmark posts
- Login to websites, fill forms
- Take screenshots, scrape web content
- Online shopping comparisons
- Operate online documents (Feishu Docs, Tencent Docs)
Usage
CODEBLOCK1
Key Parameters
| Parameter | Required | Description |
|---|
| INLINECODE10 | ✅ | Task description (use user's exact words) |
| INLINECODE11 |
Optional | Starting URL for the task |
|
session_id | Optional | Resume previous browser session |
|
auto_approve | Optional | Auto-approve sensitive operations (default: false) |
Session Management
- - Sessions persist in session pool with 12-hour TTL
- Same-site tasks reuse existing sessions
- Different-site tasks open new browser tabs
- Login/captcha always requires manual user interaction
Important Rules
- 1. One task at a time (no concurrent browser tasks)
- Always show screenshots in results
- Default to 5 items when user doesn't specify quantity
- Separate browser operations from non-browser operations (like saving to Excel)
2. Deep Research (深度调研)
Conduct in-depth research on any topic with structured output.
Process
- 1. Decompose: Break topic into 1-2 key search directions
- Search: 1-2 rounds of web search (controlled quantity)
- Deep Read: Open 1-3 important pages for full-text analysis
- Report: Generate structured research report
API Endpoints
CODEBLOCK2
Execution Constraints
- -
web-search max 2 calls - INLINECODE15 max 3 calls
- Show intermediate results after each call
- Stop when sufficient information is gathered
Output Format
# [Topic] 深度调研报告
## 中间发现
## 概述
## 背景
## 现状分析
## 典型案例 / 代表性观点
## 发展趋势
## 总结
## 参考来源
3. Web Search (网络搜索)
Quick web search with structured results.
API
CODEBLOCK4
Response
CODEBLOCK5
Output Requirements
- 1. Summarize search results based on snippets
- Append reference sources with links
4. Image Generation (AI 生图)
Generate images from text descriptions.
API
CODEBLOCK6
Response
CODEBLOCK7
Display result as: 
5. Image Search (搜图)
Search for images by keywords.
API
CODEBLOCK8
Response
{
"code": 0,
"data": {
"results": [{
"original_url": "image_url",
"caption": "description",
"source": "source",
"original_width": 1267,
"original_height": 845
}],
"count": 4
}
}
6. Web Page Reader (网页阅读)
Extract full-text content from a web page URL.
API
CODEBLOCK10
Response
CODEBLOCK11
Output Requirements
- 1. Extract
data.text as page content - Summarize or display based on user's goal
- Never fabricate content on API error
API Quick Reference
| Capability | Endpoint | Method |
|---|
| Web Search | INLINECODE18 | POST |
| Open Link |
/skills/open-link | POST |
| Generate Image |
/skills/generate-image | POST |
| Search Image |
/skills/search-image | POST |
Base URL: https://autoglm-api.zhipuai.cn/agentdr/v1/assistant
Notes
- - All APIs use the same authentication signature mechanism
- Python 3 with standard library only (no extra dependencies)
- Particularly effective for Chinese internet content
- Browser agent requires Chromium-based browser with AutoClaw extension
AutoGLM Toolkit (智谱 AI 工具箱)
由智谱 AI驱动的综合性AI智能体工具包。包含6大能力:
- 1. 🌐 浏览器自动化 — 可执行任意网页任务的自主浏览器智能体
- 🔍 深度调研 — 多轮搜索+深度阅读,生成结构化报告
- 🔎 网络搜索 — 快速搜索并返回简洁结果
- 🎨 AI生图 — 文本生成图像
- 🖼️ 搜图 — 按关键词搜索图库图片
- 📄 网页阅读 — 提取网页全文内容
认证方式
所有API调用共享同一认证机制。
Token
通过本地AutoGLM服务或手动配置获取。
签名头(所有请求必填)
每个请求必须包含以下请求头:
| 请求头 | 值 |
|---|
| Authorization | Bearer <token> |
| X-Auth-Appid |
您的应用ID |
| X-Auth-TimeStamp | 当前Unix时间戳(秒) |
| X-Auth-Sign | MD5(appid + & + timestamp + & + secret) |
python
import hashlib, time
def makeheaders(token, appid, secret):
ts = str(int(time.time()))
sign = hashlib.md5(f{app_id}&{ts}&{secret}.encode()).hexdigest()
return {
Authorization: fBearer {token},
X-Auth-Appid: app_id,
X-Auth-TimeStamp: ts,
X-Auth-Sign: sign,
Content-Type: application/json
}
1. 浏览器自动化智能体
可执行任意网页任务的自主浏览器自动化智能体。
能力
- - 打开网页、搜索引擎(百度/谷歌/必应)
- 浏览社交媒体(微博、小红书、知乎、抖音、B站)
- 点赞、评论、转发、收藏帖子
- 登录网站、填写表单
- 截图、抓取网页内容
- 网购比价
- 操作在线文档(飞书文档、腾讯文档)
使用方法
bash
将整个任务委托给自主浏览器子智能体
browser
subagent(task=<任务描述>, starturl=<网址>)
关键参数
| 参数 | 必填 | 描述 |
|---|
| task | ✅ | 任务描述(使用用户的原始表述) |
| start_url |
可选 | 任务的起始网址 |
| session_id | 可选 | 恢复之前的浏览器会话 |
| auto_approve | 可选 | 自动批准敏感操作(默认:false) |
会话管理
- - 会话保存在会话池中,TTL为12小时
- 同站点任务复用现有会话
- 不同站点任务打开新的浏览器标签页
- 登录/验证码始终需要用户手动交互
重要规则
- 1. 一次只执行一个任务(无并发浏览器任务)
- 结果中始终展示截图
- 用户未指定数量时,默认展示5条
- 将浏览器操作与非浏览器操作(如保存到Excel)分开处理
2. 深度调研
对任意主题进行深度调研,输出结构化报告。
流程
- 1. 分解:将主题拆分为1-2个关键搜索方向
- 搜索:进行1-2轮网络搜索(控制数量)
- 深度阅读:打开1-3个重要页面进行全文分析
- 报告:生成结构化调研报告
API接口
python
网络搜索
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/web-search
Body: {queries: [{query: <搜索词>}]}
返回:data.results[].webPages.value[] → name / url / snippet
打开链接(深度阅读)
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/open-link
Body: {url: <页面网址>}
返回:data.text → 页面全文内容
执行限制
- - web-search 最多调用2次
- open-link 最多调用3次
- 每次调用后展示中间结果
- 收集到足够信息后停止
输出格式
markdown
[主题] 深度调研报告
中间发现
概述
背景
现状分析
典型案例 / 代表性观点
发展趋势
总结
参考来源
3. 网络搜索
快速搜索并返回结构化结果。
API
python
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/web-search
Body: {queries: [{query: <搜索词>}]}
响应
json
{
code: 0,
data: {
results: [{
webPages: {
value: [
{name: 页面标题, url: 网址, snippet: 摘要}
]
}
}]
}
}
输出要求
- 1. 基于摘要总结搜索结果
- 附上带链接的参考来源
4. AI生图
根据文本描述生成图像。
API
python
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/generate-image
Body: {text: <图像描述>}
响应
json
{
code: 0,
data: {image_url: https://...}
}
展示结果格式:
5. 搜图
按关键词搜索图片。
API
python
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/search-image
Body: {query: <搜索关键词>}
响应
json
{
code: 0,
data: {
results: [{
original_url: 图片网址,
caption: 描述,
source: 来源,
original_width: 1267,
original_height: 845
}],
count: 4
}
}
6. 网页阅读
从网页网址提取全文内容。
API
python
POST https://autoglm-api.zhipuai.cn/agentdr/v1/assistant/skills/open-link
Body: {url: <页面网址>}
响应
json
{
code: 0,
data: {text: 页面全文内容...}
}
输出要求
- 1. 提取 data.text 作为页面内容
- 根据用户目标进行总结或展示
- API出错时绝不编造内容
API快速参考
| 能力 | 接口 | 方法 |
|---|
| 网络搜索 | /skills/web-search | POST |
| 打开链接 |
/skills/open-link | POST |
| 生成图像 | /skills/generate-image | POST |
| 搜索图像 | /skills/search-image | POST |
基础URL:https://autoglm-api.zhipuai.cn/agentdr/v1/assistant
注意事项
- - 所有API使用相同的认证签名机制
- 仅使用Python 3标准库(无额外依赖)
- 对中文互联网内容特别有效
- 浏览器智能体需要基于Chromium的浏览器并安装AutoClaw扩展