Skill: laiye-adp/agentic-doc-parse-and-extract (version 1.10.3)

--- name: agentic-doc-parse-and-extract description: Enables AI-powered parsing and key information extraction from high-frequency documents including invoices, orders, receipts, long texts, and common Chinese identity & credential documents. Supports reusable custom templates for non-standard business files. Features batch concurrent processing to automate document workflows for finance, administration, HR data entry and other departments. --- # agentic-doc-parse-and-extract Skill agentic-doc-parse-and-extract is an official command-line tool released by Laiye Technology's ADP (Agentic Document Processing) product, enabling both humans and AI agents to invoke ADP capabilities in the terminal for document parsing and extraction. ## Quick Start Guide for AI Agents ### Core Workflow 1. **Install dependencies**: On first execution, install the ADP CLI tool and dependencies by following the instructions in [references/examples.md](references/examples.md). 2. **Discover commands**: Run `adp schema` to get the machine-readable JSON spec of all commands, parameters, types, and defaults. 3. **Authentication**: On first execution, run `adp config get` to verify credentials. If no valid configuration exists, prompt the user to provide an API Key. 4. **Check Application**: On first execution, retrieve the application list via `adp app-id list`. For subsequent executions, prioritize `adp app-id cache` (cached in context). If the cache is unavailable, refresh it by calling `adp app-id list` again. 5. **Execute**: Run `adp extract url <URL> --app-id <ID>` or `adp parse url <URL> --app-id <ID>`. 6. **Query**: Check results asynchronously with `adp extract query <task_id>` or `adp parse query <task_id>`. 7. **Error handling**: When a command fails, parse the stderr JSON to determine error type and recovery action. See [references/error-handling.md](references/error-handling.md). ### Common Scenarios → Command Mapping | User Intent | Recommended Command | Handling Rules | | :---------- | :------------------ | :------------- | | - Read full document content<br>- Parse layout & structure<br>- Convert document to text<br>- Process / analyze full document | `adp parse` | - Sync processing for small files<br>- Async processing (`--async` parameter) for files >20MB or >200 pages | | - Extract key fields (amount, date, name, ID, etc.)<br>- Output structured results (JSON/table) | `adp extract` | - Use Extract directly, **no need to parse first**<br>- Use matched existing app<br>- Create a custom extraction app if the document type is not in the known app list | | Batch processing of local files | `adp extract local <folder path>` <br> `adp parse local <folder path> ` | Batch processing can accept files from the local folder. | | Batch processing of URL files | `adp extract url <URL list file path>` <br> `adp parse url <URL list file path> ` | If you need to process multiple URLs in a batch, you can first save the list of URLs in a text file, and then input the corresponding URL of this text file to achieve batch processing at once. | Note: - The `adp extract` command has built-in document parsing capabilities. After ADP automatically parses the document, it performs structured extraction. Therefore, when users need to extract the structured content of the document, there is no need to use apd for parsing. - URL list file format: A plain text file where each line is a URL pointing to a document to be processed. ### Quick Reference for Common Commands ```bash # Command Discovery (for Agent introspection) adp schema # Configuration Check adp config get # Query Applications (First Use) adp app-id list # Document Extraction (Invoice/Receipt) adp extract url <file URL> --app-id <app_id> # Document Parsing (Long Document) adp parse url <file URL> --app-id <app_id> # Base64 Input adp extract base64 <base64_string> --app-id <app_id> --file-name invoice.pdf adp parse base64 <base64_string> --app-id <app_id> --file-name document.pdf # Asynchronous Query adp extract query <task_id> adp parse query <task_id> adp parse query <task_id1> <task_id2> --watch # batch query with auto-poll # Batch Processing adp extract local <folder path> --app-id <app_id> --export <folder path> --concurrency 2 adp parse local <folder path> --app-id <app_id> --export <folder path> --concurrency 2 ``` ## Performance Optimization Suggestions - **Reuse APP_ID**: Cache it in the context after one query to avoid calling `app-id list` every time. - **Sync First**: For small files (<20MB), prioritize using synchronous calls to avoid asynchronous polling. - **Batch Processing**: Processes multiple documents via `url <URL list file path>` or `local <folder path>` in a single run, without looped invocations. Default `--concurrency 2`. - **Local Cache**: Store commonly used APP_IDs in environment variables or configuration files. - **Priority Extraction**: If only key information needs to be extracted, use `extract` instead of `parse` (faster). - **Use --retry for batch**: Set `--retry 2` for batch processing to auto-recover from transient failures. - **Use --timeout for large files**: Increase `--timeout` for files >20MB. Default is 900s. --- ## Detailed Product Introduction ### Core Function Definition - **parse**: Parses the entire document to retrieve full text, layout, structure, and content. - **extract**: Extracts specific structured fields from the document, such as amount, date, company name, and order number. ### Application Scenarios - **Long Document Parsing**: Efficiently process long documents with fast parsing speed, accurately extract multiple elements such as text, tables and images, replace manual extraction, and improve efficiency. - **Structured Extraction for Scanned/Photographed Documents**: For scanned documents and photos, complete structured extraction in reading order, generate clear and editable electronic documents, and eliminate manual entry errors. - **Intelligent Invoice Extraction**: After uploading invoice images/documents, AI automatically invokes preset applications to accurately extract 10+ key fields such as invoice number and amount, suitable for financial filing scenarios. - **Intelligent Order Extraction**: Support batch upload of orders from multiple distributors, AI extracts 10+ key fields such as order number and buyer-seller information, automatically identifies currencies, and reduces manual verification costs. - **Domestic ID Document Extraction**: Process in seconds, supporting the identification and extraction of more than 10 common types of documents in China; for example, core information such as name and ID number can be quickly extracted from ID card scans. - **Automatic Splitting and Extraction of Mixed Documents**: Batch upload mixed documents such as contracts and invoices, AI automatically classifies, splits and completes structured extraction to improve processing efficiency. - **Batch Document Processing**: Support batch upload of various business documents, extract information and output standardized structured data, reducing repetitive manual operations. ## Detailed Usage Steps ### Step 1: Obtain the Installation Package For details, see [references/examples.md](references/examples.md) ### Step 2: Obtain and Configure API Key #### 1. Access the ADP Portal to Obtain Credentials We provide independent Public Cloud access addresses for domestic and international users, which need to be configured separately by region. Accessing nearby can better ensure high-speed and stable calls across the network. | Region | Login Address | API Base URL | |-----|----------|--------------| | Chinese Mainland | [https://adp.laiye.com/](https://adp.laiye.com/?utm_source=clawhub) | `https://adp.laiye.com/` | | Overseas Region | [https://adp-global.laiye.com/](https://adp-global.laiye.com/?utm_source=clawhub) | `https://adp-global.laiye.com/` | #### 2. Get API Key after registration/login New users need to register an ADP account first, and after registration, they can get 100 free credits/month - After logging in, click on the personal avatar, and you can directly access the `API_Key` entry. #### 3. Complete the authentication configuration For details, see [references/examples.md](references/examples.md) #### 4. Verify the configuration For details, see [references/examples.md](references/examples.md) **Notes**: 1. If API Key and API Base URL have been configured, the configuration information needs to be stored in environment variables to avoid uploading configuration items every time they are used. 2. If API Key and API Base URL have not been configured yet, they need to be configured according to the above steps. ### Step 3: Upload Documents After completing the authentication of the API Key, guide the user to upload local files or specify the file URL. After the user uploads the document, they can query the supported application scope of ADP and select the appropriate application for document parsing and extraction. If no suitable application is found, they can choose to create a custom extraction application, configure exclusive fields and parsing modes to meet the personalized document processing requirements. ### Step 4: Query Available Applications This function is used to query the built-in applications under the user's account (such as invoices/receipts, orders, common cards and certificates in China region, etc. which are standardized documents). Based on the `app-label`, you can assist in filtering the suitable application IDs. If no suitable application is found, you can choose to create a custom extraction application, configure specific fields and parsing modes to meet the personalized document processing requirements. **Notes**: 1. For the first execution, use `adp app-id list`. For subsequent executions, prefer to use `adp app-id cache` (cache the application ID in the context). If the cache becomes invalid or there are no suitable applications in the cache, call `adp app-id list` again to update the cache. For detailed examples of commands and responses, see [references/examples.md](references/examples.md). ### Step 5: Add custom extraction application Support creating custom extraction applications, and independently add business-specific extraction fields as needed, and improve the detailed description of each field; the system will accurately identify the document content based on the configured fields and definitions, and complete customized information extraction for personalized documents and non-standard forms. For example commands, responses, and detailed parameter descriptions, please refer to [references/examples.md](references/examples.md) ### Step 6: Execute Document Processing ### Single Document Parsing Perform document parsing based on the selected application ID, which will return a formatted JSON result containing information such as document content, element position coordinates, OCR Confidence Level, etc. For examples of commands and responses, please refer to [references/examples.md](references/examples.md) ### Single Document Extraction Perform document extraction based on the selected application ID, which will return a formatted JSON result containing information such as extraction fields, extraction results, and Confidence Level. For examples of commands and responses, please refer to [references/examples.md](references/examples.md) ### Batch Document Processing ADP supports batch processing capabilities. Users can upload multiple file URLs or local folder paths at once, and the system will automatically identify each document type and match the most suitable application for processing, greatly improving the efficiency of batch document processing. For detailed command examples, see [references/examples.md](references/examples.md) **Note**: The number of concurrent requests is limited to 1 for free users, while enterprise users can adjust it according to their needs, with a maximum support of 2. ### Asynchronous Processing (Suitable for Large Documents) ADP provides asynchronous processing capabilities, allowing users to choose asynchronous mode to perform document parsing and extraction. The system will return a task ID, and users can periodically query the task status and results through the query interface, which is suitable for processing complex documents or batch documents with long processing times. If the document uploaded by the user is larger than 20MB or contains more than 200 pages, it is recommended to use the asynchronous processing mode. For examples of commands and responses, see [references/examples.md](references/examples.md) --- ## Complete Command List For a complete list of all available commands with full parameter specs, see [references/commands.md](references/commands.md) ## Response Schema Reference For the output structure of each command (including batch processing output mechanism), see [references/response-schema.md](references/response-schema.md) ## Error Handling Guide For error codes, types, and Agent auto-recovery strategies, see [references/error-handling.md](references/error-handling.md) --- ## Precautions When using ADP output, always present the returned data as-is. Do not modify, add, or remove any fields during extraction or parsing to ensure data integrity. 1. **API Key Security**: Please keep your API Key secure and avoid disclosing it to unauthorized third parties. 2. **API Base URL Configuration**: Select the corresponding address based on the region. For Chinese Mainland, use `https://adp.laiye.com/`, and for overseas regions, use `https://adp-global.laiye.com/` 3. **File Size Limit**: The maximum size of a single file is 50MB 4. **Supported Formats**: .jpg, .jpeg, .png, .bmp, .tiff, .tif, .pdf, .doc, .docx, .xls, .xlsx 5. **Free Quota**: New users receive 100 free credits per month, which are reset at the beginning of each month. Credits can be used for document parsing and extraction processing. 6. **Check Balance**: Run `adp credit` to check the current account's credit balance. 7. **Billing Rules**: - Document parsing: 0.5 credits per page - Invoice/receipt extraction: 1.5 credits per page - Order extraction: 1.5 credits per page - Custom extraction: 1 credit per page 8. **App ID Reuse**: The app ID used by the user can be remembered for direct use next time, eliminating the need to enter the app_id after each query. The app ID under each user is unique and fixed; unless the user deletes the app, the app_id will not change, and the previously queried app_id can be directly used for document processing calls. --- ## Related Resources - **CLI Documentation**: [ADP CLI User Guide](https://laiye-tech.feishu.cn/wiki/YIaawiK2DimisZk5KfDc8a8cnLh) - **API Documentation**: [OpenAPI User Guide](https://laiye-tech.feishu.cn/wiki/S1t2wYR04ivndKkMDxxcp2SFnKd) - **User Guide**: [Public Cloud Operation Manual](https://laiye-tech.feishu.cn/wiki/OfexwgVUQiOpEek4kO7c7NEJnAe) - **Problem Feedback**: [GitHub Issues](https://github.com/laiye-ai/adp-cli/issues) | [REDACTED_SECRET] - **Official Website**: [Laiye Technology](https://laiye.com) --- Copyright © 2026 [Laiye Technology (Beijing) Co., Ltd.] All rights reserved.

