Im not 100% sure if you can pass images around like that between agents, but in an attempt to solve the problem you could:
Store the generated image on disk, google drive, s3 bucket, etc and then send the url/path reference back to the main agent to then use the image.
Convert the image to base64 and return that as part of the response.
Im assuming you’re trying to create automated posts here based on your prompt, so maybe a two step approach might work. Once you have an image generated and stored and the content generated, your next step is just to post it to your destination. Doing this will also avoid you eating up unecessary LLM tokens with now passing the generated image back into the model.
Yeah, the first solution you mentioned (store the image somewhere and pass the url) is probably what will I do. But since the agent is trying to pass the image, I was wondering if there was a proper way to do it.