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

# Azure Image Agent

> Migrate an Azure AI Foundry image-URL agent from retired Llama 3.2 Vision to Llama 4 Scout.

The source-fidelity code uses a retired Azure AI Foundry model. Replace it with Llama 4 Scout before running the example.

<Warning>
  Microsoft retired `Llama-3.2-11B-Vision-Instruct` on June 13, 2026. Deploy `Llama-4-Scout-17B-16E-Instruct`, point `AZURE_ENDPOINT` at that deployment, and replace the model ID before running. See the [Azure model retirement schedule](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule?view=foundry-classic).
</Warning>

```python image_agent.py theme={null}
"""
Azure Image Agent
=================

Cookbook example for `azure/ai_foundry/image_agent.py`.
"""

from agno.agent import Agent
from agno.media import Image
from agno.models.azure import AzureAIFoundry

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

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,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

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

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno aiohttp azure-ai-inference
    ```
  </Step>

  <Step title="Export environment variables">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export AZURE_API_KEY="your_azure_api_key_here"
      export AZURE_ENDPOINT="your_azure_endpoint_here"
      ```

      ```bash Windows theme={null}
      $Env:AZURE_API_KEY="your_azure_api_key_here"
      $Env:AZURE_ENDPOINT="your_azure_endpoint_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Use Llama 4 Scout">
    Deploy `Llama-4-Scout-17B-16E-Instruct`, update `AZURE_ENDPOINT`, and replace `Llama-3.2-11B-Vision-Instruct` in the saved file.
  </Step>

  <Step title="Run the example">
    Save the code above as `image_agent.py`, then run:

    ```bash theme={null}
    python image_agent.py
    ```
  </Step>
</Steps>

Full source: [cookbook/90\_models/azure/ai\_foundry/image\_agent.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/azure/ai_foundry/image_agent.py)
