Summary
one --agent actions execute needs a binary-safe way to return non-JSON payloads such as exported files, downloads, or raw byte responses.
Problem
Some actions return raw bytes instead of JSON. In --agent mode, that currently forces agent callers to infer whether stdout should be treated as text, bytes, or some custom envelope.
That creates a few avoidable failure modes:
- binary responses can be corrupted if written through a text path
- callers have to guess from the action docs whether a response is binary
- there is no obvious one-command path to save the result directly to disk
Requested behavior
A good solution could be any of the following:
- add
--output <path> to actions execute so binary/text responses can be streamed directly to a file
- include explicit response metadata in
--agent mode such as contentType, isBinary, and encoding
- for binary responses in
--agent mode, return a documented envelope instead of raw stdout bytes
Why this would help
This would make file export/download actions much safer to automate from agents, especially for platforms like cloud storage, docs, spreadsheets, or media APIs.
It also lowers the chance that agent authors silently corrupt files by handling a byte response as UTF-8 text.
Nice-to-have
If --output is added, it would be helpful if actions knowledge could clearly indicate that an action is expected to return raw bytes so the agent can choose the right execution mode up front.
Summary
one --agent actions executeneeds a binary-safe way to return non-JSON payloads such as exported files, downloads, or raw byte responses.Problem
Some actions return raw bytes instead of JSON. In
--agentmode, that currently forces agent callers to infer whether stdout should be treated as text, bytes, or some custom envelope.That creates a few avoidable failure modes:
Requested behavior
A good solution could be any of the following:
--output <path>toactions executeso binary/text responses can be streamed directly to a file--agentmode such ascontentType,isBinary, andencoding--agentmode, return a documented envelope instead of raw stdout bytesWhy this would help
This would make file export/download actions much safer to automate from agents, especially for platforms like cloud storage, docs, spreadsheets, or media APIs.
It also lowers the chance that agent authors silently corrupt files by handling a byte response as UTF-8 text.
Nice-to-have
If
--outputis added, it would be helpful ifactions knowledgecould clearly indicate that an action is expected to return raw bytes so the agent can choose the right execution mode up front.