Platforms
MushroomAgent 支持 Linux、macOS 和 Windows。由于项目基于 Python,核心要求跨平台一致。
支持平台
| 平台 | 状态 | 说明 |
|---|---|---|
| Linux | 支持 | 原生。长期运行 serve 建议使用 systemd。 |
| macOS | 支持 | 原生。如需新版 Python,用 brew 安装。 |
| Windows | 支持 | 推荐使用 WSL。原生 Python 也可运行,需注意路径写法。 |
跨平台检查清单
无论什么平台,请确认:
- Python 3.11+ —
python3 --version确认 uv或pip— 强烈推荐uv- 已执行
uv sync并激活.venv - 已执行
mushroom-agent init创建~/.mushroom_agent/ config.yaml中已填写llm.api_key- 浏览器能访问
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 可使用 launchd 或 tmux/screen。
Windows
推荐使用 WSL2,按上方 Linux 说明操作即可。
如果使用原生 Windows:
- 从 python.org 安装 Python
config.yaml中请使用绝对路径(不支持~展开)- 虚拟环境激活命令为
.venv\Scripts\activate