pdf-extractor

pdf-extractor is an agent for coding agents from datacore-one/datacore. It costs 33 tokens per session (2,042 once invoked), scanned A, original, MIT.

An agent that extracts organized text and metadata from PDF files while preserving headings, tables, and other document structure. It can identify when a PDF needs OCR, which means reading text from scanned page images.

In plain words
What is it for?
Use it to read PDF files or PDF links, preserve their structure and tables, process larger documents in page ranges, and pass scanned PDFs to OCR when needed.
Why use it?
It turns difficult-to-read PDF content into structured text that other research tools can process, including scanned documents that contain no selectable text.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/datacore-one/datacore/pdf-extractor
Clone the repo
git clone --depth 1 https://github.com/datacore-one/datacore

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pdf-extractor

README.md
[![agentmods](https://agentmods.dev/badge/agents/datacore-one/datacore/pdf-extractor.svg)](https://agentmods.dev/agents/datacore-one/datacore/pdf-extractor)
Your own site
<a href="https://agentmods.dev/agents/datacore-one/datacore/pdf-extractor"><img src="https://agentmods.dev/badge/agents/datacore-one/datacore/pdf-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.02042
Opus 5 $0.00016 $0.01021
Sonnet 5 $0.00007 $0.00408
Haiku 4.5 $0.00003 $0.00204

Measured yesterday against content hash 66d93c490af5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pdf-extractor scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Otherwise, download the PDF first with `curl -sL URL -o /tmp/pdf_extract.pdf`, then process with OpenDataLoader
.datacore/agents/pdf-extractor.md · 262 lines

How it starts

The opening of the file, as written. The whole thing — 262 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PDF Extractor

Engram Injection

Before starting work, load relevant learned patterns:

  1. Preferred: Call plur_admin MCP tool with action = "plur_inject_hybrid", prompt = your task description, scope = agent:pdf-extractor
  2. Fallback: If MCP is unavailable, read .datacore/state/agent-engrams/pdf-extractor.md for compiled engrams

Engrams encode learned behavioral patterns that improve task quality.

Agent Context

When to Reference This Agent

Called by: knowledge-extractor when input is a PDF file (.pdf extension or PDF URL)

Purpose: Extract clean, structured text from PDFs with structure preservation. This is a content extraction agent, not a knowledge creation agent.

Quick Reference

Question Answer
Who calls me? knowledge-extractor
What do I return? Structured markdown + metadata JSON
My model? haiku (fast extraction)
Max pages per read? 20 (use pages parameter for larger PDFs)

Related DIPs

Related Agents

Agent Relationship
knowledge-extractor Spawns me for PDF inputs
ocr-reader I spawn for scanned/image-only PDFs

Your Role

You are a PDF content extraction specialist. Your only job is to extract text and structure from PDF files and return clean markdown. You do NOT create notes, zettels, or any knowledge artifacts.

Input

You receive a file path or URL to a PDF:

  • path — local file path to PDF
  • url — URL pointing to a PDF (fetch first, then extract)

Workflow

Step 0: Check for OpenDataLoader PDF (preferred engine)

Before using the fallback Read tool method, check if opendataloader-pdf is installed:

python3 -c "import opendataloader_pdf" 2>/dev/null && echo "AVAILABLE" || echo "UNAVAILABLE"

Read the full file on GitHub · 262 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 262 lines · 33 tokens per session scan A 66d93c490af5

Subscribe to this mod's changes

pdf-extractor is an agent published in the GitHub repository datacore-one/datacore (4 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 2,042 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.