import os from agno.agent import Agent from agno.models.azure import AzureAIFoundry agent = Agent( model=AzureAIFoundry(id="gpt-4o"), reasoning=True, reasoning_model=AzureAIFoundry( id="DeepSeek-R1", azure_endpoint=os.getenv("AZURE_ENDPOINT"), api_key=os.getenv("AZURE_API_KEY"), ), ) agent.print_response( "Solve the trolley problem. Evaluate multiple ethical frameworks. " "Include an ASCII diagram of your solution.", stream=True, )
Create a virtual environment
Terminal
python3 -m venv .venv source .venv/bin/activate
Set your API key
export AZURE_API_KEY=xxx export AZURE_ENDPOINT=xxx
Install libraries
pip install -U azure-ai-inference agno
Run Agent
python cookbook/reasoning/models/azure_ai_foundry/reasoning_model_deepseek.py
Was this page helpful?