Skip to main content
Azure AI Foundry supports image input with models like Llama-3.2-11B-Vision-Instruct. You can use this to analyze images and get information about them.

Code

cookbook/90_models/azure/ai_foundry/image_agent.py
from agno.agent import Agent
from agno.media import Image
from agno.models.azure import AzureAIFoundry

agent = Agent(
    model=AzureAIFoundry(id="Llama-3.2-11B-Vision-Instruct"),
    markdown=True,
)

agent.print_response(
    "Tell me about this image.",
    images=[
        Image(
            url="https://raw.githubusercontent.com/Azure/azure-sdk-for-python/main/sdk/ai/azure-ai-inference/samples/sample1.png",
            detail="high",
        )
    ],
    stream=True,
)

Usage

1

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
2

Set your API key

export AZURE_API_KEY=xxx
export AZURE_ENDPOINT=xxx
3

Install dependencies

uv pip install -U azure-ai-inference agno
4

Run Agent

python cookbook/90_models/azure/ai_foundry/image_agent.py