> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Input

> Pass images to workflows and chain vision analysis with web search.

Demonstrates passing image media into workflow runs and chaining analysis with follow-up research.

```python image_input.py theme={null}
"""
Image Input
===========

Demonstrates passing image media into workflow runs and chaining analysis with follow-up research.
"""

from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.media import Image
from agno.models.openai import OpenAIChat
from agno.tools.websearch import WebSearchTools
from agno.workflow.step import Step
from agno.workflow.workflow import Workflow

# ---------------------------------------------------------------------------
# Create Agents
# ---------------------------------------------------------------------------
image_analyzer = Agent(
    name="Image Analyzer",
    model=OpenAIChat(id="gpt-5.6-luna"),
    instructions="Analyze the provided image and extract key details, objects, and context.",
)

news_researcher = Agent(
    name="News Researcher",
    model=OpenAIChat(id="gpt-5.6-luna"),
    tools=[WebSearchTools()],
    instructions="Search for latest news and information related to the analyzed image content.",
)

# ---------------------------------------------------------------------------
# Define Steps
# ---------------------------------------------------------------------------
analysis_step = Step(
    name="Image Analysis Step",
    agent=image_analyzer,
)

research_step = Step(
    name="News Research Step",
    agent=news_researcher,
)

# ---------------------------------------------------------------------------
# Create Workflow
# ---------------------------------------------------------------------------
media_workflow = Workflow(
    name="Image Analysis and Research Workflow",
    description="Analyze an image and research related news",
    steps=[analysis_step, research_step],
    db=SqliteDb(session_table="workflow_session", db_file="tmp/workflow.db"),
)

# ---------------------------------------------------------------------------
# Run Workflow
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    media_workflow.print_response(
        input="Please analyze this image and find related news",
        images=[
            Image(
                url="https://upload.wikimedia.org/wikipedia/commons/0/0c/GoldenGateBridge-001.jpg"
            )
        ],
        markdown=True,
    )
```

## Run the Example

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U agno ddgs fastapi openai sqlalchemy
```

**2. Export your OpenAI API key**

```bash Mac/Linux theme={null}
export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
$Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**3. Run the example**

Save the code above as `image_input.py`, then run:

```bash theme={null}
python image_input.py
```

Full source: [cookbook/04\_workflows/06\_advanced\_concepts/structured\_io/image\_input.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/04_workflows/06_advanced_concepts/structured_io/image_input.py)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.