Skip to content

Python: Can the CodeInterpreterTool return an image file? #5225

@moonbox3

Description

@moonbox3

Discussed in #5129

Originally posted by MikeYeager April 7, 2026
I'm able to run the CodeInterpreter, send it some CSV to analyze and have it generate a graph, but I can't find any way to retrieve the image. AgentResponse seems to only return the text, including the generated Python source code. I've found some old docs about AF returning Artifacts and ToolRestultContent, but they all appear to be out of date. None of the Messages or their related Content seem to contain any binary data. The text result shows a path to the generated file in the Linux sandbox. Thanks in advance.

Metadata

Metadata

Assignees

Labels

agentsIssues related to single agentspython

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions