Repository navigation
Feature Request: Tools returning image content digestible by the agent #1458
Replies: 2 comments
|
Thanks for the well-scoped request — yes, this is feasible. I dug into the code; here is where it stands and how it could be done. Current state
The real complication: provider support
So a universal implementation needs the fallback other frameworks use: put the text part in the tool result as usual, and attach images to a synthetic Implementation sketch
Ill open a tracked enhancement issue for this. Would you be interested in contributing the implementation? Happy to guide you through it. |
Uh oh!
There was an error while loading. Please reload this page.
Is there any plan or possibility to allow tools to return image content (i.e.
MessageImageContent) as part of their output, so that the agent can directly see and reason over an image produced by a tool call?A concrete use case: a tool that renders a specific page of a PDF, crops a region, or processes an image in any way, and hands the resulting image back to the agent as a first-class output, not just a text signal, so the LLM can visually inspect it in the very same reasoning step.
Currently
ToolOutputonly serializes to text. Is a multimodal tool output type (e.g. ImageToolOutput, or a ToolOutput that can carryMessageImageContentchunks) something that could be supported?All reactions