Skip to main content

MiMo Desktop Control SDK - Three-Layer Architecture (Decision + Execution + Verify)

Project description

MI Hands v3.0

MiMo 桌面控制 SDK - AI 驱动的自进化桌面自动化

特性

  • 🧠 自进化系统 - 越用越聪明,成功/失败经验自动积累
  • 🏗️ 三层架构 - 决策层(MiMo) + 执行层(多引擎) + 验证层(截图检查)
  • 🔧 32 个 MCP 工具 - 完整的桌面操作能力
  • 🛡️ 安全加固 - 白名单机制、路径限制、操作日志
  • 🔄 学习循环 - 失败→反馈→重新规划→再执行
  • 📊 智能验证 - 截图对比、UIA 树分析、失败诊断

架构

MCP 插件层 (32 工具)
    ↓
自进化系统 (经验管理 + 学习循环 + 智能验证)
    ↓
三层架构 (决策层 + 执行层 + 验证层)
    ↓
底层引擎 (UIA + pyautogui + Win32 + PIL)

安装

pip install mi-hands

配置

设置 MiMo API Key

export MIMO_API_KEY="your-api-key"

MCP 配置(以 Claude Code 为例)

.claude/settings.json 中添加:

{
  "mcpServers": {
    "mi-hands": {
      "command": "python",
      "args": ["-m", "src.v3.mcp.plugin"]
    }
  }
}

使用

基本操作

# 通过 MCP 调用
from src.v3.mcp.plugin import create_mcp_server

mcp = create_mcp_server()
# 然后可以通过 MCP 协议调用工具

可用工具(32 个)

类别 工具
核心 run_task, snapshot, analyze_screen
点击 click, double_click, scroll, drag
输入 type_text, press_key, hotkey
绘制 draw_path, draw_curve, draw_circle
窗口 list_windows, activate_window
文件 read_file, write_file, list_files
脚本 execute_script
Skill find_skill, install_skill, list_skills
监控 get_metrics, get_action_history, rollback
记忆 get_memory_stats, get_learning_stats

自进化系统

MI Hands v3.0 的核心特性是自进化

  1. 成功经验记录 - 操作成功后自动记录步骤
  2. 失败经验学习 - 操作失败后记录原因和改进方向
  3. 智能验证 - 截图检查是否真正完成任务
  4. 学习循环 - 失败时自动重新规划
# 示例:刷抖音
# 第一次:AI 尝试用 scroll(),失败
# 记录经验:scroll() 不适用于抖音桌面版
# 第二次:AI 用 press('down'),成功
# 记录经验:抖音桌面版用键盘切换视频
# 第三次:直接复用成功经验

测试

# 运行所有测试
python -m pytest tests/ -v

# 运行特定测试
python -m pytest tests/test_verify.py -v

项目结构

MI-Hands/
├── src/v3/
│   ├── core/              # 核心模块(18 个)
│   │   ├── host_agent.py  # 决策层
│   │   ├── app_agent.py   # 执行层
│   │   ├── verify.py      # 验证层
│   │   ├── experience_manager.py  # 经验管理
│   │   ├── learning_loop.py       # 学习循环
│   │   └── smart_verify.py        # 智能验证
│   └── mcp/
│       └── plugin.py      # MCP 插件(32 个工具)
├── experience/            # 经验存储
├── tests/                 # 测试(136 个)
└── README.md

贡献

欢迎贡献代码!请查看 CONTRIBUTING.md

许可证

MIT License

更新日志

v3.0.0 (2026-06-08)

  • 🎉 全新自进化系统
  • 🏗️ 重构为三层架构
  • 🛡️ 安全加固(白名单、路径限制)
  • 🧪 136 个测试全部通过
  • 📦 32 个 MCP 工具

v2.0.0 (2026-06-05)

  • 🧩 插件架构
  • 📚 操作指南库
  • 🌐 GitHub 社区

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mi_hands-3.0.0.tar.gz (115.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mi_hands-3.0.0-py3-none-any.whl (135.1 kB view details)

Uploaded Python 3

File details

Details for the file mi_hands-3.0.0.tar.gz.

File metadata

  • Download URL: mi_hands-3.0.0.tar.gz
  • Upload date:
  • Size: 115.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for mi_hands-3.0.0.tar.gz
Algorithm Hash digest
SHA256 603226bdf0ee5bbbcd7044b6d5862c7825353415653295007bcbb0fa6a6090bd
MD5 45aa0ac3746e03eab7554aa2aefc9a0c
BLAKE2b-256 4088095a5260999d22ce224e237772744a8211275693503186eae07ff39e87e9

See more details on using hashes here.

File details

Details for the file mi_hands-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: mi_hands-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 135.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for mi_hands-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 764ab9d2171367b0ba0e48451e705597609069e15335ef56a851b53876c82674
MD5 2dff87f86618cc31b7f0193c14037c0c
BLAKE2b-256 e2fd321067310070ecf3665d69e3d5516d3651c87d16833ec73f179a6fefa6f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page