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

# Image File Input Agent

> Analyze a local image file with Ministral 14B and search the web for related news.

## Code

```python image_file_input_agent.py theme={null}
from pathlib import Path

from agno.agent import Agent
from agno.media import Image
from agno.models.mistral.mistral import MistralChat
from agno.tools.websearch import WebSearchTools

agent = Agent(
    model=MistralChat(id="ministral-14b-2512"),
    tools=[WebSearchTools()],
    markdown=True,
)

image_path = Path(__file__).parent.joinpath("sample.jpeg")

agent.print_response(
    "Tell me about this image and give me the latest news about it from the web.",
    images=[
        Image(filepath=image_path),
    ],
    stream=True,
)

```

## Usage

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

  <Step title="Set your API key">
    ```bash theme={null}
    export MISTRAL_API_KEY=xxx
    ```
  </Step>

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U mistralai ddgs agno
    ```
  </Step>

  <Step title="Add the image">
    Save the code above as `image_file_input_agent.py`. Place a JPEG named `sample.jpeg` in the same directory.
  </Step>

  <Step title="Run Agent">
    ```bash theme={null}
    python image_file_input_agent.py
    ```
  </Step>
</Steps>
