Files
crewAI/lib/crewai-files
Matt Aitchison c00a348837
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
fix: upgrade pypdf 4.x → 6.7.4 to resolve 11 Dependabot alerts
pypdf <6.7.4 has multiple DoS vulnerabilities via crafted PDF streams
(FlateDecode, LZWDecode, RunLengthDecode, XFA, TreeObject, outlines).

Only basic PdfReader/PdfWriter APIs are used in crewai-files, none of
which changed in the 5.0 or 6.0 breaking releases.
2026-02-28 17:16:45 -05:00
..

crewai-files

File handling utilities for CrewAI multimodal inputs.

Supported File Types

  • ImageFile - PNG, JPEG, GIF, WebP
  • PDFFile - PDF documents
  • TextFile - Plain text files
  • AudioFile - MP3, WAV, FLAC, OGG, M4A
  • VideoFile - MP4, WebM, MOV, AVI

Usage

from crewai_files import File, ImageFile, PDFFile

# Auto-detect file type
file = File(source="document.pdf")  # Resolves to PDFFile

# Or use specific types
image = ImageFile(source="chart.png")
pdf = PDFFile(source="report.pdf")

Passing Files to Crews

crew.kickoff(
    input_files={"chart": ImageFile(source="chart.png")}
)

Passing Files to Tasks

task = Task(
    description="Analyze the chart",
    expected_output="Analysis",
    agent=agent,
    input_files=[ImageFile(source="chart.png")],
)