Repository navigation
Any Bot can send the person a file it made, with its contents - #2873
Draft
davidmckayv wants to merge 1 commit into
Draft
davidmckayv wants to merge 1 commit into
davidmckayv wants to merge 1 commit into
Conversation
A connected Bot that works on its own machine had no way to hand the person a file: computer_send_file reads a path on the Bot's OpenBot computer, and is offered only with that computer. The Bot said it had no file-attachment channel and told the person to pick the file up from a path on its machine. send_file carries the file's name and contents (text, or base64), and every Bot holds it on every run. The server answers it, checks the bytes as it checks an upload, and answers in the shape computer_send_file does, so the conversation draws the same file card, live and after a reload. This adds the shared name, description and prompt lines, the tool's words, and the card's renderer.
davidmckayv
force-pushed
the
send-file-contents
branch
from
December 3, 2026 17:38
e4fa526 to
8be6c94
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
A Bot connected over plain AG-UI that works on its own machine couldn't hand the person a file it made.
computer_send_filereads a path on the Bot's OpenBot computer, and it is offered only with that computer. A customer's Bot said it had "no file-attachment channel" and told the person to pick the file up from a path on its machine.This adds
send_file, which every Bot holds on every run, computer or none. It takes the file's name and its contents (the text itself, or base64 withencoding: "base64"). The server answers it and replies in exactly the shapecomputer_send_filedoes, so the conversation draws the same file card, live and after a reload.What this changes:
shared/send-file.ts: the tool's name, description and encodings, andisSendFileTool. The description steers a model tosend_filefor a file OpenBot can't reach and tocomputer_send_filefor one in its OpenBot computer's workspace. The computer tool's description now points the other way too.shared/bot-prompt.ts: every Bot that holdssend_fileis told to send what it made with it and never to point the person at a path.shared/tool-name.ts: its words ("Sending a file", "Sent a file", "Didn't send a file").app/src/lib/copilot/send-file-tool.tsx: render only. The file card (SentFileCard) from the stored answer, or one line with the server's reason when it was refused. The contents are never drawn.computer_send_file.Why a second tool instead of a second way to call the first: the computer's tool names a path that the server pulls through the computer's governed download, and it is offered only with that computer. A Bot on its own machine has no such computer and no path OpenBot can reach. Folded into one tool, its path would mean nothing for most of the Bots that hold it.
API spec: untouched. A tool call travels in the AG-UI stream, and the spec names no tool or tool result shape. The answer reuses
computer_send_file's shape, so no new event or render contract.Red / green
app/tests/send-file-tool.test.tsxdraws a stored conversation through the real transcript, twice from scratch to stand for a reload.Unable to find role="figure" and name "File from the Bot: offsite-notes.md".shared/tests/artifacts-prompt.test.tsandshared/attachments.test.tshold the prompt lines and the description's list of what can be sent.End to end
Run against a real OpenBot built from this branch, its model answered by rule, in Chromium and WebKit: 7 passed. Two stock AG-UI agents that know nothing about OpenBot, each the AG-UI repository's own example, unmodified: the Claude Agent SDK one (
ag-ui-claude-sdk, the customer's) and the OpenAI Agents SDK one. Each was connected as a Bot from New Bot and asked for the offsite files. It sentoffsite-notes-<tag>.md(UTF-8, with an em dash, an accent and an emoji) andagenda-<tag>.txt(CRLF line ends) withsend_file. Each arrived as a file card. The card's own Download button gave exactly the bytes sent, compared byte for byte, before and after a reload. Nothing scrolls sideways at 1440px or 390px, light or dark.Looked at every screenshot (laptop and phone, light and dark, both browsers, both agents): the cards are the same
SentFileCarda file from the computer draws ("Markdown · 99 bytes", "TXT file · 66 bytes", Download), stacked one per row in the column, the Bot's words under them. Before this change there was no screen to compare: the Bot could not send the file at all.Changelog
Web app and OpenBot Desktop.