Xiaomi MiMo

Xiaomi MiMo agent examples for basic runs, string model shorthand, web search, structured output, thinking mode, and reasoning.

ExampleDescription
BasicThe minimal MiMo agent, run four ways: sync, sync + streaming, async, and async + streaming.
String ModelCreate a MiMo agent without importing the model class, using the model="xiaomi:<model-id>" string shorthand.
Tool UseGive the agent a web search tool and let it call tools while thinking mode is on (use_thinking=True).
Structured OutputRequest JSON and validate a MovieScript with Pydantic through MiMo.
Thinking ModeToggle thinking mode with the use_thinking flag.
Reasoning AgentSolve a logic puzzle with thinking mode on.