$ show MiroMindAI/MiroThinker
MiroThinker is a deep research agent framework designed for complex, multi-step tasks requiring external tool use. The system orchestrates LLM reasoning with a modular suite of MCP (Model Context Protocol) tools including web search, code execution, vision, audio, and reasoning capabilities. It features sophisticated context management through failure experience summarization and sliding window truncation to handle long conversations. The agent iteratively generates tool calls, executes them via MCP servers, and integrates results until producing a final answer. The repository includes benchmark evaluation scripts for GAIA, BrowseComp, HLE, and other research benchmarks, trace collection utilities for model improvement, and a Gradio demo for interactive use. Architecture centers on an orchestrator managing the agent loop, a pipeline for step execution, tool executors handling MCP server interactions, and LLM abstractions supporting Anthropic and OpenAI APIs with prompt caching.
The LLM identified 3 files worth highlighting for reuse:
Provides a unified interface for connecting to and executing tools via MCP servers. Manages server connections, tool execution, error handling, and result formatting. Enables easy addition/removal of tools through configuration. Demonstrates skill in abstracting tool interactions while maintaining consistent interfaces for the agent.
Abstract base class for LLM clients with standardized methods for chat completions, token usage tracking, and prompt caching. Specific implementations for Anthropic and OpenAI providers handle provider-specific features while maintaining a common interface. Factory pattern enables easy switching between LLM providers. Demonstrates skill in encapsulating provider differences while exposing consistent capabilities.
Parses tool calls from LLM responses in multiple formats (OpenAI function calls, MCP XML tags). Includes JSON repair and fallback parsing for malformed arguments. Corrects server names using system prompt-derived mappings. Solves the common problem of inconsistent LLM-generated tool calls. Demonstrates skill in handling LLM output variability with robust error recovery.