path: license.md
content: Commercial License Agreement

Effective Date: [March 30, 2026]
Copyright © 2026 [Laiye Technology (Beijing) Co., Ltd.] All rights reserved.

This “Skill” (referring to the entirety including models, software, code, weights, documentation, data, and related derivative works, “the Product”) is developed and wholly owned by Laiye Technology (Beijing) Co., Ltd. (“Licensor”). The mentioned derivative works refer to new works created by modifying, integrating, fine-tuning, or further developing the Product. Subject to your (“Licensee” or “you”) compliance with the terms of this Agreement, the Licensor grants you a worldwide, royalty-free, non-exclusive license.

1. Licensing

1.1 Free Use and Distribution: The Licensor grants the Licensee a non-transferable, non-exclusive right to freely use, copy, publish, and distribute copies of the Product for non-commercial purposes. The aforementioned "non-commercial purposes" include, but are not limited to:
Personal learning, research, teaching, and evaluation.
Technical exchanges within academic institutions or open-source communities, non-profit projects.
Integration or demonstration in non-commercial products or services.
1.2 Commercial License:	Any activity intended to directly or indirectly obtain commercial benefits, revenue, or consideration (“Commercial Exploitation”) requires the explicit written authorization (i.e., a "Commercial License") from the Licensor. Commercial Exploitation includes, but is not limited to:
Distributing the Product or derivative works thereof in forms such as sales, resale, licensing fees, subscription fees, or other charges.
Providing the Product or derivative works thereof as a SaaS (Software as a Service) to third parties.
Integrating the Product or derivative works thereof, as a core function, into software, hardware, or services intended for sale or lease.
Any for-profit activity that utilizes the functionality or content of the Product to provide services to third parties.

2. Reserved Rights and Ownership

2.1	Ownership, intellectual property rights (including but not limited to copyright, patents, trademarks, trade secrets), and other related rights and interests in the Product (including all copies thereof) belong to the Licensor or its affiliates. This Agreement does not constitute any form of transfer of rights or sale of the Licensor's intellectual property.
2.2	The Licensee may non-commercially distribute unmodified copies of the Product through channels such as open-source platforms, or engage in non-commercial further development, and distribution, provided that this Agreement, the copyright notice, and the original identification are fully retained.
3. Distribution Conditions

When the Licensee distributes or provides the Product, all of the following conditions must be met:
Retention of Notices:	Prominently retain all copyright notices of the Product, the text of this License Agreement, and the disclaimer on distributed copies.
No Misrepresentation:	Should not imply that the Licensor endorses your distribution version.

4. Disclaimer of Warranties

THE PRODUCT IS PROVIDED "AS IS", WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO: THE LICENSOR DOES NOT WARRANT THAT THE PRODUCT IS FREE FROM ERRORS, BUGS, WILL OPERATE PROPERLY, OR IS SUITABLE FOR A PARTICULAR PURPOSE; THE LICENSOR DOES NOT WARRANT THAT USE OF THE PRODUCT WILL NOT INFRINGE UPON THIRD-PARTY RIGHTS; THE LICENSOR SHALL NOT BE LIABLE TO THE LICENSEE OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, OR PUNITIVE DAMAGES ARISING FROM THE USE OF THE PRODUCT.

5. Termination

5.1	This Agreement becomes effective from the Licensee's first use of the Product and continues until terminated.
5.2	If the Licensee violates the restrictions in Article 1 "License Grant" of this Agreement (e.g., unauthorized Commercial Exploitation), this Agreement will terminate automatically without prior notice.
5.3	Upon termination, the Licensee must immediately cease using the Product and destroy all copies of the Product in its possession.

6. Miscellaneous

6.1	The formation, execution, interpretation, and dispute resolution of this Agreement shall be governed by the laws of the People's Republic of China.
6.2	The Licensee shall not assign or transfer any of its rights or obligations under this Agreement without the Licensor's prior written consent.
6.3	This Agreement constitutes the entire agreement between the parties concerning this license matter and supersedes any prior oral or written communications and agreements between the parties regarding this matter.
6.4	Any dispute related to this Agreement shall be settled through friendly negotiation between the parties. If negotiation fails, either party has the right to submit the dispute to the competent court in the place where the Licensor is registered.

For obtaining a Commercial License or if you have any questions, please contact:
[[REDACTED_SECRET]]


The Product is licensed under the Commercial License Agreement.  For commercial use, please contact us to obtain authorization.

path: README-CN.md
content: <div align="center">
<a id="agentic_doc_parse_and_extract"></a>

# 📄 来也智能体文档处理官方CLI (agentic_doc_parse_and_extract)

agentic_doc_parse_and_extract 是来也科技ADP（Agentic Document Processing）产品发布的官方命令行工具，让人类和 AI Agent 都能在终端中调用ADP能力进行文档解析与抽取

[English](README.md) | [简体中文](README-CN.md)

</div>

## 🚀 关于来也ADP

ADP是来也科技公司**智能体文档处理产品 (Agentic Document Processing，简称 ADP)**， 基于大模型的通用理解能力，不依赖规则与标注，具备对多语言、多模态、多场景的通用理解能力；智能体的自主规划与执行，能够理解任务目标、自主规划步骤、调用工具、完成复杂任务；端到端的业务自动化，从文档输入到业务决策再到人机协同，形成完整闭环。

**agentic-doc-parse-and-extract** 是 ADP 官方开源 CLI 工具，同时支持人工终端调用 + AI Skill 自动调用。一条命令即可完成：文档结构化解析 + 关键字段智能抽取，覆盖发票、订单、证件、票据、通用文档全场景，输出标准 JSON，无缝对接自动化与 AI 流程。

---

### 💡 核心功能

agentic-doc-parse-and-extract 聚焦文档全流程智能处理，兼顾人工终端调用与 AI Agent 自动调用，核心功能覆盖解析、抽取、批量处理全场景，无需复杂配置，一条命令即可完成操作：

