2.8 KiB
2.8 KiB
AI Agent Collaboration Framework - 安装指南
🚀 快速安装
一键安装
curl -fsSL https://raw.githubusercontent.com/your-org/agent-collaboration-framework/main/install.sh | bash
手动安装
1. 克隆项目
git clone https://github.com/your-org/agent-collaboration-framework.git
cd agent-collaboration-framework
2. 运行安装脚本
chmod +x install.sh
./install.sh
3. 验证安装
./agents/stats.sh
📋 系统要求
必需组件
- Python 3.8+
- Git 2.20+
- OpenSSH
可选组件
- GPG (用于代码签名)
- Node.js (用于Web界面)
- Docker (用于容器化部署)
🔧 配置步骤
1. 初始化Agent
./setup_agents.sh
2. 配置Git远程仓库
# 添加你的GitHub仓库
./agents/configure_remote.sh github your-username your-repo
# 添加Gitea仓库
./agents/configure_remote.sh gitea your-gitea-instance your-repo
3. 测试Agent身份
# 查看当前Agent
./agents/switch_agent.sh claude-ai
git config user.name # 应该显示 "claude-ai"
# 切换Agent
./agents/switch_agent.sh gemini-dev
git config user.name # 应该显示 "gemini-dev"
🎯 使用示例
基本使用
# 启动协作演示
python3 agents/demo_collaboration.py
# 手动协作流程
./agents/switch_agent.sh claude-ai
echo "# 架构设计" > docs/arch.md
git add docs/arch.md
git commit -m "添加架构设计" --author="claude-ai <claude@ai-collaboration.local>"
./agents/switch_agent.sh gemini-dev
echo "console.log('Hello');" > src/app.js
git add src/app.js
git commit -m "添加应用代码" --author="gemini-dev <gemini@ai-collaboration.local>"
高级用法
# 批量Agent操作
./scripts/bulk_commit.sh "更新文档" --agents="claude-ai,llama-research"
# 代码审查模式
./scripts/review_mode.sh
# 性能分析
./scripts/analyze_contributions.sh
🐳 Docker安装
使用Docker Compose
docker-compose up -d
构建镜像
docker build -t agent-collaboration .
docker run -it agent-collaboration
🔍 故障排除
常见问题
GPG签名失败
# 禁用GPG签名
git config --global commit.gpgsign false
SSH密钥问题
# 重新生成SSH密钥
./scripts/regenerate_keys.sh
权限问题
# 修复文件权限
chmod +x agents/*.sh
📊 验证安装
运行测试套件:
python3 -m pytest tests/
查看Agent状态:
./agents/stats.sh --verbose
🎉 下一步
安装完成后,建议:
💡 提示
- 使用
./agents/help.sh获取帮助 - 查看示例项目
examples/目录 - 加入社区讨论 Discussions