TeamBot - 团队协作型AI助手
本地桌面端执行型 AI 助手,支持 Windows / macOS / Linux。
安装
一键安装(推荐)
macOS / Linux
curl -fsSL https://teambot.samai.cc/install.sh | bash
指定版本:
curl -fsSL https://teambot.samai.cc/install.sh | bash -s -- --version 1.52.0
Windows(PowerShell)
irm https://teambot.samai.cc/install.ps1 | iex
指定版本:
irm https://teambot.samai.cc/install.ps1 | iex -Version 1.52.0
首次运行若提示执行策略限制,先执行:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
系统要求
| 项目 | 要求 |
|---|---|
| 操作系统 | Windows 10+ / macOS 12+ / Ubuntu 20.04+ |
| Python | 3.10+ |
| 内存 | ≥ 512 MB |
一键安装脚本会自动下载独立可执行文件,无需 Python 或 Node.js。
启动命令
teambot # 默认启动(Web 管理后台)
teambot update # 更新到最新版
teambot web # Web 管理后台
teambot cli # CLI 交互模式
teambot tray # 系统托盘后台运行
teambot server # API 服务模式
teambot install # 安装/更新依赖
teambot uninstall # 卸载
配置 LLM
环境变量方式(推荐)
export TEAMBOT_LLM_API_KEY="sk-your-key"
export TEAMBOT_LLM_MODEL="gpt-4"
配置文件方式
首次运行自动创建 ~/.teambot/config.json,编辑即可:
{
"llm": {
"provider": "openai",
"api_key": "sk-...",
"model": "gpt-4"
}
}
Ollama 本地模型(免费)
curl -fsSL https://ollama.ai/install.sh | sh
ollama pull llama3
export TEAMBOT_LLM_PROVIDER="ollama"
export TEAMBOT_OLLAMA_MODEL="llama3"
发布客户端
⚠️ TeamBot 使用 Cython 编译发布,源码以 .so 二进制形式分发,不提供 sdist。
1. CI/CD 自动构建(推荐)
推送到 main 分支后,CI 自动执行 wf1 → wf2 → wf3 链式流程:
- wf1: Cython 编译 + 发布到 PyPI
- wf2: PyInstaller 打包 exe + 创建 runner 脚本(无 pip/npm)
- wf3: 上传二进制和安装脚本到 teambot.samai.cc/downloads/
2. 本地构建(当前平台)
python3 build_cython.py
构建产物在 dist/ 目录,为当前平台的 .whl 文件。
2. CI/CD 自动构建
推送到 main 分支后,CI 自动执行:
- wf1: Cython 编译 + 发布编译后 wheel 到 PyPI
- wf2: 构建多平台二进制(PyInstaller exe + runner 脚本,无 pip/npm)
- wf3: 上传到 teambot.samai.cc/downloads/ 并部署 install.sh / install.ps1
3. 跨平台构建(GitHub Actions)
推送版本标签即可自动构建所有平台的 wheel 并发布到 PyPI:
# 1. 更新版本号
# 编辑 package.json 和 pyproject.toml 中的 version 字段
# 2. 提交并打标签
git add .
git commit -m "release v1.52.0"
git tag v1.52.0
git push origin main --tags
4. 配置 PyPI Token
在 GitHub 仓库 Settings → Secrets and variables → Actions 中添加:
- Name:
PYPI_API_TOKEN - Value: 你的 PyPI API Token(
pypi-开头)
5. 构建说明
- 不发布 sdist:仅发布预编译 .whl 文件,避免 .py 源码泄露
- Cython 编译:大部分 .py 编译为 .so,仅入口文件和必要模块保留 .py
- 保留 .py 的模块:
main.py,config.py,tray_manager.py,monitor_timer.py,core/version.py,web/api_server.py等大型或关键模块
更新代码
用户端更新
teambot update
或重新运行安装脚本:
# macOS / Linux
curl -fsSL https://teambot.samai.cc/install.sh | bash
# Windows
irm https://teambot.samai.cc/install.ps1 | iex
开发者更新流程
-
修改代码:在本地仓库开发并测试
-
本地测试:
pip install -e . # 开发模式安装 teambot # 运行验证
-
构建测试:
python3 build_cython.py --test # 编译 + 导入测试
-
发布新版本:
# 更新版本号 → 提交 → 打标签 → 推送 git tag v1.53.0 git push origin main --tags
清理构建产物
python3 build_cython.py --clean
链接
- 官网: https://teambot.samai.cc
- 下载: https://teambot.samai.cc/downloads/
- GitHub: https://github.com/samaidev/teambot
- PyPI: https://pypi.org/project/teambot-ai
License
MIT
CI 构建说明(给维护者)
2026-08-28 PyPI 发布失败事故复盘
现象:build_publish_pypi 从 18:13 起连续失败 8 轮(21:13/21:31/21:35/22:26/22:34/22:41...),每轮死在 aiskills.browser_stealth 附近。
根因链(三层叠加):
aiskills/browser_stealth.py(195KB → Cython 生成 6.1MB C 文件)在 MSVC/O2下编译需数分钟且完全静默;- CI dispatcher watchdog 主循环静默 >300s 强杀 + master_scheduler 400s 兜底 taskkill → 构建进程被杀/成孤儿;
- 下一轮 wf1 的
_kill_stale_build_processes()无条件杀掉所有cl.exe/link.exe,把上一轮还在跑的构建也杀了 —— 构建时长 > 重试间隔,形成自杀式死循环。
修复(PR #72 / #73 + CI 侧加固):
agents/base.py:623:未定义变量idx→_idx(Cython 编译期报错的主因);setup.py:源文件 >120KB 的大模块用/O1编译(快一个数量级),小模块保持/O2;- CI wf1:stale-killer 只杀创建超过 20 分钟的编译进程 + 构建输出改为流式写日志(dispatcher 日志不再静默超时)。
维护提示:
- 新增大模块时注意生成 C 文件体积;若单模块编译可能超过 5 分钟,考虑拆分或降级优化级别;
- 改 CI 的
wf1_build_publish_pypi.py后需重启对应 dispatcher 进程才会生效(WORKFLOWS 启动时加载)。
Release files for teambot-ai 1.52.81
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| teambot_ai-1.52.81-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
Release files / teambot_ai-1.52.81-cp313-cp313-win_amd64.whl
| Download URL | teambot_ai-1.52.81-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 21.2 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
716728b91a32e4c8d13507044cc231fa0a6de74d704253a754bdcde652ba532d
|
|
BLAKE2b-256 checksum How to use checksums |
dcd4be8e15ad24b7b23b37aebdea3555641dfef4f3f843f56691a238b8a65a03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|