
Llamaparse
- 806 installs
- 74 repo stars
- Updated July 3, 2026
- run-llama/llamaparse-agent-skills
llamaparse is a LlamaIndex agent skill at version 1.0.0 that extracts clean text, markdown, tables, and images from PDF, DOCX, PPTX, and XLSX files for developers running document parsing inside agent workflows.
About
llamaparse is a run-llama/llamaparse-agent-skills skill at version 1.0.0 under the MIT license from LlamaIndex for parsing unstructured documents with the LlamaParse API. It requires LLAMA_CLOUD_API_KEY in the environment and the @llamaindex/llama-cloud@latest TypeScript library. Supported formats include PDF, DOCX, PPTX, and XLSX with outputs such as text, markdown, and images. Developers invoke llamaparse when agents must ingest contracts, decks, or spreadsheets without manual copy-paste. The skill confirms API key and dependency setup before parsing and fits RAG ingestion, document QA, and automation pipelines that need reliable structure from messy files.
- Parses PDF, DOCX, PPTX, XLSX and other unstructured files via LlamaParse
- Returns clean markdown, structured text, images and tables
- Supports custom prompts, processing options and tier selection
- Requires only LLAMA_CLOUD_API_KEY and @llamaindex/llama-cloud
- Generates and executes a TypeScript parsing script after user approval
Llamaparse by the numbers
- 806 all-time installs (skills.sh)
- +50 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #1,318 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/run-llama/llamaparse-agent-skills --skill llamaparseAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 806 |
|---|---|
| repo stars | ★ 74 |
| Last updated | July 3, 2026 |
| Repository | run-llama/llamaparse-agent-skills ↗ |
How do you parse PDFs into markdown for agents?
Reliably extract clean text, markdown, tables and images from PDFs, DOCX, PPTX and other unstructured documents inside agent workflows.
Who is it for?
Developers building agent or RAG workflows that must ingest PDFs, Office documents, or spreadsheets via LlamaParse and LlamaCloud APIs.
Skip if: Native-only local PDF parsing with no LlamaCloud API key or projects that reject external document parsing services.
When should I use this skill?
A developer asks to parse PDF, DOCX, PPTX, or XLSX content, extract tables from documents, or prepare files for RAG ingestion with LlamaParse.
What you get
Extracted text, markdown, tables, and images from unstructured PDF, DOCX, PPTX, and XLSX source files.
- Parsed markdown and text from documents
- Extracted tables and images from unstructured files
By the numbers
- Skill version 1.0.0 from LlamaIndex under MIT license
- Supports PDF, DOCX, PPTX, and XLSX input formats
Files
LlamaParse Skill
Parse unstructured documents (such as PDF, DOCX, PPTX, XLSX) with LlamaParse and extract their contents (text, markdown, images...).
Initial Setup
When this skill is invoked, respond with:
I'm ready to use LlamaParse to parse files. Before we begin, please confirm that:
- `LLAMA_CLOUD_API_KEY` is set as environment variable within the current environment
- `@llamaindex/llama-cloud@latest` is installed and available within the current Node environment
If both of them are set, please provide:
1. One or more files to be parsed
2. Specific parsing options, such as tier, API version, custom prompt, processing options...
3. Any requests you might have regarding the parsed content of the file.
I will produce a Typescript script to run the parsing job and, once you approved its execution, I will report the results back to you based on your request.Then wait for the user's input.
---
Step 0 — Install llama-cloud (optional)
If the user does not have the @llamaindex/llama-cloud package installed, add it to the current environment by running:
npm install @llamaindex/llama-cloud@latestStep 1 — Produce a Typescript Script
Once the user confirms the environment variables are set and provides the necessary details for the parsing job, produce a typescript script.
As a source of truth for the TS script, you can:
- Refer to the example.ts script, which covers most of the necessary configurations for LlamaParse
- Refer to the complete LlamaParse Documentation, fetching the
https://developers.llamaindex.ai/python/cloud/llamaparse/api-v2-guide/page.
Scripting Best Practices
Follow these guidelines when generating scripts:
1. Always Use the Top-Level LlamaCloud Client
Use LlamaCloud (the API client) for all parsing operations:
import LlamaCloud from "@llamaindex/llama-cloud";
// Define a client
const client = new LlamaCloud({
apiKey: process.env["LLAMA_CLOUD_API_KEY"], // This is the default and can be omitted
});
2. Two-Step Upload → Parse Pattern
Always upload first to get a file ID, then parse using the file ID. Never pass raw file bytes directly to parse().
import { readFile, writeFile } from "fs/promises";
import { basename } from "path";
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic",
version: "latest",
file_id: fileId,
...
});If the user already has a file ID (e.g. from a prior upload), skip the upload step and use it directly.
3. Choose the Right Tier
| Tier | When to Use |
|---|---|
fast | Speed is the priority; simple documents |
cost_effective | Budget-conscious; straightforward text extraction |
agentic | Complex layouts, tables, mixed content (default recommendation) |
agentic_plus | Advanced analysis, highest accuracy |
Default to agentic unless the user specifies otherwise or the document is simple.
4. Always Include the expand Parameter
The expand parameter controls what content is returned. Omitting it returns minimal data. Always specify exactly what you need:
| Value | Returns |
|---|---|
text_full | Plain text via result.text_full |
markdown_full | Markdown via result.markdown_full |
items | Page-level JSON via result.items.pages |
text_content_metadata | Per-page text metadata |
markdown_content_metadata | Per-page markdown metadata |
items_content_metadata | Per-page items metadata |
images_content_metadata | Image list with presigned URLs |
output_pdf_content_metadata | Output PDF metadata |
xlsx_content_metadata | Excel-specific metadata |
Only request metadata *_content_metadata variants when you need presigned URLs or per-page detail — they increase payload size.
5. Handle None Results Defensively
result.text_full, result.markdown_full, and result.items may be undefined on failure. Always guard against this:
const text = result.text_full ?? "";
const markdown = result.markdown_full ?? "";6. Use Structured Options for Advanced Configuration
Group options using the correct nested keys:
const result = await client.parsing.parse({
tier: "agentic",
version: "latest",
file_id: fileId,
input_options: {
presentation: {
skip_embedded_data: false,
},
},
output_options: {
images_to_save: ["screenshot"],
markdown: {
tables: { output_tables_as_markdown: true },
annotate_links: true,
},
},
processing_options: {
specialized_chart_parsing: "agentic",
ocr_parameters: { languages: ["de", "en"] },
},
agentic_options: {
custom_prompt:
"Extract text from the provided file and translate it from German to English.",
},
expand: [
"markdown_full",
"images_content_metadata",
"markdown_content_metadata",
],
});Use agentic_options.custom_prompt whenever the user wants to guide extraction (translation, summarization, structured extraction, etc.).
7. Downloading Images Requires httpx and Auth
When images_content_metadata is in expand, download images via presigned URLs with Bearer auth:
if (result.images_content_metadata) {
for (const image of result.images_content_metadata.images) {
if (image.presigned_url) {
const response = await fetch(image.presigned_url, {
headers: {
Authorization: `Bearer ${process.env["LLAMA_CLOUD_API_KEY"]}`,
},
});
if (response.ok) {
const content = await response.bytes();
await writeFile(image.filename, content);
}
}
}
}8. Use the Node shebang
Every generated script should include the node shebang:
#!/usr/bin/env node---
Step 2 — Execute the Typescript Script
Once the typescript script has been produced, you should:
1. Present the script to the user and ask for permissions to run it (depending on the current permissions settings) 2. Once you obtained permission to run, execute the script 3. Explore the results based on the user's requests
In order to run typescript scripts, it is highly recommended to use: npx tsx script.ts.#!/usr/bin/env node
import LlamaCloud from "@llamaindex/llama-cloud";
import { readFile, writeFile } from "fs/promises";
import { basename } from "path";
// Define a client
const client = new LlamaCloud({
apiKey: process.env["LLAMA_CLOUD_API_KEY"], // This is the default and can be omitted
});
async function parseFileText(filePath: string): Promise<string> {
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic", // allowed values: fast,cost_effective,agentic,agentic_plus
version: "latest",
file_id: fileId,
// IMPORTANT: always include the `expand` parameter. Allowed: text, markdown, items, text_content_metadata,
// markdown_content_metadata, items_content_metadata, xlsx_content_metadata,
// output_pdf_content_metadata, images_content_metadata. Metadata fields include
// presigned URLs.
expand: ["text_full"],
});
// 5. Retrieve the text result (could be None if there was an error)
return result.text_full ?? "";
}
async function parseFileMarkdown(filePath: string): Promise<string> {
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic", // allowed values: fast,cost_effective,agentic,agentic_plus
version: "latest",
file_id: fileId,
// IMPORTANT: always include the `expand` parameter. Allowed: text, markdown, items, text_content_metadata,
// markdown_content_metadata, items_content_metadata, xlsx_content_metadata,
// output_pdf_content_metadata, images_content_metadata. Metadata fields include
// presigned URLs.
expand: ["markdown_full"],
});
// 5. Retrieve the markdown result (could be None if there was an error)
return result.markdown_full ?? "";
}
async function parseFileJson(filePath: string): Promise<void> {
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic", // allowed values: fast,cost_effective,agentic,agentic_plus
version: "latest",
file_id: fileId,
// IMPORTANT: always include the `expand` parameter. Allowed: text, markdown, items, text_content_metadata,
// markdown_content_metadata, items_content_metadata, xlsx_content_metadata,
// output_pdf_content_metadata, images_content_metadata. Metadata fields include
// presigned URLs.
expand: ["items"],
});
// 5. Retrieve the result as a JSON array of items (could be None if there was an error)
if (result.items) {
for (const page of result.items.pages) {
console.log(JSON.stringify(page));
}
}
}
async function parseFileWithOptions(filePath: string): Promise<void> {
// 1. Convert the file path into a File object
const buffer = await readFile(filePath);
const fileName = basename(filePath);
const file = new File([buffer], fileName);
// 2. Upload the file to the cloud
const fileObj = await client.files.create({
file: file,
purpose: "parse",
});
// 3. Get the file ID
const fileId = fileObj.id;
// 4. Use the file ID to parse the file
const result = await client.parsing.parse({
tier: "agentic", // allowed values: fast,cost_effective,agentic,agentic_plus
version: "latest",
file_id: fileId,
input_options: {
presentation: {
skip_embedded_data: false,
},
},
output_options: {
images_to_save: ["screenshot"],
markdown: {
tables: { output_tables_as_markdown: true },
annotate_links: true,
},
},
processing_options: {
specialized_chart_parsing: "agentic",
ocr_parameters: { languages: ["de", "en"] },
},
agentic_options: {
custom_prompt:
"Extract text from the provided file and translate it from German to English.",
},
// IMPORTANT: always include the `expand` parameter. Allowed: text, markdown, items, text_content_metadata,
// markdown_content_metadata, items_content_metadata, xlsx_content_metadata,
// output_pdf_content_metadata, images_content_metadata. Metadata fields include
// presigned URLs.
expand: [
"markdown_full",
"images_content_metadata",
"markdown_content_metadata",
],
});
// 5. Retrieve and save the images from the result (since we requested images)
if (result.images_content_metadata) {
for (const image of result.images_content_metadata.images) {
if (image.presigned_url) {
const response = await fetch(image.presigned_url, {
headers: {
Authorization: `Bearer ${process.env["LLAMA_CLOUD_API_KEY"]}`,
},
});
if (response.ok) {
const content = await response.bytes();
await writeFile(image.filename, content);
}
}
}
}
// 6. Print the full-text result
console.log(result.markdown_full ?? "No full content");
}
Related skills
How it compares
Choose llamaparse for LlamaCloud document parsing in agent pipelines; use database skills when content is already structured in SQL rather than trapped in Office files.
FAQ
What files does llamaparse support?
llamaparse version 1.0.0 parses unstructured PDF, DOCX, PPTX, and XLSX files through the LlamaParse API and returns text, markdown, tables, and images for agent workflows.
What setup does llamaparse require before parsing?
llamaparse requires LLAMA_CLOUD_API_KEY in the environment and the @llamaindex/llama-cloud@latest TypeScript package installed before agents parse documents through the LlamaIndex skill.