Token导航 LogoToken导航TokenDH.com
Windows AI Agent logo
运维云端stdio官方级别未说明来源级核验

Windows AI Agent

MCP Server

一个完全离线的桌面代理,可以通过自然语言控制您的Windows PC,支持文件操作、应用程序控制、输入模拟等多种功能。

工具数

31

提示词数

0

GitHub Stars

0

资源数

0
本地LLMPython云端部署

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

PranayMahendrakar

提供方

PranayMahendrakar

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install requests

详细介绍

🤖 Windows AI代理

使用LLaMA 4+MCP风格工具的离线AI驱动的Windows控制系统

一个完全离线的桌面代理,可以通过自然语言控制您的Windows PC。受模型上下文协议(MCP)架构的启发,通过Ollama使用本地LLM推理构建。

✨ 特性

  • 100%离线 -安装后不需要互联网
  • 自然语言控制 -告诉它该怎么做
  • 30+工具 -文件操作、应用程序控制、输入模拟等
  • 设计安全 -破坏性行为的确认提示
  • 可扩展 -易于添加新工具

🚀 快速开始

先决条件

  1. 奥拉玛 -从以下位置安装 奥拉玛
  2. Python 3.10+ -从以下位置安装 python.org
  3. LLaMA 4 -拉动模型:
   ollama pull llama4

安装

# Clone or extract the project
cd windows-ai-agent

# Install dependencies
pip install requests

# Optional: For Windows-specific features
pip install psutil pywin32

# Optional: For GUI
pip install PyQt6

跑步

首先测试系统:

python test_system.py

CLI界面:

python main.py

GUI界面:

python ui/gui.py

或者在Windows上,只需双击:

  • run_cli.bat -命令行界面
  • run_gui.bat -图形界面
  • run_test.bat -系统测试

📁 项目结构

windows-ai-agent/
├── main.py                 # Entry point
├── test_system.py          # System verification
├── requirements.txt        # Dependencies
│
├── core/                   # Core types and utilities
│   └── types.py            # Data classes and enums
│
├── config/                 # Configuration
│   └── settings.py         # Agent settings
│
├── llm/                    # LLM integration
│   └── client.py           # Ollama client
│
├── tools/                  # Tool system
│   ├── server.py           # MCP-style tool server
│   └── registry.py         # Tool definitions
│
├── windows_control/        # Windows control layer
│   ├── filesystem.py       # File operations
│   ├── processes.py        # Process/app control
│   └── input.py            # Keyboard/mouse
│
├── orchestrator/           # Agent intelligence
│   └── agent.py            # Main agent logic
│
└── ui/                     # User interfaces
    ├── cli.py              # Command line
    └── gui.py              # PyQt6 GUI

🔧 可用工具

文件系统

  • file_read -读取文件内容
  • file_write -写入/创建文件
  • file_delete -删除文件/文件夹
  • file_copy -复制文件
  • file_move -移动/重命名文件
  • file_search -按名称/内容搜索
  • file_info -获取文件元数据
  • directory_list -列出文件夹内容
  • directory_create -创建文件夹

应用程序

  • app_open -启动应用程序
  • app_close -关闭应用程序
  • app_list_installed -列出已安装的应用程序

过程

  • process_list -列出正在运行的进程
  • process_info -获取流程详细信息
  • process_kill -终止进程

视窗

  • window_list -列出打开的窗口
  • window_focus -聚焦窗口
  • window_minimize -最小化窗口
  • window_maximize -最大化窗口
  • window_close -关闭窗口

输入

  • keyboard_type -键入文本
  • keyboard_press -按键
  • keyboard_hotkey -按键组合
  • mouse_click -点击鼠标
  • mouse_move -移动光标
  • mouse_scroll -滚轮
  • mouse_drag -拖动操作
  • mouse_position -获取光标位置

剪贴板

  • clipboard_get -获取剪贴板文本
  • clipboard_set -设置剪贴板文本
  • clipboard_clear -清除剪贴板

💡 示例用法

You: Open notepad
🤖 I'll open Notepad for you.
   🔧 Executing: app_open
   ✅ Success
🤖 Notepad is now open!

You: List files in my Documents folder
🤖 Let me check your Documents folder.
   🔧 Executing: directory_list
   ✅ Success
🤖 Found 15 items in your Documents folder:
   - report.docx (2.3 MB)
   - photos/ (folder)
   ...

You: Create a new folder called "Projects" on my desktop
🤖 I'll create that folder for you.
   🔧 Executing: directory_create
   ✅ Success
🤖 Created "Projects" folder on your desktop!

⚙️ 配置

编辑 config/settings.py 或创建 config/agent_config.json:

{
  "llm": {
    "model": "llama4",
    "base_url": "http://localhost:11434",
    "temperature": 0.7,
    "max_tokens": 4096
  },
  "security": {
    "default_permission_tier": "operator",
    "tools_requiring_confirmation": [
      "file_delete",
      "process_kill"
    ]
  }
}

🔒 安全

  • 受保护的路径:无法修改C:\\Windows程序文件
  • 确认:破坏性行动需要批准
  • 权限级别:观察员→ 操作员→ 管理员→ 系统
  • 审计跟踪:记录所有操作

🛠️ 故障排除

“无法连接到Ollama”

# Make sure Ollama is running
ollama serve

# Check if model is available
ollama list

“找不到模型”

# Pull the model
ollama pull llama4

# Or try a specific version
ollama pull llama4:latest

“工具执行失败”

  • 检查您是否拥有必要的权限
  • 某些工具需要Windows上的管理员权限
  • 安装 psutilpywin32 实现完整功能

📝 添加自定义工具

在中创建新工具 tools/registry.py:

# Add to create_all_tools() function
tools.append((
    create_tool_schema(
        name="my_custom_tool",
        description="Description of what it does",
        category=ToolCategory.SYSTEM,
        risk_level=RiskLevel.LOW,
        parameters=[
            {"name": "param1", "type": "string", "description": "Parameter description"},
        ],
    ),
    lambda args: {"result": {"success": True, "data": args["param1"]}}
))

🗺️ 路线图

  • \[\]语音输入(耳语)
  • \[\]语音输出(TTS)
  • \[\]UI自动化(按名称单击按钮)
  • \[\]屏幕截图分析
  • \[\]内存/上下文持久性
  • \[\]多步骤任务规划
  • \[\]插件系统

📜 许可证

MIT许可证-可自由用于个人和商业项目。

🙏 积分

  • 奥拉玛 -本地LLM推理
  • 羊驼 -Meta的语言模型
  • 人类MCP -协议灵感

______________________________________________________________________

建于❤️ 用于离线AI自动化

目录标签

目录标签

本地LLMPython云端部署离线AI本地部署自然语言控制Windows自动化桌面代理

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

31

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP