# Sırdaş for developers and agents

Local document parsing for AI agents and ML pipelines. PDF (text or scanned), Word, Excel, PowerPoint, OpenDocument, EPUB, HTML, CSV, email and images become **Markdown, typed documents, fields cited with page and bounding box, tables, form fields, cited chunks and training datasets** — on the user's machine. No file, text or field is uploaded, and no credits or queues.

## Pick your surface

| Surface | Install | Guide |
|---|---|---|
| **MCP server** (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf…) | `claude mcp add sirdas -- npx -y @sirdaspdf/mcp` | [mcp.md](./mcp.md) |
| **CLI** | `npx sirdas factura.pdf` | [cli.md](./cli.md) |
| **Python** (+ LangChain, LlamaIndex) | `pip install sirdas` | [python.md](./python.md) |
| **n8n** | Community node `n8n-nodes-sirdas` | [n8n.md](./n8n.md) |
| **JS/TS library** (Node and browser) | `npm i @sirdaspdf/core` | [core.md](./core.md) |
| **Docker** (air-gapped) | `FROM node:22-slim` + `RUN npm i -g sirdas && sirdas ocr --download-models` | run with `--network none` |
| **Agent Skill** | [SKILL.md](/skills/sirdas-documents/SKILL.md) | tells an agent when and how to use the tools |

## One call does it all

`read_document` (MCP) · `sirdas <file>` (CLI) · `sirdas.read()` (Python) · *Read Document* (n8n):

1. Unlocks restricted PDFs, or asks for the password.
2. Runs local OCR if it is a scan.
3. Identifies the type: `factura`, `contrato`, `historia_clinica`, `cedula`, `rut`, `extracto_bancario`, `certificado`, `hoja_de_vida`.
4. Extracts that type's fields, each with `page`, `evidence` (the source line) and `bbox` (0–1, top-left origin) to highlight it.
5. Reads fillable form fields and checkboxes (☒ ☐, `[x]`, `( )`).
6. Detects several documents glued into one PDF.
7. Anonymizes personal data with consistent placeholders across text, fields and tables.
8. Finds tables, splits cited chunks (stable `id`, `pages`, `section`).
9. Returns `steps` (what it did) and `next_steps` (what to offer).

## Formats

| In | Out |
|---|---|
| PDF, scanned PDF, PNG, JPG | Markdown with page markers, lines with bbox, tables, forms |
| DOCX, ODT, RTF | Markdown with headings (styles or font size), lists, tables |
| XLSX, ODS, CSV, TSV | One table per sheet (Markdown + rows), formula warning |
| PPTX, ODP | One section per slide, with speaker notes |
| EPUB, HTML | Chapters / sections in reading order, tables |
| EML | Subject, from, to, date, decoded body |
| JSON, Markdown, text | As is |

Datasets: `text`, `chat` (OpenAI/TRL), `prompt-completion`, `alpaca` (Axolotl, LLaMA-Factory, Unsloth), `sharegpt`, `langchain`, `llamaindex`, `embeddings`, split train/validation/test **by document**, with a Hugging Face dataset card.

## What it does not do (yet)

Handwriting recognition, charts to data and pen marks on scanned checkboxes need a vision model; Sırdaş does not claim them. Office files are read for content, not re-rendered with their visual layout.

Read [privacy.md](./privacy.md) for the guarantees an agent can repeat to users.
