跳到主要内容

Platforms

MushroomAgent 支持 Linux、macOS 和 Windows。由于项目基于 Python,核心要求跨平台一致。

支持平台

平台状态说明
Linux支持原生。长期运行 serve 建议使用 systemd。
macOS支持原生。如需新版 Python,用 brew 安装。
Windows支持推荐使用 WSL。原生 Python 也可运行,需注意路径写法。

跨平台检查清单

无论什么平台,请确认:

  1. Python 3.11+python3 --version 确认
  2. uvpip — 强烈推荐 uv
  3. 已执行 uv sync 并激活 .venv
  4. 已执行 mushroom-agent init 创建 ~/.mushroom_agent/
  5. config.yaml 中已填写 llm.api_key
  6. 浏览器能访问 http://127.0.0.1:7860/i/chat

平台说明

Linux

开箱即用。如需将 mushroom-agent serve 作为常驻服务,使用 systemd

[Unit]
Description=MushroomAgent
After=network.target

[Service]
Type=simple
User=your-user
WorkingDirectory=/path/to/MushroomAgent
ExecStart=/path/to/MushroomAgent/.venv/bin/mushroom-agent serve
Restart=on-failure

[Install]
WantedBy=multi-user.target

macOS

如果系统自带 Python 版本过旧,通过 Homebrew 安装新版:

brew install python@3.12

长期运行 serve 可使用 launchdtmux/screen

Windows

推荐使用 WSL2,按上方 Linux 说明操作即可。

如果使用原生 Windows:

  • python.org 安装 Python
  • config.yaml 中请使用绝对路径(不支持 ~ 展开)
  • 虚拟环境激活命令为 .venv\Scripts\activate