MiroThinker项目解析

MiroThinker项目解析(一)

1月初MiroThinker 发布了V1.5模型,这个模型和之前Qwen,GML等基模不同,这个是专门为开源搜索agent使用的模型,旨在增强工具推理和现实世界信息搜索,目标是匹配 OpenAI 深度研究和 Gemini 深度研究的深厚研究经验。

MiroThinker v1.5 是全球领先的开源搜索代理,通过互动扩展推动工具增强推理——训练模型处理更深层次和更频繁的代理与环境的互动,作为性能提升的第三个维度,超越模型大小和上下文长度。

MiroThinkerv1.5 模型主要发布MiroThinker-v1.5-30B 和MiroThinker-v1.5-235B 着两个模型也是基于Qwen3 的两个MOE模型开发的模型最大支持256K的上下文 400次工具调用 其中30B这个模型就很nic, 对于Q4量化的模型刚好可以在24G+的显卡上运行
然后这个模型在BrowseComp 上 MiroThinker-v1.5-235B领先了ChatGPT-Agent,然后30B的模型也领先于向OPENAI DeepRearch也很接近于Gemini GeepResearch

这就很nice了 Gemini GeepResearch 一直在使用效果很好 能力很强 虽然知道30B肯定比不上Gemini GeepResearch 但接近情况下很感兴趣,胜在30B的可以本地部署基本不需要成本,可以本地跑批使用
MiroThinker 项目主要由4个部分组成
模型:MiroThinker v1.5,
agent框架:MiroFlow,
数据集:MiroVerse,
训练框架:MiroTrain / MiroRL
地址:https://github.com/MiroMindAI/MiroThinker
数据集和训练框架暂时和我没啥关系,主要介绍前面的agent框架和模型

官网demo体验

官网放出了体验的地址:https://dr.miromind.ai/
先来体验一下官网agent
这边以一个简单的问题

最近 MiroThinker 推出了1.5 帮我介绍一下  MiroFlow 和 MiroThinker 的关系

最后总结出结果:

可以看到总结的还是蛮到位的

再来看一下他的分析过程:
agent
1.首先基于问题进行了公开资料的搜索,然后这个搜索会自发的基于已经搜索到的内容再进行深层次的搜索
2.再对于对于我的问题进行了一定拆解 然后提炼信息,这一步思考过程是这样的,在问题拆解过程中他已经识别出了问题的两个主体MiroFlow 和MiroThinker

现在我需要综合所有信息来回答用户的问题。
用户的问题是:最近 MiroThinker 推出了1.5 帮我介绍一下 MiroFlow 和 MiroThinker 的关系
我需要:
解释 MiroThinker 1.5 是什么
解释 MiroFlow 是什么
说明两者的关系
根据收集的信息:
MiroThinker 是一个开放的搜索代理模型,支持工具增强推理和交互扩展
MiroFlow 是一个开放的研究智能体框架
MiroFlow 被描述为"powered by" MiroThinker,使用 MiroThinker 作为核心模型
两者是同一个研究项目 MiroMind 的不同组件
MiroThinker 是模型层面,MiroFlow 是框架层面
MiroFlow 使 MiroThinker 能够作为智能体运行
MiroFlow 包含 MiroThinker,是实现 MiroThinker 的系统
MiroThinker 1.5 引入交互扩展和工具调用能力
MiroFlow 提供工具集、任务规划和执行框架
让我组织一个清晰的答案。

整体的分析过程如图

分析demo地址:https://dr.miromind.ai/share/6985200a-73c8-4b1b-bb7f-424a769a6935

部署

这边部署方式如代码中列 通过配置openrouter的key地址就能把demo跑起来
环境需要

  • Python: 3.12 或更高版本
  • 包管理器: uv
  • 操作系统: Linux, macOS
    git clone https://github.com/MiroMindAI/MiroFlow && cd MiroFlow
    uv sync
    
    # 2. 配置 API 密钥
    cp .env.template .env
    # 编辑 .env 并添加您的 OPENROUTER_API_KEY
    
    # 3. 运行您的第一个智能体
    uv run main.py trace --config_file_name=agent_quickstart_reading --task="What is the first country listed in the XLSX file that have names starting with Co?" --task_file_name="data/FSI-2023-DOWNLOAD.xlsx"

代码流程简介

这边整体代码库的代码在3w行左右是一个比较小型的项目
这边以demo中给的命令为例

uv run main.py trace --config_file_name=agent_quickstart_reading --task="What is the first country listed in the XLSX file that have names starting with Co?" --task_file_name="data/FSI-2023-DOWNLOAD.xlsx"

