Skip to content

A local computer operation agent based on an Ollama visual model (such as Qwen3-VL:30b).

License

Notifications You must be signed in to change notification settings

Noyze-AI/Ollama-ComputerUse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ollama-ComputerUse

一个基于 Ollama 视觉模型(如 Qwen3-VL:30b)的本地计算机操作代理。它允许模型“看到”你的屏幕并通过模拟鼠标和键盘操作来执行任务。

功能特点

  • 完全本地化:利用 Ollama 在本地运行视觉模型,保护隐私。
  • Web 界面:简洁的 Web 控制面板,实时查看代理的思考过程和屏幕截图。
  • 自动操作:支持移动鼠标、点击、键入、滚动等操作。
  • 多步推理:代理会根据当前屏幕状态进行多步推理,直到完成任务。
  • 视觉辅助:在 Web UI 中实时展示模型看到的画面。

环境要求

  • Python 3.10+
  • Ollama: 确保已安装并正在运行 (ollama serve)。
  • 视觉模型: 推荐使用 Qwen3-VL:30b
    ollama pull Qwen3-VL:30b
  • 操作系统: 建议在 Windows 上运行。

安装步骤

  1. 克隆项目:

    git clone https://github.com/your-username/Ollama-ComputerUse.git
    cd Ollama-ComputerUse
  2. 安装依赖:

    pip install -r requirements.txt

使用说明

  1. 运行项目:

    • Windows 用户可以直接双击 run.bat
    • 或者手动运行:
      python main.py
  2. 打开浏览器访问 http://localhost:8000

  3. 在界面上:

    • 选择模型(例如 Qwen3-VL:30b)。
    • 输入你的指令(例如:“帮我打开记事本并写一段关于人工智能的话”)。
    • 点击 Start Agent 开始。

项目结构

Ollama-ComputerUse/
├── backend/            # 后端核心逻辑
│   ├── actions.py      # 计算机操作实现 (PyAutoGUI)
│   ├── agent.py        # 代理循环与推理逻辑
│   └── ollama_client.py # Ollama API 调用封装
├── static/             # 前端静态资源
│   └── index.html      # Web UI 界面
├── main.py             # FastAPI 入口程序
├── requirements.txt    # 项目依赖
├── run.bat             # Windows 启动脚本
└── .gitignore          # Git 忽略配置

注意事项

  • 安全风险: 此程序允许模型控制你的计算机。请在受控环境中使用,并确保你的指令是安全的。
  • 分辨率: 代理使用 1000x1000 的归一化坐标系,能较好适配不同分辨率的屏幕。

开源协议

MIT License

About

A local computer operation agent based on an Ollama visual model (such as Qwen3-VL:30b).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published