Skip to content

feat(sdk): return native image content blocks from read_file#1163

Merged
Sydney Runkle (sydney-runkle) merged 11 commits intomainfrom
codex/vivek-image-support
Feb 11, 2026
Merged

feat(sdk): return native image content blocks from read_file#1163
Sydney Runkle (sydney-runkle) merged 11 commits intomainfrom
codex/vivek-image-support

Conversation

@vtrivedy
Copy link
Copy Markdown
Collaborator

@vtrivedy vivek (vtrivedy) commented Feb 6, 2026

note: ported from harbor setup

Summary

  • read_file now natively supports image files (.png, .jpg, .jpeg, .gif, .webp) in libs/deepagents.
  • For image paths, it returns a ToolMessage multimodal content block in standard format:
    • {"type":"image","base64":"...","mime_type":"..."}
  • Applied to both sync and async read_file paths.
  • Added tests for:
    • successful image block output
    • backend download failure error handling
  • No backend protocol/interface changes were required (download_files/adownload_files already provide bytes).

@github-actions github-actions Bot added deepagents Related to the `deepagents` SDK / agent harness internal User is a member of the `langchain-ai` GitHub organization feature New feature/enhancement or request for one and removed feature New feature/enhancement or request for one labels Feb 6, 2026
Comment thread libs/deepagents/deepagents/middleware/filesystem.py Outdated
Comment thread libs/deepagents/deepagents/middleware/filesystem.py Outdated
@sydney-runkle Sydney Runkle (sydney-runkle) marked this pull request as ready for review February 9, 2026 21:25
Comment thread libs/deepagents/deepagents/middleware/filesystem.py Outdated
@sydney-runkle Sydney Runkle (sydney-runkle) merged commit 65600b1 into main Feb 11, 2026
26 checks passed
@sydney-runkle Sydney Runkle (sydney-runkle) deleted the codex/vivek-image-support branch February 11, 2026 14:30
james8814 pushed a commit to james8814/deepagents that referenced this pull request Mar 1, 2026
…in-ai#1163)

note: ported from harbor setup

- `read_file` now natively supports image files (`.png`, `.jpg`,
`.jpeg`, `.gif`, `.webp`) in `libs/deepagents`.
- For image paths, it returns a `ToolMessage` multimodal content block
in standard format:
  - `{"type":"image","base64":"...","mime_type":"..."}`
- Applied to both sync and async `read_file` paths.
- Added tests for:
  - successful image block output
  - backend download failure error handling
- No backend protocol/interface changes were required
(`download_files`/`adownload_files` already provide bytes).

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents Related to the `deepagents` SDK / agent harness feature New feature/enhancement or request for one internal User is a member of the `langchain-ai` GitHub organization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants