Open Source image generation.
Stable Diffusion provides image generation.
Use Stable Diffusion from Python to generate images whenever you need them.
Let your Agent decide to return an image on its own by wrapping the Stable Diffusion integration in a Tool. If your Agent determines an image is appropriate, it can choose to use this Tool.
Starter Template Agents that use Stable Diffusion: