This agent can take image inputs and make tool calls to search the web for more information.

image_input_with_tools.py
from agno.agent import Agent
from agno.media import Image
from agno.models.openai import OpenAIChat
from agno.tools.duckduckgo import DuckDuckGoTools

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    tools=[DuckDuckGoTools()],
    markdown=True,
)

agent.print_response(
    "Tell me about this image and search the web for more information.",
    images=[
        Image(
            url="https://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg"
        )
    ],
    stream=True,
)

Usage

1

Install libraries

pip install -U agno openai duckduckgo-search
2

Run the agent

python image_input_with_tools.py
3

Export API keys

export OPENAI_API_KEY=***
4

Run the agent

python image_input_with_tools.py