Find answers from the community

Updated last week

is it possible to run an AgentWorkflow with images?

@kapa.ai is it possible to run an AgentWorkflow with images?
k
2 comments
Please stand by @dublex as I search the knowledge base. I normally take about 15 seconds or so. :wave:
----------------------
Yes, it is possible to run an AgentWorkflow with images in LlamaIndex. The knowledge sources provide information about using images with agents, specifically in the context of multi-modal agents.

According to the documentation, you can create an image document and include it in the agent's task. Here's an example of how you can do this:

Plain Text
image_document = ImageDocument(image_path="other_images/openai/dev_day.png")
task = agent.create_task(
    query_str,
    extra_state={"image_docs": [image_document]},
)


This code snippet shows how to create an ImageDocument and include it in the agent's task using the extra_state parameter. The image document is added to a list of image_docs, which can be accessed by the agent during its workflow.

While the provided knowledge sources don't explicitly mention "AgentWorkflow" with images, they do demonstrate how to use images with agents in LlamaIndex. The concept of working with images in agent tasks is applicable to various agent implementations, including AgentWorkflow.

For more detailed information on working with multi-modal agents and images in LlamaIndex, you can refer to the Multi-Modal Agent documentation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Add a reply
Sign up and join the conversation on Discord