纳米爪
受Gemini CLI启发的轻量级Python代理框架,专注于实用的本地工作流:
- 带有工具调用的代理循环
- MCP集成
- 技能(逐步披露)
- 内存上下文
- 人在环审批
快速开始
git clone https://github.com/yourusername/nano-claw.git
cd nano-claw
pip install -r requirements.txt
cp config.example.yaml config.yaml在中设置API密钥 config.yaml (或环境变量),然后运行:
python main.py -c config.yaml运行模式
1) main.py (推荐)
- 阅读
config.yaml - 从配置初始化MCP
- 支持以下命令
/mcp,/mode,/skills
python main.py -c config.yaml2) cli.py (更轻的交互式外壳)
- 主要使用环境变量
- 更好的即时互动(
prompt_toolkit)
export OPENAI_API_KEY="your-key"
python cli.py配置
起点 config.example.yaml:
cp config.example.yaml config.yaml重要字段:
llm.provider:openai或geminiagent.approval_mode:plan/default/yolo/read_onlyskills.directories:技能搜索路径mcp.servers:MCP服务器定义
项目结构
core/ # agent loop, policy, llm client, types
tools/ # built-in / advanced / universal tools
skills/ # skill loader and activation
memory/ # memory manager
mcp_client/ # MCP connection and adapters
examples/ # demos
tests/ # tests备注
config.yaml默认情况下被git忽略(以避免密钥泄漏)。- 使用
config.example.yaml用于共享配置结构。 - 如果您以前使用过
nano_agent,此项目现在重命名为nano_claw.
发展
python -m pytest tests/
python examples/basic_demo.py
python examples/mcp_demo.py许可证
MIT。看 LICENSE.
