Skip to content

Let the agent look at attached photos - #10

Merged
Taskmaster-1 merged 1 commit into
mainfrom
feat/vision
Oct 31, 2026
Merged

Taskmaster-1 merged 1 commit into
mainfrom
feat/vision

Conversation

@Taskmaster-1

Copy link
Copy Markdown
Owner

Until now the agent could attach photos to emails but couldn't see them. Now file_read on a photo shows it to the model.

  • file_read on a PNG, JPEG, GIF or WebP up to 5 MB returns a new image tool output. Larger images and other formats get a note explaining why they can't be shown; videos are unchanged (attach-only).
  • The stored tool output and message rows hold only the file id. attachImages loads the bytes right before each model call, so neither the database nor the live event stream carries image data.
  • At most the 4 newest images are sent per call; older ones become "call file_read again to look at it", so long chats don't resend every photo.
  • Handover summaries stay text-only.
  • Images go in tool results, so text in a photo is untrusted and taints the run, the same as an email or web page.
  • Checked that the Anthropic, OpenAI and Google providers in our AI SDK version each turn this into a native image block.
  • The run panel shows the photo the agent looked at.

Tests: unit tests for attachImages (newest kept, older become a note, missing image, no loader, stored messages untouched), and an end-to-end test where the second model call receives the PNG bytes while the DB rows don't. 273 tests pass; lint, typecheck and web build pass. Not tested against a live model (no key locally).

file_read on a PNG, JPEG, GIF or WebP up to 5 MB returns an image output.
Only the file id is stored; the runtime loads the bytes right before each
model call, sends at most the four newest images, and replaces older ones
with a note. Handover summaries stay text-only. The run panel shows the
photo the agent looked at.
@Taskmaster-1
Taskmaster-1 merged commit d09bd12 into main Oct 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant