Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.agno.com/llms.txt

Use this file to discover all available pages before exploring further.

"""
Xiaomi MiMo Tool Use
====================

Give the agent a web search tool and let it call tools while thinking mode is on
(`use_thinking=True`). The model reasons about which tool to call, runs it, and
folds the result into its answer.

Run `uv pip install ddgs` to install dependencies.
"""

from agno.agent import Agent
from agno.models.xiaomi import MiMo
from agno.tools.websearch import WebSearchTools

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

agent = Agent(
    model=MiMo(id="mimo-v2.5-pro", use_thinking=True),
    tools=[WebSearchTools()],
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------
if __name__ == "__main__":
    agent.print_response(
        "What is happening in France?",
        stream=True,
        show_full_reasoning=True,
    )

Run the Example

# Clone and setup repo
git clone https://github.com/agno-agi/agno.git
cd agno/cookbook/90_models/xiaomi

# Create and activate virtual environment
./scripts/demo_setup.sh
source .venvs/demo/bin/activate

python tool_use.py