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