Python Plots Are Now First-Class Artifacts in gptme
gptme now automatically detects image files produced by Python code and registers them as typed artifacts — so the web UI can surface plots inline instead of leaving you to hunt for filenames.
When you ask gptme to analyze data and make a chart, the workflow has always worked — the Python tool runs matplotlib, the file lands on disk, you get the path in the output. But “here is plot.png” is not the same as showing you the plot. You had to know where to look.
That gap is now closed.
What changed
As of today, execute_python snapshots image files in the working directory before and after running your code. Any file that is created or modified during execution gets an ArtifactDescriptor attached to the tool output — a typed metadata record that tells the server exactly what the file is and how to serve it.
{
"source_type": "attachment",
"path": "/path/to/plot.png",
"kind": "image",
"mime_type": "image/png",
"tool": "python",
}
The server picks these up through the artifact registry API, and the web UI can render them inline — no filename hunting, no manual download.
What it covers
Any image file written to the current working directory during code execution is detected automatically:
| Extension | MIME type |
|---|---|
.png |
image/png |
.jpg / .jpeg |
image/jpeg |
.svg |
image/svg+xml |
.gif |
image/gif |
.pdf |
application/pdf |
This means matplotlib, seaborn, plotly (static export), PIL/Pillow, and anything else that saves image files to disk all get picked up automatically. No special API needed — just write the file.
How to use it
Nothing changes on your end. Ask gptme to make a chart the way you always have:
Plot the monthly active users from this CSV file and save it as users.png
gptme writes the file, the descriptor is attached, and the web UI surfaces the image. If you are running gptme locally without the web UI, the descriptor is still there in the message metadata for any client that wants to use it.
Why this matters for data workflows
The practical effect is that data analysis sessions become a lot more fluid. You can ask for an exploratory chart, see it immediately, react to it (“make the Y axis log scale”, “add a trend line”), and iterate — all without leaving the conversation or switching to a file browser.
This is part of a broader push to make tool outputs first-class in the UI, following the same pattern used for computer-use screenshots (PR #2639). Plots, screenshots, and eventually other file outputs should all surface in context where they are produced, not as afterthoughts.
Try it
Self-host gptme or use the hosted web UI at chat.gptme.org. The feature is live on master as of today. Full docs at gptme.org/docs.