| 功能名称 | 功能描述 | 最佳场景 |
|---------|------------------|----------|
| **文档解析** | 自动识别 PDF、图片等多格式文档，将杂乱的非结构化内容（如扫描件、手写体、复杂排版文档）转化为标准化结构化数据，保留原始文档层级与关键关联关系 | 将非结构化文档转换为结构化数据，供 LLM 阅读和后续抽取使用 |
| **开箱即用文档抽取** | 基于 ADP 大模型原生 AI 能力，内置发票、收据、订单、中国地区常用证件等标准化抽取模型，无需配置规则、无需人工标注，一键提取各类通用单据关键字段，输出标准 JSON | 应付账款自动化、费用管理、采购自动化、卡证信息快速录入系统 |
| **自定义文档抽取** | 支持自主创建、编辑与管理个性化抽取应用，可针对企业专属单据、行业定制表单配置专属抽取字段与识别逻辑 | 企业专属单据、行业定制表单、非标准化文档的私有化抽取需求 |
| **任务查询** | 支持异步任务提交与状态查询，可快速查看任务执行进度、成功/失败状态，以及任务最终处理结果 | 批量任务处理、异步文档处理、问题排查与处理记录追溯 |
| **应用管理** | 提供完整的应用管理能力，可查看所有可用的抽取应用（系统内置 + 自定义）、查询应用详情、应用标签 | 多场景业务切换、应用全生命周期管控、自定义应用管理 |

---

### 🎯 适用人群

- **AI Agent 开发者：** 通过标准 Skill 快速集成文档解析抽取能力，赋能智能体自动化办公流程
- **企业研发与架构团队：** 统一接入 CLI 工具，低成本落地全品类单据结构化自动化处理
- **财务 & 行政运营团队：** 批量解析发票、收据、报销单，减少人工录入与核对成本
- **业务系统集成方：** 依赖标准化 JSON 输出，无缝对接 ERP、RPA、业务中台等上下游系统
- **内部平台建设者：** 支持本地部署与环境适配，满足企业内网安全与权限管控要求


## 📁 项目文件结构与文件说明

```
agentic-doc-parse-and-extract/
├── skill.md                  # Skill配置与调用说明
├── README.md                 # 来也ADP产品介绍与CLI下载与调用说明
├── references/               # 参数枚举、错误码、JSON返回说明
    ├── examples.md           # 调用与返回示例代码 参数说明
    ├── commands.md           # 所有命令列表
    ├── response-schema.md    # 返回参数说明
    ├── error-handling.md     # 错误与应对措施
├──  License                  # 授权许可
```


