Copy
Ask AI
"""
Azure Demo Mistral
==================
Cookbook example for `azure/ai_foundry/demo_mistral.py`.
"""
from agno.agent import Agent, RunOutput # noqa
from agno.models.azure import AzureAIFoundry
# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------
agent = Agent(model=AzureAIFoundry(id="Mistral-Large-2411"), markdown=True)
# Get the response in a variable
# run: RunOutput = agent.run("Share a 2 sentence horror story")
# print(run.content)
# Print the response on the terminal
agent.print_response("Share a 2 sentence horror story")
# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
pass
Run the Example
Copy
Ask AI
# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/azure/ai_foundry
# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate
python demo_mistral.py