- AI Engineering
- Posts
- Turn Claude Code Into a Document Processing Agent
Turn Claude Code Into a Document Processing Agent
... PLUS: The Harness Behind Better Agents
In today’s newsletter:
Turn Claude Code Into a Document Processing Agent
The Harness Behind Better Agents
Reading time: 5 minutes.
ADE Document Processing Skills teaches agentic coding assistants how to write Python scripts that parse, extract, classify, and build processing pipelines for documents using LandingAI's Agentic Document Extraction.
The core difference from traditional OCR: ADE is vision-first. It understands layout, not just text, so it handles complex tables, dense forms, multi-column pages, and scanned documents the way a human would read them.
Every extracted value comes with bounding boxes, page coordinates, and confidence scores traceable back to the source document.
Two skills make up the system.
Document-extraction covers parsing into structured Markdown, extracting specific fields with JSON schemas or Pydantic models, splitting and classifying multi-document batches, and processing files up to 1GB or 6,000 pages asynchronously.
Document-workflows covers the end-to-end patterns, batch processing in parallel, classify-then-extract pipelines, RAG preparation with chunking and embeddings, exporting to DataFrames or Snowflake, and building Streamlit UIs for interactive processing.
Once installed, you just describe what you need in plain English. Ask your agent to extract line items from a folder of invoices, pull every figure from a scientific paper as PNGs, or read account statements across pages into a single CSV. The skill handles dependency installation, API client setup, and error handling automatically.
Installation
Install the skills in Claude Code:
The same skills can also be used with Cursor and other coding agents that support the Agent Skills convention.
When an agent breaks on a task, the natural instinct is to improve the model: fine-tune it, swap it for a better one, adjust the prompt. The model is what reasons. The model must be what's wrong.
Life-Harness challenges that instinct directly. Most failures in agent environments don't come from the model. They come from mismatches between the model and the environment it's operating in.
The Problem Life-Harness Addresses
Deterministic environments, think customer service workflows, task automation systems, have rigid rules. The agent has to call tools in the right order, handle errors the right way, and respect the constraints the environment enforces.
When an agent fails here, it's usually not because the model can't reason. It's because the harness around it doesn't translate the model's reasoning into actions the environment accepts. The model decides correctly. The interface breaks it.
Life-Harness addresses this directly. It improves frozen LLM agents by evolving the harness, with no changes to model weights and no changes to the evaluation environment.
How It Works
Life-Harness watches an agent fail. It collects training trajectories, identifies recurring failure patterns, and converts them into reusable interventions baked into the harness.
Four types of interventions get built:
Environment contracts: formal specifications of what the environment actually expects, so the agent stops violating unstated rules
Procedural skills: reusable multi-step sequences for recurring task patterns the agent handles repeatedly
Action realization: precise mappings from the agent's abstract intentions to the exact API calls the environment accepts
Trajectory regulation: guardrails on the agent's decision sequence to prevent known failure paths
Once built, the harness stays fixed during evaluation. The agent is still frozen. The harness does the work.
The Results
Tested across seven deterministic environments from τ-bench, τ²-bench, and AgentBench, Life-Harness improved 116 out of 126 model-environment settings across 18 different model backbones. The average relative improvement was 88.5%.
That improvement comes without touching a single model weight.
Why This Matters
The method positions runtime harness adaptation as a complementary alternative to model-centric training. Not a replacement. A complement.
The implication for teams building agents in production: before reaching for fine-tuning or a model upgrade, look at the interface. Document the environment contracts. Encode the recurring failure patterns. Build the action mappings.
The harness is where many failures actually live. That's also where the fix is.
That’s all for today. Thank you for reading today’s edition. See you in the next issue with more AI Engineering insights.
PS: We curate this AI Engineering content for free, and your support means everything. If you find value in what you read, consider sharing it with a friend or two.
Your feedback is valuable: If there’s a topic you’re stuck on or curious about, reply to this email. We’re building this for you, and your feedback helps shape what we send.
WORK WITH US
Looking to promote your company, product, or service to 200K+ AI developers? Get in touch today by replying to this email.


