Skip to main content
Mistral AI models with tool use and vision support.
from agno.agent import Agent
from agno.models.mistral import MistralChat

agent = Agent(
    model=MistralChat(id="mistral-large-latest"),
    markdown=True,
)

agent.print_response("Explain quantum computing", stream=True)

Tool Use

from agno.agent import Agent
from agno.models.mistral import MistralChat
from agno.tools.yfinance import YFinanceTools

agent = Agent(
    model=MistralChat(id="mistral-large-latest"),
    tools=[YFinanceTools(stock_price=True)],
    markdown=True,
)

agent.print_response("What's MSFT's stock price?", stream=True)

Structured Output

from pydantic import BaseModel, Field
from agno.agent import Agent
from agno.models.mistral import MistralChat

class Summary(BaseModel):
    title: str = Field(..., description="Title")
    key_points: list[str] = Field(..., description="Key points")

agent = Agent(
    model=MistralChat(id="mistral-large-latest"),
    output_schema=Summary,
)

agent.print_response("Summarize the benefits of open-source AI")

Run Examples

export MISTRAL_API_KEY=xxx

git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/92_models/mistral

python basic.py
python tool_use.py
python structured_output.py