简介
通过 EasyDoc REST API 将非结构化文档转换为结构化 JSON 或 Markdown,支持中国 EasyLink 与全球 EasyDoc 双平台,内置 RAG 安全检索策略。
原始描述
Use when tasks need EasyDoc REST API to convert unstructured documents into structured JSON or markdown on either China EasyLink platform or global EasyDoc p...
通过你的 Agent 添加
安装目录:easylink-easydoc-parse/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
easylink-easydoc-parse 是一个面向文档解析的 API 调用技能,专为中国 EasyLink 平台(cn)与全球 EasyDoc 平台(global)设计。用户通过该技能提交异步解析任务,将 PDF、Word 等格式的非结构化文档转换为结构化的 JSON 输出,包含 Markdown 正文、节点树、元数据等字段,便于下游 LLM 流水线或 RAG 检索使用。
技能遵循固定的生命周期:平台选择 → 输入验证 → 提交任务 → 轮询结果 → 输出规范化。支持两种解析模式:中国平台的 easydoc-parse-flash(快速)与 easydoc-parse-premium(高精度),以及全球平台的 lite 模式。文件大小限制为 100MB,通过 multipart/form-data 上传。
显著优点
- 双平台兼容:一套接口同时支持国内 EasyLink(
api.easylink-ai.com)与国际 EasyDoc(api.easydoc.sh),API 路径与参数差异已内部封装。
- 结构化输出稳定:返回标准化的
task_id、status、files 信封,内含 markdown 与 nodes 数组,方便下游消费。
- RAG 安全策略:明确禁止默认全量加载大 JSON,强制优先使用宿主代理的文本搜索工具(如 Grep)进行切片检索,降低上下文膨胀风险。
- 开箱即用脚本:附带
scripts/easydoc_parse.py,支持命令行一键提交、自动轮询、结果保存,且优先从环境变量读取 API Key。
潜在缺点与局限性
- 异步轮询依赖:需外部实现或依赖脚本完成状态轮询,无原生 Webhook 回调机制。
- 平台差异隐性:文件字段名(
files vs file)、结果端点路径、状态枚举值(SUCCESS/COMPLETED/DONE)存在平台特化,需仔细区分。
- RAG 策略强制:若宿主代理未提供搜索工具,技能本身不提供替代搜索实现,可能阻塞检索路径。
- 无内置重试:HTTP 或解析失败时需用户手动处理重试或模式切换建议。
适合人群
- 需要批量将合同、论文、报告等文档结构化的开发者
- 构建 RAG 知识库、需避免全文加载导致 Token 爆炸的 AI 应用团队
- 同时面向中国大陆与海外用户的 SaaS 产品,需统一文档解析层
常规风险
- API Key 泄露:
EASYLINK_API_KEY 与 EASYDOC_API_KEY 需存储于环境变量,避免硬编码。
- 敏感文件传输:文档内容经 HTTPS 上传至第三方平台,需确认合规性。
- 大文件轮询超时:未明确超时阈值,长文档可能导致长时间等待。
- 解析质量波动:OCR 与版式还原依赖云端模型,复杂表格或手写体可能出现错位。
api.easylink-ai.com)与国际 EasyDoc(api.easydoc.sh),API 路径与参数差异已内部封装。task_id、status、files 信封,内含 markdown 与 nodes 数组,方便下游消费。scripts/easydoc_parse.py,支持命令行一键提交、自动轮询、结果保存,且优先从环境变量读取 API Key。- 异步轮询依赖:需外部实现或依赖脚本完成状态轮询,无原生 Webhook 回调机制。
- 平台差异隐性:文件字段名(
filesvsfile)、结果端点路径、状态枚举值(SUCCESS/COMPLETED/DONE)存在平台特化,需仔细区分。 - RAG 策略强制:若宿主代理未提供搜索工具,技能本身不提供替代搜索实现,可能阻塞检索路径。
- 无内置重试:HTTP 或解析失败时需用户手动处理重试或模式切换建议。
适合人群
- 需要批量将合同、论文、报告等文档结构化的开发者
- 构建 RAG 知识库、需避免全文加载导致 Token 爆炸的 AI 应用团队
- 同时面向中国大陆与海外用户的 SaaS 产品,需统一文档解析层
常规风险
- API Key 泄露:
EASYLINK_API_KEY 与 EASYDOC_API_KEY 需存储于环境变量,避免硬编码。
- 敏感文件传输:文档内容经 HTTPS 上传至第三方平台,需确认合规性。
- 大文件轮询超时:未明确超时阈值,长文档可能导致长时间等待。
- 解析质量波动:OCR 与版式还原依赖云端模型,复杂表格或手写体可能出现错位。
- API Key 泄露:
EASYLINK_API_KEY与EASYDOC_API_KEY需存储于环境变量,避免硬编码。 - 敏感文件传输:文档内容经 HTTPS 上传至第三方平台,需确认合规性。
- 大文件轮询超时:未明确超时阈值,长文档可能导致长时间等待。
- 解析质量波动:OCR 与版式还原依赖云端模型,复杂表格或手写体可能出现错位。
技能正文
name: easylink-easydoc-parse
description: "Use when tasks need EasyDoc REST API to convert unstructured documents into structured JSON or markdown on either China EasyLink platform or global EasyDoc platform. Trigger for requests about POST /v1/easydoc/parse and GET /v1/easydoc/parse/{task_id} (cn), POST /api/v1/parse and GET /api/v1/parse/{task_id}/result (global), selecting parse mode (cn: easydoc-parse-flash or easydoc-parse-premium, global: lite), normalizing parse output for LLM pipelines, and handling RAG retrieval against parsed JSON by using the host agent's text-search tool before any full-file loading."
metadata:
short-description: Parse docs via EasyDoc CN and Global REST APIs
openclaw:
requires:
env:
- EASYLINK_API_KEY
- EASYDOC_API_KEY
bins:
- python3
- curl
primaryEnv: EASYLINK_API_KEY
EasyLink EasyDoc Parse
Overview
Overview
Use this skill to call EasyDoc async parsing APIs and return stable structured output. Always follow the same lifecycle: select platform, validate inputs, submit task, poll result, normalize output.
RAG Retrieval
If the parsed output is being used for RAG, do not load the entire JSON file into context by default.
- Use grep-style search first
- If the host agent provides a text-search tool such as
Grep,Search, or equivalent "search within file content" capability, use that tool first. - Prefer grep-style search to locate candidate passages, headings, node ids, table markers, or metadata fields inside parsed JSON.
- Search for user query terms, entity names, date ranges, section headers, and node
typevalues before opening any large file. - Do not introduce a custom in-skill Python search script for this retrieval path.
- Do not shell out to
greporrgif the host agent already exposes an equivalent search tool.
- Read only local slices
- After the search tool identifies relevant hits, read only the matching lines or a narrow surrounding window.
- Extract only the needed nodes, sections, or pages for downstream summarization or embedding.
- Escalate to full-load only when necessary
- Load the full JSON only when the task truly requires global document structure, full-tree reconstruction, or complete export.
- If full-load is required, say why.
Onboarding
If user has no API key, guide first:
cnplatform key flow
- Open
https://platform.easylink-ai.com - Register or sign in
- Enter API key management page and create a key
- Store as
EASYLINK_API_KEY
globalplatform key flow
- Open
https://platform.easydoc.sh - Register or sign in
- Enter API key management page and create a key
- Store as
EASYDOC_API_KEY
When user does not specify platform, ask whether they want cn or global first.
Platform Selection
Choose platform before calling any endpoint:
cnplatform
- Base URL:
https://api.easylink-ai.com - Submit:
POST /v1/easydoc/parse - Poll:
GET /v1/easydoc/parse/{task_id} - File form field:
files - Recommended modes:
easydoc-parse-flash,easydoc-parse-premium
globalplatform
- Base URL:
https://api.easydoc.sh - Submit:
POST /api/v1/parse - Poll:
GET /api/v1/parse/{task_id}/result - File form field:
file - Recommended mode:
lite
Workflow
- Validate request inputs
- Require
api-key from user input or secure environment variable.
- Require parse mode when needed; if omitted in script mode, use platform default (
cn: easydoc-parse-premium, global: lite).
- Validate file type and size (
<= 100MB) using platform-specific extension list.
- If key is missing, return platform-specific onboarding steps and expected env var name.
- Submit async parse task
- Use platform-specific submit URL and form-data file field.
- Include
mode.
- Read
task_id from response.
- Poll task status
- Use platform-specific result endpoint.
- Continue polling while task is pending or processing.
- Stop on terminal status (
SUCCESS, ERROR, FAILED, COMPLETED, DONE) or timeout.
- Normalize output
- Keep raw response as
raw.
- Return stable envelope for downstream consumers:
task_id, status, files.
- Handle failures predictably
- Include
task_id in error reports when available.
- Report HTTP status and response body for API errors.
- For parse failures, suggest mode switch or resubmission.
- Apply RAG-safe retrieval
- When parsed JSON is large, use the host agent's text-search tool or equivalent grep-style retrieval before any full read.
- Avoid pasting or loading entire parsed payloads into context unless the task depends on full-document traversal.
Quick Commands
api-key from user input or secure environment variable.cn: easydoc-parse-premium, global: lite).<= 100MB) using platform-specific extension list.mode.task_id from response.SUCCESS, ERROR, FAILED, COMPLETED, DONE) or timeout.raw.task_id, status, files.task_id in error reports when available.China platform:
curl -X POST "https://api.easylink-ai.com/v1/easydoc/parse" \
-H "api-key: $EASYLINK_API_KEY" \
-F "files=@document.pdf" \
-F "mode=easydoc-parse-premium"
Global platform:
curl -X POST "https://api.easydoc.sh/api/v1/parse" \
-H "api-key: $EASYDOC_API_KEY" \
-F "file=@demo_document.pdf" \
-F "mode=lite"
Bundled Python helper:
python3 scripts/easydoc_parse.py --platform cn --api-key "$EASYLINK_API_KEY" \
--mode easydoc-parse-premium --file ./document.pdf --save ./result-cn.json
python3 scripts/easydoc_parse.py --platform global --api-key "$EASYDOC_API_KEY" \
--mode lite --file ./document.pdf --save ./result-global.json
# key can come from environment if --api-key is omitted
export EASYLINK_API_KEY="your-cn-key"
python3 scripts/easydoc_parse.py --platform cn --file ./document.pdf --save ./result-cn.json
export EASYDOC_API_KEY="your-global-key"
python3 scripts/easydoc_parse.py --platform global --file ./document.pdf --save ./result-global.json
References And Scripts
- Read
references/easydoc-rest-api.md for endpoint-level differences between cn and global.
- Use
scripts/easydoc_parse.py for deterministic submit and polling.
- Script default output is
normalized; use --output-format raw for raw payload only.
- In RAG workflows, prefer the host agent's built-in content search tool on saved JSON results before opening large file sections.
Output Contract
{
"task_id": "string",
"status": "SUCCESS|ERROR|PENDING|PROCESSING|FAILED|COMPLETED|DONE",
"files": [
{
"file_name": "string",
"markdown": "string or null",
"nodes": []
}
],
"raw": {}
}
references/easydoc-rest-api.md for endpoint-level differences between cn and global.scripts/easydoc_parse.py for deterministic submit and polling.normalized; use --output-format raw for raw payload only.{
"task_id": "string",
"status": "SUCCESS|ERROR|PENDING|PROCESSING|FAILED|COMPLETED|DONE",
"files": [
{
"file_name": "string",
"markdown": "string or null",
"nodes": []
}
],
"raw": {}
}
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。