nanobot - 安装与配置
个人github项目:github.com/nlpming/nan…
1. nanobot安装配置
1.1 源码安装
# 创建虚拟环境
python3 -m venv .venv
# 执行安装命令
git clone https://github.com/HKUDS/nanobot.git
cd nanobot
pip install -e .
1.2 配置minimax coding plan
platform.minimaxi.com/docs/token-…
配置文件位置:~/.nanobot/config.json
1.2.1 配置使用的模型
"agents": {
"defaults": {
"workspace": "~/.nanobot/workspace",
"model": "MiniMax-M2.5",
"provider": "auto",
"maxTokens": 8192,
"contextWindowTokens": 65536,
"temperature": 0.1,
"maxToolIterations": 40,
"reasoningEffort": null,
"timezone": "UTC" # 时区配置:Asia/Shanghai
}
},
1.2.2 配置MiniMax api key
"providers": {
"minimax": {
"apiKey": "xxx",
"apiBase": "https://api.minimaxi.com/v1",
"extraHeaders": null
},
}
1.3 配置飞书机器人
现在飞书开发平台注册飞书机器人,并开通相关权限:open.feishu.cn/?lang=zh-CN
"channels": {
"feishu": {
"enabled": true,
"appId": "xxx",
"appSecret": "xxx",
"encryptKey": "xxx",
"verificationToken": "xxx",
"allowFrom": ["*"],
"reactEmoji": "THUMBSUP",
"groupPolicy": "mention",
"replyToMessage": false,
"streaming": true
},
}
1.4 配置mcp
"tools": {
"mcpServers": {
"notes": {
"command": "/Users/mac/PycharmProjects/nanobot/venv/bin/python",
"args": ["/Users/mac/.nanobot/workspace/mcp/notes_server.py", "--notes-dir", "~/.nanobot/workspace/notes"]
}
}
}
1.5 配置web search(tavily search)
"tools": {
"web": {
"proxy": null,
"search": {
"provider": "tavily",
"apiKey": "xxx",
"baseUrl": "",
"maxResults": 5
}
},
}