最后得出的答案是

Congo Democratic Republic, boxed_answer = Congo Democratic Republic

在运行后整体agent的思考过程
整体分成两轮思考

第一轮思考:
智能体制定了执行计划:

读取Excel文件
检查数据结构,找到包含国家名称的列
过滤以"Co"开头的国家
确定列表中的第一个
然后智能体调用了文件读取工具来获取数据。

第二轮思考:
读取文件后,智能体分析了数据并发现:

该文件是2023年脆弱国家指数,按国家稳定性排名
找到以下以"Co"开头的国家:
刚果民主共和国 (第4名)
科摩罗 (第45名)
哥伦比亚 (第59名)
刚果共和国 (第28名)
哥斯达黎加 (第150名)

补全提示词

第一步 agent先结合代码中给的 对问题进行了补全
根据日志可以看到 整体的提示词为:

Initial user input content: [{'type': 'text', 'text': 'What is the first country listed in the XLSX file that have names starting with Co?\nNote: A Excel orchestrator.py:779
                    file \'data/FSI-2023-DOWNLOAD.xlsx\' is associated with this task. If you need worker agent to read its content, you should provide the complete local system
                    file path: /home/ljj/MiroFlow/data/FSI-2023-DOWNLOAD.xlsx.\n\n\n\nYour task is to comprehensively address the question by actively collecting detailed
                    information from the web, and generating a thorough, transparent report. Your goal is NOT to rush a single definitive answer or conclusion, but rather to gather
                    complete information and present ALL plausible candidate answers you find, accompanied by clearly documented supporting evidence, reasoning steps,
                    uncertainties, and explicit intermediate findings.\n\nUser does not intend to set traps or create confusion on purpose. Handle the task using the most common,
                    reasonable, and straightforward interpretation, and do not overthink or focus on rare or far-fetched interpretations.\n\nImportant considerations:\n- Collect
                    comprehensive information from reliable sources to understand all aspects of the question.\n- Present every possible candidate answer identified during your
                    information gathering, regardless of uncertainty, ambiguity, or incomplete verification. Avoid premature conclusions or omission of any discovered
                    possibility.\n- Explicitly document detailed facts, evidence, and reasoning steps supporting each candidate answer, carefully preserving intermediate analysis
                    results.\n- Clearly flag and retain any uncertainties, conflicting interpretations, or alternative understandings identified during information gathering. Do
                    not arbitrarily discard or resolve these issues on your own.\n- If the question\'s explicit instructions (e.g., numeric precision, formatting, specific
                    requirements) appear inconsistent, unclear, erroneous, or potentially mismatched with general guidelines or provided examples, explicitly record and clearly
                    present all plausible interpretations and corresponding candidate answers.  \n\nRecognize that the original task description might itself contain mistakes,
                    imprecision, inaccuracies, or conflicts introduced unintentionally by the user due to carelessness, misunderstanding, or limited expertise. Do NOT try to
                    second-guess or "correct" these instructions internally; instead, transparently present findings according to every plausible interpretation.\n\nYour objective
                    is maximum completeness, transparency, and detailed documentation to empower the user to judge and select their preferred answer independently. Even if
                    uncertain, explicitly documenting the existence of possible answers significantly enhances the user\'s experience, ensuring no plausible solution is
                    irreversibly omitted due to early misunderstanding or premature filtering.\n'}]
                    [INFO] Getting tool definitions for server 'tool-reading'...                                                                                                          manager.py:182
[01/11/26 22:20:27] [INFO] Successfully obtained 1 tool definitions for server 'tool-reading'.                                                                                            manager.py:237
                    [DEBUG] get_main_tool_definitions: [{'name': 'tool-reading', 'tools': [{'name': 'read_file', 'description': "Read various types of resources (Doc, PPT, PDF,      task_tracer.py:112
                    Excel, CSV, ZIP file etc.)\ndescribed by an file: or data: URI.\n\nArgs:\n    uri: Required. The URI of the resource to read. Need to start with 'file:' or
                    'data:' schemes. Files from sandbox are not supported. You should use the local file path.\n\nReturns:\n    str: The content of the resource, or an error message
                    if reading fails.", 'schema': {'properties': {'uri': {'title': 'Uri', 'type': 'string'}}, 'required': ['uri'], 'type': 'object'}}]}]
                    [DEBUG]                                                                                                                                                          orchestrator.py:812

根据 对于问题进行了补全 添加了很多信息,并且获取了tool-reading 这个工具 这个工具是工程下的一个mcp服务器 用于读取 Doc, PPT, PDF, Excel, CSV, ZIP等文件

第一次调用LLM

之后第一次调用了 LLM ,LLM选择的是claude(至于为什么会选择 claude 还未完整看配置) claude 给出了对应的下一步编排的动作

LLM Response: I'll help you find the first country listed in the XLSX file that has a name starting with "Co". Let me break this down into a claude_openrouter_client.py:267
                    step-by-step approach:

                    ## Plan:
                    1. Read the Excel file from the provided path
                    2. Examine the data structure to identify the column containing country names
                    3. Filter the countries to find those starting with "Co"
                    4. Determine the first such country in the list

                    Let's start by reading the Excel file to understand its contents:

                    <use_mcp_tool>
                    <server_name>tool-reading</server_name>
                    <tool_name>read_file</tool_name>
                    <arguments>
                    {
                    "uri": "file:///home/ljj/MiroFlow/data/FSI-2023-DOWNLOAD.xlsx"
                    }
                    </arguments>
                    </use_mcp_tool>

调用mcp读取文件

读取文件步骤是根据llm返回 调用了 readfile的mcp服务器

第二次调用LLM

第二次调用claude 并活得了返回

LLM Response: Based on the data from the Excel file, I can now identify the first country listed that has a name starting with "Co".         claude_openrouter_client.py:267

                    Looking through the country names in the first column, I can see the following countries that start with "Co":
                    1. Congo Democratic Republic (4th rank)
                    2. Comoros (45th rank)
                    3. Colombia (59th rank)
                    4. Congo Republic (28th rank)
                    5. Costa Rica (150th rank)

                    Therefore, the first country listed in the XLSX file that has a name starting with "Co" is **Congo Democratic Republic**, which appears as the 4th
                    ranked country in the 2023 Fragile States Index (FSI).

第二步根据mcp读取的文件信息基本确定了结果为刚果

第三次调用LLM

第三次调用对生产最终的结果进行摘要总结,并给出结果

LLM Response: # Summary of Task Completion                                                                                                   claude_openrouter_client.py:267

                    ## Task Overview
                    The task was to identify the first country listed in the XLSX file 'FSI-2023-DOWNLOAD.xlsx' that has a name starting with "Co".

                    ## Process and Findings

                    1. **Initial Approach**: I began by reading the Excel file from the provided path (/home/ljj/MiroFlow/data/FSI-2023-DOWNLOAD.xlsx) to examine its
                    contents.

                    2. **Data Examination**: The file contained the Fragile States Index (FSI) for 2023, listing countries with their rankings and various indicator
                    scores. The data was organized in a tabular format with countries in the first column.

                    3. **Country Identification**: After reviewing the data, I identified all countries that start with "Co" in the file:
                       - Congo Democratic Republic (ranked 4th)
                       - Comoros (ranked 45th)
                       - Colombia (ranked 59th)
                       - Congo Republic (ranked 28th)
                       - Costa Rica (ranked 150th)

                    4. **Determination of First Listed**: Based on the order of appearance in the file, Congo Democratic Republic was the first country with a name
                    starting with "Co", appearing as the 4th ranked country in the 2023 FSI.

                    ## Final Answer

                    \boxed{Congo Democratic Republic}

最后 \boxed 中的答案是最终的答案

从openrouter 中的调用记录中也可以看到 总共调用了三次 在第二次中输入的token数上涨比较多 主要是因为mcp读取并上传了 excel

从调用中可以看到大概花了0.09刀,大概6毛钱,
然后第三次为什么token数比第一次多很多,但价格相同呢?大概率绝大部分token都走了kv缓存

总结:

  1. 这一篇主要介绍了 MiroThinker项目,体验了一下官方的demo,可以看到依托于在线搜索,可以比较准确的总结出信息,信息的实时性较高,比简单的大模型问答要好很多,按照官网的等级分类 分成普通版和pro版,而我使用的是普通版,然后这次开源的有30B和235B的 普通版的如果只用了30B的模型那是比较惊喜,期待 本地跑起来量化模型
  2. 通过demo的日志分析了agent和大模型的交互流程,大致知道了整体的流程,接下来要分析一下代码,这个框架如果能本地模型和谷歌搜索的mcp能结合起来 还是有蛮多东西可以做的
  3. 使用claude 作为agent的基模 看任务是顺利完成了 但花费也不少,简单任务就花了6毛,如果只有单个任务或者百维度的任务成本还行,但如果是类似离线跑批的 成本还是比较大,要换成MiroThinker 试一下