Skip to content

feat(core): let a bot share a file from its sandbox in its reply - #423

Open
davemooreuws wants to merge 1 commit into
sandbox-attachmentsfrom
bot-attachments
Open

davemooreuws wants to merge 1 commit into
sandbox-attachmentsfrom
bot-attachments

Conversation

@davemooreuws

@davemooreuws davemooreuws commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Seventh of the chat attachments PRs, stacked on #421: a bot can show people a file it made in the sandbox, such as a chart or an edited image, under its reply.

  • A new sandbox tool, share_file({ path, name? }), offered in a chat's own thread. It reads the file as the agents' user, up to 10 MB and 20 files per reply, and attaches it to the reply being written. The tool tells the bot never to paste contents, base64 or links instead.
  • Shared files are kept as the thread_file kind agent_attachment, which feat(core): upload files to a chat, and serve them back #393's migration allows, and shown the moment they're attached, through a new message.files_changed event. The web keeps them on a reply that's still being written.
  • A reply with only files counts as an answer. A reply that starts again drops the files it shared, and a turn that has ended refuses new ones.
  • A bot's own message doesn't list its files again, since its share_file calls record them.

Files are read as base64 through a command, which caps them at 10 MB. Streaming them out instead is tracked in SUGA-2004.

Part of SUGA-1825

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
sugabots-website e9266a6 Oct 16 2026, 06:45 AM

@davemooreuws
davemooreuws added this pull request to stack #404 October 16, 2026 03:42
Comment thread packages/core/drizzle/20261016023710_agent_attachments/migration.sql Outdated
@tjholm

tjholm commented Oct 16, 2026

Copy link
Copy Markdown
Member

This is 100% one of the features I am after btw so very excited to see this

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.

2 participants