Passing Base64 to agent from team

So I want to know if I can pass the raw base64 to the agent. I’m reading the image as Image(content=media_bytes) in images attribute in team now its getting the image details but I want to pass the raw base64 to the agent.

Is it possible to do this?

Hi @dp27, thanks for reaching out and supporting Agno. I’ve shared this with the team, we’re working through all requests one by one and will get back to you soon.If it’s urgent, please let us know. We appreciate your patience!

Thank you for response @Monali Its urgent and I want a solution on it so can you just provide some information on that?

Hey @dp27, I have let the team know. Our engineers will be here t help you shortly

Hey! @Monali is there any solution you found for it?

Hey @dp27, I am really sorry this must have slipped through.

@manu will be here to answer your question.

Hey @dp27

We handle the image internally as bytes instead of base64. When you use our Image class, the image bytes are in the content field. This should work fine for both agents and teams!

When sending the image somewhere else (e.g. sending it to the LLM), it should normally be converted to base64. Is this why you want the base64 object handy?

If that’s the case: we are currently working on improving this and ensuring the image is always sent to the outside as base64. It will be part of our v2, which we are releasing in a couple of weeks.

Thanks for using Agno, and let me know if I can help any further!

@manu Passing the image as content to the Image class as base64 but I want to do like if I pass the base64 content in Image class I want that base64 to pass to the specific agent that is what I actually want right now I have changed the flow to not passing the base64 instead I’m passing the file path.

Thank you for your response and time.

Hi, Manu,

Image file is currently sent to LLM models as a raw (binary) image file as you mention.

Most of LLM models do accept a raw image file, I observed. If being able to send an image as base64 format, it will be beneficial.

But in case of pdf file (a very widely used file format), most of LLM models does NOT accept a raw (binary) pdf file, with which agno currently send out. Please make sure that a pdf file can be sent out as a base64 string.

If adding more, I would appreciate for making it available to send other files such as xlsx, docx, csv files that are used in many s/w applications.

Thanks~~

Hey @dp27, @yglee.us

Images and files should now be sent to the model as base64.

You can update with pip install -U agno

Enjoy, and thanks for using Agno!

Hey @manu

My question was like i can pass the base64 to the agent from team agent. So im passing the base64 to the team and works but i want to know like if there is any way to pass the exact base64 to any agent.

Hey @dp27

What is passed from the Team to the Agent is an object of type Image.

The content field of that object can be encoded in base64. If you pass an Image which content is encoded in base64 to your Team, when it reaches the Agents, it will still be encoded in base64.