## 📋 API Key
### 获取API Key
1. 访问 [ADP 中国地区网址](https://adp.laiye.com/?utm_source=clawhub)、 [ADP 全球地区网址](https://adp-global.laiye.com/?utm_source=clawhub)
2. 注册新账户（新用户每月 100 免费积分）


## 💻 环境与安装
### 支持平台与版本
| 平台 | 最低要求 |
|---------|------------------|
| **Windows** | Windows 10 或更高版本 |
| **Linux** | Ubuntu 18.04+, CentOS 7+, 或主流Linux发行版 |
| **macOS** | macOS 10.14 (Mojave) 或更高版本 |
---

### 安装

  ```bash
  # 方法 1: npm（推荐，全平台通用，国内可通过 npmmirror 镜像加速）
  npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli --registry=https://registry.npmmirror.com/ || npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli

  # 方法 2: Shell 脚本（Linux / macOS，无 npm 环境时使用）
  curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bash

  # 方法 3: PowerShell 脚本（Windows，无 npm 环境时使用）
  Invoke-WebRequest -Uri "https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.ps1" -OutFile "$env:TEMP\adp-init.ps1"; & "$env:TEMP\adp-init.ps1"
  ```

---

## ✨ 核心特性

### 📦 开箱即用产品

| 产品 | 提取内容 | 最佳场景 |
|---------|------------------|----------|
| **文档解析** | 提取文档内的文本、表格、图片、印章等元素 | 将文档转换成结构化数据供LLM阅读 |
| **发票/收据抽取** | 发票号码、日期、供应商、明细项目、总额、税费 | 应付账款自动化、费用管理 |
| **订单抽取** | 采购单号、商品、数量、价格、交付信息 | 采购自动化、电商集成 |
| **卡证抽取** | 身份证、银行卡、驾驶证、营业执照等11种常用卡证 | 卡证信息快速录入系统 |

### 🛠️ 技术能力

- **10+ 种文件格式** ： 覆盖主流图片与办公文档格式（.jpg, .jpeg, .png, .bmp, .tiff, .tif, .pdf, .doc, .docx, .xls, .xlsx）
- **VLM + LLM 双引擎** ： 视觉理解 + 语义提取，实现最大准确率
- **同步与异步模式** ： 所有功能均对外开放同步、异步 API
- **文件限制：** 最大文件大小：50MB
- **批量处理：** 支持文件夹递归处理

### 🌟 产品优势
- 依托来也科技 ADP 大模型核心能力，结合 CLI 工具轻量化特性，打造高效、灵活、易集成的文档处理解决方案，核心优势突出：
- 零门槛上手：无需专业技术背景，无需规则配置与数据标注，内置标准化抽取模型，开箱即用，一条命令完成文档解析与抽取。
- 全场景适配：覆盖发票、收据、订单、证件等通用场景，同时支持自定义扩展，适配企业专属单据、行业定制表单，兼顾通用性与个性化需求。
- 高效集成适配：支持 AI Agent Skill 原生调用、终端手动调用，输出标准 JSON 格式，无缝对接 RPA、ERP、业务中台等上下游系统，降低集成成本。
- 多终端兼容：Windows、macOS、Linux 全平台支持，无需额外安装依赖，配置环境变量后全局可调用，适配本地部署与多场景办公需求。
- 高精度高稳定：基于 ADP 大模型优化，非结构化文档（扫描件、手写体、复杂排版）识别准确率高，支持异步任务管理，保障业务流程稳定运行。

<a id="credit"></a>
### 💰 计费

- **新用户福利：** 每月获得 100 免费积分，不限制使用应用
- **资产消耗规则：**
    | 处理阶段 | 费用 |
    |-----------------|------|
    | 文档解析 | 0.5 积分/页 |
    | 采购订单抽取 | 1.5 积分/页 |
    | 发票/收据抽取 | 1.5 积分/页 |
    | 自定义抽取 | 1 积分/页 |

- **资产充值：** 可直接登录ADP门户网站进行资产充值，我们为国内外用户提供了独立公有云接入地址，需要按区域分开配置，就近访问可更大程度保障全网高速稳定调用。
  - 中国大陆地区[登录](https://adp.laiye.com/?utm_source=clawhub)
  - 非中国大陆地区用户[登录](https://adp-global.laiye.com/?utm_source=clawhub)

  如支付遇到问题，请联系支持邮箱：📧 [REDACTED_SECRET]

## 📜 授权许可

我们采用 开源工具 + 付费服务 的组合模式：CLI 工具完全免费开源，方便大家快速接入；而核心的 ADP 智能解析能力为公有云商业服务，按实际使用量计费，旨在为用户提供高精准、高稳定的文档处理体验。

- **CLI 工具**：MIT License 开源许可，可自由使用、修改和分发
- **ADP 服务**：基于公有云的 AI 文档处理服务，按使用量计费，[计费规则](#credit)

### 💰 免费额度
新用户注册后每月可获得 **100 免费积分**，可体验完整功能


## 📞 支持与联系
- **CLI 使用指南：** [ADP CLI 使用指南](https://laiye-tech.feishu.cn/wiki/Hz3Vw1IQki3YQtk33gLcSdwSndc)
- **API 接口文档：** [Open API 使用指南](https://laiye-tech.feishu.cn/wiki/PO9Jw4cH3iV2ThkMPW2c539pnkc)
- **ADP 产品操作手册：** [公有云操作手册](https://laiye-tech.feishu.cn/wiki/UDYIwG42pisBbFkJI39ctpeKnWh)

- **问题反馈：** [GitHub Issues](https://github.com/laiye-ai-repos/adp-skill/issues)
- **邮箱：** [REDACTED_SECRET]
- **官网：** [来也科技](https://laiye.com)

---

<div align="center">
[⬆ 返回顶部](#agentic_doc_parse_and_extract)

**用 ❤️ 构建智能体 AI 的未来**
版权所有 © 2026 [来也科技（北京）有限公司] 保留所有权利。

</div>


path: README.md
content: <div align="center">
<a id="agentic_doc_parse_and_extract"></a>

# 📄 Laiye Agentic Document Processing CLI (agentic_doc_parse_and_extract)

agentic_doc_parse_and_extract is the official command-line tool released by Laiye Technology's ADP (Agentic Document Processing) product, enabling both humans and AI Agents to invoke ADP capabilities in the terminal for document parsing and extraction.

[English](README.md) | [Simplified Chinese](README-CN.md)

</div>

## 🚀 About Laiye ADP

ADP is Laiye's **intelligent agent document processing product (Agentic Document Processing, referred to as ADP)** , based on the general understanding ability of large models, without relying on rules and annotations, with the general understanding ability of multi-language, MultiModal Machine Learning, and multi-scene; autonomous planning and execution of intelligent agents, able to understand task goals, autonomous planning steps, invoke tools, and complete complex tasks; end-to-end business automation, from document input to business decision-making to human-machine collaboration, forming a complete closed loop.

**agentic-doc-parse-and-extract** is the official open-source CLI tool of ADP, supporting both manual terminal invocation and automatic invocation via AI Skill. With a single command, it can accomplish: structured document parsing + intelligent extraction of key fields, covering all scenarios including invoices, orders, certificates, bills, and general documents, outputting standard JSON, and seamlessly integrating with automation and AI workflows.

---

### 💡 Core Features

agentic-doc-parse-and-extract focuses on intelligent processing of the entire document workflow, taking into account both manual terminal calls and automatic calls by AI Agents. Its core functions cover all scenarios of parsing, extraction, and batch processing, requiring no complex configuration, and operations can be completed with a single command:

| Function Name | Function Description | Optimal Scenario |
|---------|------------------|----------|
| **Document Parsing** | Automatically recognize multi-format documents such as PDFs and images, convert messy unstructured content (e.g., scanned documents, handwritten text, complex layout documents) into standardized Structured Data, while preserving the original document hierarchy and key relationships | Convert unstructured documents into Structured Data for LLM reading and subsequent extraction |
| **Out Of The Box Document Extraction** | Based on the native AI capabilities of the ADP large model, it comes with built-in standardized extraction models for invoices, receipts, orders, commonly used certificates in China, etc. No need to configure rules or manual annotation, one-click extraction of key fields from various types of general documentation, outputting standard JSON | Account Payable automation, expense management, procurement automation, quick entry of card and certificate information into the system |
| **Custom Document Extraction** | Supports independent creation, editing, and management of personalized extraction applications, allowing configuration of exclusive extraction fields and recognition logic for enterprise-specific documentation and industry-customized forms | Private extraction requirements for enterprise-specific documentation, industry-customized forms, and non-standardized documents |
| **Task Query** | Supports asynchronous task submission and status query, enabling quick viewing of task execution progress, success/failure status, and final task processing results | Batch task processing, asynchronous document processing, problem troubleshooting, and processing record tracing |
| **Application Management** | Provides comprehensive application management capabilities, allowing users to view all available extraction applications (system-built + custom), query application details, and manage application tags | Multi-scenario business switching, full lifecycle management of applications, and custom application management |

---

### 🎯 Target Audience

- **AI Agent Developers:** Quickly integrate document parsing and extraction capabilities through standard Skills to empower intelligent agents in automated work processes
- **Enterprise R&D and Architecture Team:** Unified access to CLI tools, enabling low-cost implementation of structured and automated processing for all types of documentation
- **Finance & Administrative Operations Team:** Batch parsing of invoices, receipts, and reimbursement forms, reducing manual entry and verification costs
- **Business System Integrator:** Relying on standardized JSON output, seamlessly connecting with upstream and downstream systems such as ERP, RPA, and Central Product Platform
- **Internal Platform Builder:** Supporting local deployment and environment adaptation to meet the requirements of enterprise intranet security and permission management

## 📁 Project File Structure and File Description

```
agentic-doc-parse-and-extract/
├── skill.md                  # Skill configuration and invocation instructions
├── README.md                 # Introduction to Laiye ADP product and instructions for CLI download and invocation
├── references/               # Parameter enumeration, error codes, and JSON return instructions
    ├── examples.md           # Sample code for invocation and return with parameter explanations
    ├── commands.md           # List of all commands
    ├── response-schema.md    # Return parameter description
    ├── error-handling.md     # Mistakes and what to do about them
├── License                   # License authorization
```

## 📋 API Key
### Get API Key
1. Visit [ADP China Region URL](https://adp.laiye.com/?utm_source=clawhub), [ADP Global Region URL](https://adp-global.laiye.com/?utm_source=clawhub)
2. Register a new account (new users get 100 free credits per month)

## 💻 Environment and Installation
### Supported Platforms and Versions
| Platform | Minimum Requirements |
|---------|------------------|
| **Windows** | Windows 10 or later |
| **Linux** | Ubuntu 18.04+, CentOS 7+, or mainstream Linux distributions |
| **macOS** | macOS 10.14 (Mojave) or later |
---

### Install

 ```bash
  # Method 1: npm (recommended, works on all platforms, China-friendly with npmmirror)
  npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli --registry=https://registry.npmmirror.com/ || npm install -g @laiye-adp/agentic-doc-parse-and-extract-cli
  export PATH="$(npm prefix -g)/bin:$PATH"

  # Method 2: Shell script (Linux / macOS, if npm is not available)
  curl -fsSL https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.sh | bash

  # Method 3: PowerShell script (Windows, if npm is not available)
  Invoke-WebRequest -Uri "https://raw.githubusercontent.com/laiye-ai/adp-cli/main/scripts/adp-init.ps1" -OutFile "$env:TEMP\adp-init.ps1"; & "$env:TEMP\adp-init.ps1"
  ```

---

## ✨ Product & Technical Highlights

### 📦 Out Of The Box Product

| Product | Extracted Content | Optimal Scenario |
|---------|------------------|----------|
| **Document Parsing** | Extract elements such as text, tables, images, seals, etc. from the document | Convert the document into structured data for LLM to read |
| **Invoice/Receipt Extraction** | Invoice number, date, supplier, item details, total amount, taxes | Accounts payable automation, expense management |
| **Order Extraction** | Purchase Order Number, Commodity, Quantity, Price, Delivery Information | Procurement Automation, E-commerce Integration |
| **Card Extraction** | 11 types of commonly used cards and certificates such as ID card, bank card, driver's license, business license, etc. | Quick entry of card and certificate information into the system |

### 🛠️ Technical Capabilities

- **10+ File Formats**: Covers mainstream image and work document formats (.jpg,.jpeg,.png,.bmp,.tiff,.tif,.pdf,.doc,.docx,.xls,.xlsx)
- **VLM + LLM Dual Engines**: Visual understanding + semantic extraction to achieve maximum accuracy
- **Synchronous and Asynchronous Modes**: All functions are open to external synchronous and asynchronous APIs
- **File Restrictions:** Maximum file size: 50MB
- **Batch Processing:** Supports folder recursion processing
### 🌟 Product Advantages
- Relying on the core capabilities of Laiye Technology's ADP large model and combining the lightweight features of CLI tools, we have created an efficient, flexible, and easily integrated document processing solution with prominent core advantages:
- Zero-threshold entry: No professional technical background is required, no rule configuration or data annotation is needed, with a built-in standardized extraction model that is out of the box, and a single command can complete document parsing and extraction.
- Full-scenario adaptation: Covers common scenarios such as invoices, receipts, orders, certificates, etc., while supporting custom extensions to adapt to enterprise-specific documentation and industry-specific forms, taking into account both general and personalized needs.
- Efficient integration and adaptation: Supports native calls of AI Agent Skill and manual calls from terminals, outputs in standard JSON format, seamlessly connects with upstream and downstream systems such as RPA, ERP, and Central Product Platform, reducing integration costs.
- Multi-terminal compatibility: Supports all platforms including Windows, macOS, and Linux, requires no additional installation of dependencies, can be globally called after configuring environment variables, and adapts to local deployment and multi-scenario work requirements.
- High Precision and Stability: Optimized based on the ADP large model, it has high recognition accuracy for unstructured documents (scanned documents, handwritten text, complex layouts), supports asynchronous task management, and ensures the stable operation of business processes.

<a id="credit"></a>
### 💰 Billing

- **New User Benefits:** Receive 100 free credits per month, with no restrictions on application usage
- **Asset Consumption Rules:**
    | Processing Stage | Cost |
    |-----------------|------|
    | Document Parsing | 0.5 points/page |
    | Purchase Order Extraction | 1.5 points/page |
    | Invoice/Receipt Extraction | 1.5 points/page |
    | Custom Extraction | 1 point/page |

- **Asset Recharge:**  You can directly log in to the ADP Portal to recharge assets. We provide independent Public Cloud access addresses for domestic and international users, which need to be configured separately by region. Accessing from a nearby location can better ensure high-speed and stable invocation across the network.
  - Users in Chinese Mainland [Log in](https://adp.laiye.com/?utm_source=clawhub)
  - Users outside Chinese Mainland [Log in](https://adp-global.laiye.com/?utm_source=clawhub)

 If you encounter any issues with payment, please contact the support email: 📧 [REDACTED_SECRET]

## 📜 License

We adopt a combined model of open-source tools + paid services: the CLI tool is completely free and open-source, making it easy for everyone to quickly integrate; while the core ADP intelligent parsing capability is a Public Cloud commercial service, billed based on actual usage, aiming to provide users with a highly accurate and stable document processing experience.

- **CLI Tool**: Open source under the MIT License, freely available for use, modification, and distribution
- **ADP Service**: AI document processing service based on Public Cloud, billed by usage, [Billing Rules](#credit)

### 💰 Free Quota
New users can receive **100 free credits** per month after registration, allowing them to experience full functionality

## 📞 Support and Contact
- **CLI Documentation**: [ADP CLI User Guide](https://laiye-tech.feishu.cn/wiki/YIaawiK2DimisZk5KfDc8a8cnLh)
- **API Documentation**: [OpenAPI User Guide](https://laiye-tech.feishu.cn/wiki/S1t2wYR04ivndKkMDxxcp2SFnKd?from=from_copylink)
- **User Guide**: [Public Cloud Operation Manual](https://laiye-tech.feishu.cn/wiki/OfexwgVUQiOpEek4kO7c7NEJnAe)
- **Problem Feedback**: [GitHub Issues](https://github.com/laiye-ai/adp-cli/issues) | [REDACTED_SECRET]
- **Official Website**: [Laiye Technology](https://laiye.com/en/)

---

<div align="center">
[⬆ Back to Top](#agentic_doc_parse_and_extract)

**Build the Future of Agentic AI with ❤️**
Copyright © 2026 [Laiye Technology (Beijing) Co., Ltd.] All rights reserved.

</div>

Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)