Manus AI Agent
Use the Manus API to create autonomous AI tasks. Manus can browse the web, use tools, and deliver complete results (reports, code, presentations, etc.).
API Base
INLINECODE0
Authentication
Header: INLINECODE1
Set via:
- -
MANUS_API_KEY env var - Or
skills.manus.apiKey in openclaw config
Recommended Workflow
When using Manus for tasks that produce files (slides, reports, etc.):
- 1. Create the task with INLINECODE4
- Poll for completion using the task_id
- Extract output files from the response and download them locally
- Deliver to user via direct file attachment (don't rely on manus.im share links)
Create a Task
CODEBLOCK0
Response:
CODEBLOCK1
Agent Profiles
| Profile | Description | Use for |
|---|
| INLINECODE5 | Standard (default) | Most tasks |
| INLINECODE6 |
Faster, lighter | Quick/simple stuff |
|
manus-1.6-max | Complex, thorough | Deep research/analysis |
Default: Always use manus-1.6 unless user specifies otherwise.
Task Modes
| Mode | Description |
|---|
| INLINECODE9 | Conversational mode |
| INLINECODE10 |
Auto-selects best approach |
|
agent | Full autonomous agent mode (recommended for file creation) |
Get Task Status & Output
CODEBLOCK2
Status values: pending, running, completed, INLINECODE15
Important: When status is completed, check the output array for files:
- - Look for
type: "output_file" entries - Download files from
fileUrl directly - Save locally and send to user as attachments
Extracting Output Files
The task response includes output like:
CODEBLOCK3
Download these files with curl and deliver directly to the user rather than relying on share URLs.
List Tasks
CODEBLOCK4
Best Practices
- 1. Always poll for completion before telling user the task is done
- Download output files locally instead of giving manus.im links (they can be unreliable)
- Use
agent mode for tasks that create files/documents - Set reasonable expectations — Manus tasks can take 2-10+ minutes for complex work
Docs
- - API Reference: https://open.manus.ai/docs
- Main Docs: https://manus.im/docs
Manus AI Agent
使用 Manus API 创建自主 AI 任务。Manus 可以浏览网页、使用工具,并交付完整结果(报告、代码、演示文稿等)。
API 基础地址
https://api.manus.ai/v1
身份验证
请求头:API_KEY:
设置方式:
- - 通过 MANUSAPIKEY 环境变量
- 或在 openclaw 配置中设置 skills.manus.apiKey
推荐工作流程
当使用 Manus 执行生成文件(幻灯片、报告等)的任务时:
- 1. 创建任务,设置 createShareableLink: true
- 轮询任务完成状态,使用 task_id
- 提取输出文件,从响应中获取并下载到本地
- 通过直接文件附件交付给用户(不要依赖 manus.im 分享链接)
创建任务
bash
curl -X POST https://api.manus.ai/v1/tasks \
-H APIKEY: $MANUSAPI_KEY \
-H Content-Type: application/json \
-d {
prompt: 你的任务描述,
agentProfile: manus-1.6,
taskMode: agent,
createShareableLink: true
}
响应:
json
{
task_id: abc123,
task_title: 任务标题,
task_url: https://manus.im/app/abc123
}
Agent 配置文件
| 配置文件 | 描述 | 适用场景 |
|---|
| manus-1.6 | 标准(默认) | 大多数任务 |
| manus-1.6-lite |
更快、更轻量 | 快速/简单任务 |
| manus-1.6-max | 复杂、全面 | 深度研究/分析 |
默认: 除非用户另有指定,始终使用 manus-1.6。
任务模式
自动选择最佳方式 |
| agent | 完全自主的 Agent 模式(推荐用于文件创建) |
获取任务状态与输出
bash
curl https://api.manus.ai/v1/tasks/{task_id} \
-H APIKEY: $MANUSAPI_KEY
状态值:pending(待处理)、running(运行中)、completed(已完成)、failed(失败)
重要: 当状态为 completed 时,检查 output 数组中的文件:
- - 查找 type: output_file 条目
- 直接从 fileUrl 下载文件
- 保存到本地并作为附件发送给用户
提取输出文件
任务响应包含如下输出:
json
{
output: [
{
content: [
{
type: output_file,
fileUrl: https://private-us-east-1.manuscdn.com/...,
fileName: presentation.pdf
}
]
}
]
}
使用 curl 下载这些文件并直接交付给用户,而不是依赖分享 URL。
列出任务
bash
curl https://api.manus.ai/v1/tasks \
-H APIKEY: $MANUSAPI_KEY
最佳实践
- 1. 始终轮询完成状态,然后再告知用户任务已完成
- 将输出文件下载到本地,而不是提供 manus.im 链接(可能不可靠)
- 使用 agent 模式处理创建文件/文档的任务
- 设定合理预期——复杂任务可能需要 2-10 分钟以上
文档
- - API 参考:https://open.manus.ai/docs
- 主文档:https://manus.im/docs