Files
crewAI/lib/crewai-files
Vinicius Brasil 4e23bf6d45
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (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
Update dependencies with security fixes (#6580)
* Pillow 12.1.1 → 12.3.0 (CVE-2026-55798, CVE-2026-54059, CVE-2026-54060,
  CVE-2026-55379, CVE-2026-55380, CVE-2026-59197, CVE-2026-59203)
* mcp 1.26.0 → 1.28.1 (CVE-2026-59950)
* couchbase 4.3.5 → 4.6.0
2026-07-17 09:12:45 -03: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")],
)