> ## 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 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

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

**1. Set your API key**

```bash theme={null}
export MISTRAL_API_KEY=xxx
```

**2. Install dependencies**

```bash theme={null}
uv pip install -U mistralai ddgs agno
```

**3. Add the image**

Save the code above as `image_file_input_agent.py`. Place a JPEG named `sample.jpeg` in the same directory.

**4. Run Agent**

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


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