#6330·deepagents

optimize binary reads by deferring file reads to object storage

Author: hntrlCreated Sep 16, 2026Updated Sep 16, 2026
Labelspackage:deepagentsorg:internalpriority:backlogtopic:multimodal

Privileged issue

  • I am a Deep Agents maintainer.

Issue Content

For threads that are particularly multimodal heavy (e.g. have a lot of messages that read binary data), deepagents takes a path of retaining contents directly in message history.

This is bad, it means these binary bytes are being put into write-optimized storage unnecessarily. Where applicable in open-swe this attributes to about 85% of the total thread storage size.

We should introduce some kind of mechanism for deferring the contents of these files into blob storage somehow. What we retain in the message history is a stable marker to whats in the blob storage, and before we send to the model we replace the markers with blob contents (probably with some kind of LRU cache to minimize the amount of network ops)

We've discussed adding this by just having markers to file locations in the attached backend, the complication is when we go to materialize the message array this will break prompt caching if any file contents have changed (which is probably the most readily apparent case).

(an alt option could be to just use the provider native file APIs instead of blob stores)

Took a first stab implementation in #6325, I think it leaves something to be desired and probably warrants us thinking more deeply about the solution.

Area (Required)

  • deepagents (SDK)
  • dcode
  • talon
  • acp
  • evals
  • harbor
  • daytona
  • modal
  • quickjs
  • runloop
  • vercel
  • langsmith-sandbox
  • Other / not sure / general