Agent Using Multimodal Tool Response in Runs
Legacy DalleTools example that references a generated image in a follow-up run.
This legacy example keeps DALL-E image output in conversation history for follow-up runs.
DALL-E models are deprecated. This DalleTools example is retained as a legacy reference and no longer runs against the current OpenAI API. Use OpenAITools with GPT Image 2 in Image Generation Agent.
Code
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.tools.dalle import DalleTools
# Create an Agent with the DALL-E tool
agent = Agent(
tools=[DalleTools()],
name="DALL-E Image Generator",
add_history_to_context=True,
db=SqliteDb(db_file="tmp/test.db"),
)
agent.print_response(
"Generate an image of a Siamese white furry cat sitting on a couch?",
markdown=True,
)
agent.print_response(
"Which type of animal and the breed are we talking about?", markdown=True
)Current Alternative
The source above uses removed DALL-E models and is preserved for reference. Follow Image Generation Agent for the current OpenAITools and GPT Image 2 pattern before rebuilding the multi-turn flow.