Adp Skill
/install adp-skill
\r \r
Laiye Agentic Document Processing (ADP)\r
\r Agentic Document Processing API — convert 10+ file formats(.jpeg,.jpg,.png,.bmp,.tiff,.pdf,.doc,.docx,.xls,.xlsx) to structured JSON/Excel with per-field confidence scores using VLM and LLM.\r \r
Base URL:
https://adp-global.laiye.com/?utm_source=github\r \r
Quick Start\r
\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d '{\r
"app_key": "$ADP_APP_KEY",\r
"app_secret": "$ADP_APP_SECRET",\r
"file_url": "https://example.com/invoice.pdf"\r
}'\r
```\r
\r
Response:\r
```json\r
{\r
"status": "success",\r
"extraction_result": [\r
{\r
"field_key": "invoice_number",\r
"field_value": "INV-2024-001",\r
"field_type": "text",\r
"confidence": 0.95,\r
"source_pages": [1]\r
},\r
{\r
"field_key": "total_amount",\r
"field_value": "1000.00",\r
"field_type": "number",\r
"confidence": 0.98,\r
"source_pages": [1]\r
}\r
]\r
}\r
```\r
\r
## Setup\r
\r
### 1. Get Your API Credentials\r
\r
```bash\r
# Contact ADP service provider to obtain:\r
# - app_key: Application access key\r
# - app_secret: Application secret key\r
# - X-Access-Key: Tenant-level access key\r
```\r
\r
Save your credentials:\r
```bash\r
export ADP_ACCESS_KEY="your_access_key_here"\r
export ADP_APP_KEY="your_app_key_here"\r
export ADP_APP_SECRET="your_app_secret_here"\r
```\r
\r
### 2. Configuration (Optional)\r
\r
**Recommended: Use environment variables** (most secure):\r
```json5\r
{\r
skills: {\r
entries: {\r
"adp-doc-extraction": {\r
enabled: true,\r
// API credentials loaded from environment variables\r
},\r
},\r
},\r
}\r
```\r
\r
**Security Note:**\r
- Set file permissions: `chmod 600 ~/.openclaw/openclaw.json`\r
- Never commit this file to version control\r
- Prefer environment variables or secret stores\r
- Rotate credentials regularly\r
\r
## Common Tasks\r
\r
### Extract from File URL\r
\r
```bash\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d '{\r
"app_key": "'"$ADP_APP_KEY"'",\r
"app_secret": "'"$ADP_APP_SECRET"'",\r
"file_url": "https://example.com/document.pdf"\r
}'\r
```\r
\r
### Extract from Base64\r
\r
```bash\r
# Convert file to base64\r
file_base64=$(base64 -i document.pdf | tr -d '\
')\r
\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d "{\r
\"app_key\": \"$ADP_APP_KEY\",\r
\"app_secret\": \"$ADP_APP_SECRET\",\r
\"file_base64\": \"$file_base64\",\r
\"file_name\": \"document.pdf\"\r
}"\r
```\r
\r
### Extract with VLM Results\r
\r
```bash\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d '{\r
"app_key": "'"$ADP_APP_KEY"'",\r
"app_secret": "'"$ADP_APP_SECRET"'",\r
"file_url": "https://example.com/document.pdf",\r
"with_rec_result": true\r
}'\r
```\r
\r
Access VLM results: `response["doc_recognize_result"]`\r
\r
### Async Extraction (Large Documents)\r
\r
**Create extraction task:**\r
```bash\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract/create/task" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d '{\r
"app_key": "'"$ADP_APP_KEY"'",\r
"app_secret": "'"$ADP_APP_SECRET"'",\r
"file_url": "https://example.com/large-document.pdf"\r
}'\r
\r
# Returns: {"task_id": "task_id_value", "metadata": {...}}\r
```\r
\r
**Poll for results:**\r
```bash\r
curl -X GET "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/extract/query/task/{task_id}" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY"\r
```\r
\r
## Advanced Features\r
\r
### Custom Scale Parameter\r
\r
Enhance VLM quality with higher resolution:\r
```bash\r
# model_params: { "scale": 2.0 }\r
```\r
\r
### Specify Config Version\r
\r
Use a specific extraction configuration:\r
```bash\r
# model_params: { "version_id": "config_version_id" }\r
```\r
\r
### Document Recognition Only\r
\r
Get VLM results without extraction:\r
```bash\r
curl -X POST "https://adp-global.laiye.com/open/agentic_doc_processor/laiye/v1/app/doc/recognize" \\r
-H "Content-Type: application/json" \\r
-H "X-Access-Key: $ADP_ACCESS_KEY" \\r
-H "X-Timestamp: $(date +%s)" \\r
-H "X-Signature: $(uuidgen)" \\r
-d '{\r
"app_key": "'"$ADP_APP_KEY"'",\r
"app_secret": "'"$ADP_APP_SECRET"'",\r
"file_url": "https://example.com/document.pdf"\r
}'\r
```\r
\r
## When to Use\r
\r
### Use ADP For:\r
- Invoice processing\r
- Order processing\r
- Receipt processing\r
- Financial document processing\r
- Logistics document processing\r
- Multi-table document data extraction\r
\r
### Don't Use For:\r
- Video transcription\r
- audio transcription\r
\r
## Best Practices\r
\r
| Document Size | Endpoint | Notes |\r
|---------------|----------|-------|\r
| Small files | `/doc/extract` (sync) | Immediate response |\r
| Large files | `/doc/extract/create/task` (async) | Poll for results |\r
\r
**File Input:**\r
- `file_url`: Prefer for large files (already hosted)\r
- `file_base64`: Use for direct upload (max 20MB)\r
\r
**Confidence Scores:**\r
- Range: 0-1 per field\r
- Review fields with confidence \x3C0.8 manually\r
\r
**Response Structure:**\r
- `extraction_result`: Array of extracted fields\r
- `doc_recognize_result`: VLM results (when `with_rec_result=true`)\r
- `metadata`: Processing info (pages, time, model)\r
\r
## Response Schema\r
\r
### Success Response\r
```json\r
{\r
"status": "success",\r
"message": "string",\r
"extraction_result": [\r
{\r
"field_key": "string",\r
"field_value": "string",\r
"field_type": "text|number|date|table",\r
"confidence": 0.95,\r
"source_pages": [1],\r
"table_data": [...] // for field_type="table"\r
}\r
],\r
"doc_recognize_result": [...], // when with_rec_result=true\r
"extract_config_version": "string",\r
"metadata": {\r
"total_pages": 5,\r
"processing_time": 8.2,\r
"model_used": "gpt-4o"\r
}\r
}\r
```\r
\r
### Error Response\r
```json\r
{\r
"detail": "Error message description"\r
}\r
```\r
\r
## Common Use Cases\r
\r
### Invoice/Receipt Extraction\r
Extracts: invoice_number, invoice_date, vendor/customer_name, currency, vat_rate, total_amount_including_tax, total_amount_excluding_tax, line_items, etc.\r
\r
### Purchase Order Extraction\r
Extracts: order_number, order_date, buyer_name/seller_name, address, total_amount, line_items, etc.\r
\r
## Security & Privacy\r
\r
### Data Handling\r
\r
**Important:** Documents uploaded to ADP are transmitted to `https://adp-global.laiye.com/?utm_source=github` and processed on external servers.\r
\r
**Before uploading sensitive documents:**\r
- Review ADP privacy policy and data retention policies\r
- Verify encryption in transit (HTTPS) and at rest\r
- Confirm data deletion/retention timelines\r
- Test with non-sensitive sample documents first\r
\r
**Best practices:**\r
- Do not upload highly sensitive PII until you've confirmed security posture\r
- Use credentials with limited permissions if available\r
- Rotate credentials regularly (every 90 days recommended)\r
- Monitor API usage logs for unauthorized access\r
- Never log or commit credentials to repositories\r
\r
### File Size Limits\r
\r
- **Max file size:** 50MB\r
- **Supported formats:** .jpeg, .jpg, .png, .bmp, .tiff, .pdf, .doc, .docx, .xls, .xlsx\r
- **Concurrency limit:** Free users support 1 concurrent request, paid users support 2 concurrent requests\r
- **Timeout:** 10 minutes for sync requests\r
\r
### Operational Safeguards\r
\r
- Always use environment variables or secure secret stores for credentials\r
- Never include real credentials in code examples or documentation\r
- Use placeholder values like `"your_access_key_here"` in examples\r
- Set appropriate file permissions on configuration files (600)\r
- Enable credential rotation and monitor usage\r
\r
## Billing\r
\r
| Processing Stage | Cost |\r
|-----------------|------|\r
| Document Parsing | 0.5 credits/page |\r
| Purchase Order Extraction | 1.5 credits/page |\r
| Invoice/Receipt Extraction | 1.5 credits/page |\r
| Custom Extraction | 1 credit/page |\r
\r
**New users:** 100 free credits per month, no application restrictions.\r
\r
## Troubleshooting\r
\r
| Error Code | Description | Common Causes & Solutions |\r
|------------|-------------|---------------------------|\r
| **400 Bad Request** | Invalid request parameters | • Missing `app_key` or `app_secret`\x3Cbr>• Must provide exactly one input: `file_url` or `file_base64`\x3Cbr>• Application has no published extraction config |\r
| **401 Unauthorized** | Authentication failed | • Invalid `X-Access-Key`\x3Cbr>• Incorrect timestamp format (use Unix timestamp)\x3Cbr>• Invalid signature format (must be UUID) |\r
| **404 Not Found** | Resource not found | • Application does not exist\x3Cbr>• No published extraction config found for the application |\r
| **500 Internal Server Error** | Server-side processing error | • Document conversion failed\x3Cbr>• VLM recognition timeout\x3Cbr>• LLM extraction failure |\r
| **Sync Timeout** | Request processing timed out | • Large files should use async endpoint\x3Cbr>• Poll `/query/task/{task_id}` for results |\r
\r
## Pre-Publish Security Checklist\r
\r
Before publishing or updating this skill, verify:\r
\r
- [ ] `package.json` declares `requiredEnv` and `primaryEnv` for credentials\r
- [ ] `package.json` lists API endpoints in `endpoints` array\r
- [ ] All code examples use placeholder values not real credentials\r
- [ ] No credentials or secrets are embedded in `SKILL.md` or `package.json`\r
- [ ] Security & Privacy section documents data handling and risks\r
- [ ] Configuration examples include security warnings for plaintext storage\r
- [ ] File permission guidance is included for config files\r
\r
## References\r
\r
- **API Base URL:** https://adp-global.laiye.com/\r
- **Flow Documentation:** [ADP Flow Index](../../refers/backend/flows/ADP-Flow-Index.md)\r
- **Extraction Flow:** [Document Extraction Flow](../../refers/backend/flows/09-Doc-Extraction-Flow.md)\r
- **Recognition Flow:** [Document Recognition Flow](../../refers/backend/flows/08-Doc-Recognition-Flow.md)\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install adp-skill - After installation, invoke the skill by name or use
/adp-skill - Provide required inputs per the skill's parameter spec and get structured output
What is Adp Skill?
Enterprise-grade agentic document processing API. Accurately extracts key fields and line items from invoices, receipts, orders and more across 10+ file form... It is an AI Agent Skill for Claude Code / OpenClaw, with 208 downloads so far.
How do I install Adp Skill?
Run "/install adp-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Adp Skill free?
Yes, Adp Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Adp Skill support?
Adp Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Adp Skill?
It is built and maintained by anna4lucky-stack (@anna4lucky-stack); the current version is v1.0.0.