Nutrient Agent Skill

Document processing with Nutrient DWS API: convert (PDF/DOCX/XLSX/PPTX/HTML/images), extract text/tables, OCR (20+ languages), redact PII (pattern

What Is This?

Overview

The Nutrient Agent Skill is a document processing integration built on the Nutrient Document Web Services (DWS) API. It enables automated workflows for converting, extracting, analyzing, and redacting content across a wide range of document formats. By wrapping the Nutrient DWS API into a callable skill, it allows developers and AI agent frameworks to perform complex document operations through simple, structured function calls.

This skill supports format conversion between PDF, DOCX, XLSX, PPTX, HTML, and common image types. Beyond conversion, it provides optical character recognition across more than 20 languages, structured table extraction, and pattern-based personally identifiable information (PII) redaction. These capabilities make it suitable for both standalone automation scripts and multi-step AI agent pipelines that need to handle real documents reliably.

The skill is published under the PSPDFKit Labs organization and is designed to integrate with agent frameworks such as LangChain, AutoGen, or custom orchestration layers. It abstracts the underlying HTTP calls to the Nutrient DWS API, exposing each capability as a discrete, composable action that agents or developers can invoke programmatically.

Who Should Use This

  • Backend developers building document automation pipelines that require format conversion or content extraction at scale.
  • AI and LLM application developers who need agents to read, process, or transform documents as part of a reasoning workflow.
  • Data engineers who extract structured table data from PDFs or spreadsheets for downstream processing or analysis.
  • Compliance and legal teams that need automated PII redaction from contracts, reports, or scanned documents before sharing.
  • DevOps and platform engineers integrating document processing into CI/CD workflows or serverless functions.
  • Product teams building SaaS features that require document handling without managing a dedicated document processing service.

Why Use It?

Problems It Solves

  • Converting documents between formats manually is time-consuming and error-prone, especially at volume. This skill automates format conversion with a single API call.
  • Extracting text or tables from scanned PDFs requires OCR, which is difficult to set up and maintain independently. The skill provides ready-to-use OCR across 20-plus languages.
  • Removing PII from documents before sharing or archiving requires consistent pattern matching. Manual redaction introduces risk; this skill applies rule-based redaction automatically.
  • Integrating document capabilities into AI agents typically requires custom HTTP wrappers. This skill provides a pre-built, agent-compatible interface.
  • Handling diverse input formats in a single pipeline is complex. This skill normalizes document handling across PDF, Office formats, HTML, and images.

Core Highlights

  • Converts between PDF, DOCX, XLSX, PPTX, HTML, PNG, JPEG, and TIFF formats.
  • Extracts plain text from documents for downstream NLP or search indexing.
  • Extracts structured tables from PDFs and Office documents as JSON or CSV.
  • Performs OCR on scanned documents and images in 20-plus languages.
  • Redacts PII using configurable regex patterns for emails, phone numbers, and custom identifiers.
  • Designed for agent frameworks with structured input and output schemas.
  • Backed by the production-grade Nutrient DWS API with enterprise reliability.

How to Use It?

Basic Usage

Install the skill and configure your Nutrient DWS API key before invoking any action.

pip install nutrient-agent-skill
from nutrient_agent_skill import NutrientSkill

skill = NutrientSkill(api_key="your_dws_api_key")

## Convert a DOCX file to PDF
result = skill.convert(input_path="report.docx", output_format="pdf")
print(result["output_path"])

Specific Scenarios

Scenario 1: OCR on a scanned invoice

text = skill.ocr(input_path="invoice_scan.png", language="english")
print(text["content"])

Scenario 2: Extract tables from a financial PDF

tables = skill.extract_tables(input_path="financials.pdf", output_format="json")
for table in tables["data"]:
    print(table)

Real-World Examples

A legal firm uses the redaction action to strip email addresses and phone numbers from client contracts before sending them to external reviewers. A data pipeline ingests monthly XLSX reports, converts them to PDF for archiving, and extracts table data for a database load. An AI agent reads scanned government forms using OCR and passes the extracted text to an LLM for classification.

When to Use It?

Use Cases

  • Automating document format conversion in content management systems.
  • Building AI agents that read and reason over uploaded documents.
  • Extracting structured data from reports for analytics pipelines.
  • Redacting sensitive information before document sharing or archiving.
  • Processing multilingual scanned documents in global operations.
  • Generating PDF exports from HTML templates in web applications.
  • Normalizing mixed-format document uploads in SaaS platforms.

Important Notes

Requirements

  • A valid Nutrient DWS API key obtained from the Nutrient developer portal.
  • Python 3.8 or higher for the skill package.
  • Network access to the Nutrient DWS API endpoints.