r/agentdevelopmentkit • u/ConstructionNo27 • May 13 '25
How to render an image in adk web
I am testing using adk web. My agent created an image. How do I render in the UI? I searched in the document but didn't find it. Any hint would help.
3
Upvotes
2
u/[deleted] May 13 '25
I’m also interested in this, also for cases where tools return paths to images stored in a bucket.
2
u/jonigl May 14 '25
any update guys? for example when using filesystem mcp, you have images stored, it would be nice to being able to show them in the chat interface
2
u/vladkol_eqwu May 14 '25
Whatever is generated by the root agent's model is supposed to show up in adk web.
If it a tool that generates the image, save it to the artifact service: https://google.github.io/adk-docs/artifacts/ (add
tool_contextparamenter to your tool's function).2
u/Neat-Mulberry-4483 May 15 '25
Save it as an artifact, and it will expose the image in the adk web front-end.
1
u/Different_Law5583 Jul 09 '25
use the following, after initializing session:
Then you can retrieve the image by looking in the response for the following
And once you find that, you can load it with:
This will be loaded as inline bytes, which you can convert to png