Skip to main content

What is Shelv?

Shelv is a managed API that converts documents — PDFs, contracts, books, regulations — into structured Markdown filesystems. Your AI agents can then mount and interact with these filesystems using standard Unix tools. Parse once, mount anywhere, instantly.

The Problem

AI agents need to work with documents, but PDFs are opaque blobs. Agents can’t grep a PDF. They can’t ls a contract’s clauses. They can’t cat a specific chapter. Most solutions either dump raw text (losing all structure) or require custom parsers per document type. Neither scales.

How Shelv Works

1

Upload a document

Send a PDF to the Shelv API. That’s it — one API call.
2

Automatic processing

Shelv’s pipeline parses the document, uses LLMs to determine the optimal filesystem structure, verifies content integrity, and stores the result.
3

Mount or fetch

Get temporary S3 credentials to mount the filesystem directly, or fetch the file tree as JSON for in-memory use.

What You Get

A document uploaded to Shelv becomes a browsable filesystem:
my-contract/
├── definitions.md
├── article-01-parties.md
├── article-02-vessel.md
├── article-05-laytime/
│   ├── 5.1-calculation.md
│   ├── 5.2-exceptions.md
│   └── 5.3-demurrage.md
├── clauses/
│   ├── force-majeure.md
│   └── arbitration.md
└── metadata.json
Your agents can:
  • grep -r "indemnity" . — search across all files
  • cat article-05-laytime/5.3-demurrage.md — read a specific section
  • ls clauses/ — list all clauses
  • find . -name "*.md" — discover all content files

Key Features

  • Automatic structuring — LLM-powered analysis determines the optimal file/folder layout for each document
  • Template support — Use built-in templates (book, legal-contract, academic-paper) or let Shelv auto-detect
  • S3-compatible mounting — Get scoped temporary credentials to mount with s3fs in any sandbox
  • JSON tree endpoint — Fetch the entire filesystem as a JSON object for in-memory use
  • Webhook notifications — Get notified when processing completes
  • Review mode — Inspect and modify the structure before finalizing
  • Content integrity — Verification step ensures no content is lost during structuring

Next Steps