AI模拟器生态系统
 ](https://docker.com)  ](https://nodejs.org) 
AI仿真器生态系统是一个全面的编排平台,它将10个专门的AI服务与模型上下文协议(MCP)支持集成在一起,通过微服务架构提供对各种AI功能的统一访问。
🚀 快速开始
One Command生态系统启动
# Clone the repository
git clone https://github.com/ai-ecosystem/future-app.git
cd future-app
# Copy environment template
cp .env.example .env
# Edit environment variables (add your API keys)
nano .env
# Launch the complete ecosystem
docker-compose -f docker-compose.ecosystem.yml up -d
# Access services
open http://localhost:3000 # Grafana Dashboard
open http://localhost:8000 # AIOS API个性化服务快速入门
Kali桌面MCP服务器
# Start security testing environment
docker run -d --name kali-desktop \
-p 5901:5901 -p 6080:6080 \
--privileged \
kalilinux/kali-rolling bash -c "
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
kali-desktop-xfce tightvncserver novnc websockify \
firefox-esr nmap sqlmap wireshark metasploit-framework \
python3-opencv python3-pip && \
pip3 install vncdotool pynput && \
mkdir -p /root/.vnc && \
echo 'kali' | vncpasswd -f > /root/.vnc/passwd && \
chmod 600 /root/.vnc/passwd && \
vncserver :1 -geometry 1920x1080 -depth 24 && \
/usr/share/novnc/utils/launch.sh --vnc localhost:5901 --listen 6080 &
tail -f /dev/null"
# Access at http://localhost:6080 (password: kali)📋 目录
✨ 特性
🤖 AI/LLM操作系统
- AIOS:具有LLM路由、内存管理和工具集成的完整AI代理操作系统
- 盒子:具有沙盒和资源管理功能的AI代理环境提供商
🖥️ 计算机控制与自动化
- bytebot:具有虚拟环境和VNC集成的AI桌面代理
- 开放式界面:采用API-first设计的交叉板型计算机控制
- macOS使用:macOS自动化与苹果生态系统集成
- 事实-AI:人工智能驱动的测试自动化,具有可视化测试功能
🎨 专业应用
- 后缀:社交媒体日程安排和内容管理平台
- 只有snarf:Only Fans自动化和内容分发平台
- 卷轴夹自动装置:Instagram卷轴和视频剪辑自动化
- Wan2GP:具有人工智能内容创建功能的视频生成平台
🛠️ 基础设施和工具
- MCP注册表:MCP客户端的服务发现和工具注册
- 综合监控普罗米修斯、格拉法纳和警报
- 集中化的日志:Elasticsearch、Logstash、Kibana堆栈
- 健康检查:自动化服务健康监测
- 安全:JWT身份验证、速率限制、加密
🏗️ 建筑
┌─────────────────────────────────────────────────────────────────────┐
│ AI Emulators Ecosystem │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ User Interface Layer │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ Web UI │ │ API │ │ CLI │ │ │
│ │ │ (Grafana) │ │ Gateway │ │ Tools │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Orchestration & Control Layer │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ AIOS │ │ MCP Registry│ │ Agent │ │ │
│ │ │ (Agent OS) │ │ Service │ │ System │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Specialized Services Layer │ │
│ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │
│ │ │GBox │ │Byte│ │Open │ │macOS│ │Factif│ │Postiz│ │ │
│ │ │Env │ │bot │ │Intf │ │-use │ │-AI │ │-app │ │ │
│ │ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │ │
│ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │
│ │ │Only │ │Reels│ │Wan2 │ │Kali │ │ │ │ │ │ │
│ │ │Snarf│ │Auto │ │GP │ │Desk │ │ │ │ │ │ │
│ │ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ └─────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Infrastructure & Data Layer │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ PostgreSQL │ │ Redis │ │ Prometheus │ │ │
│ │ │ Database │ │ Cache │ │ Monitoring │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘有关详细的体系结构信息,请参见 建筑.md
📦 服务
核心服务
| 服务 | 描述 | 端口 | 状态 |
|---|---|---|---|
| AIOS | 人工智能代理操作系统 | 8000 | 🟢 活动 |
| 盒子 | 人工智能环境提供商 | 3000 | 🟢 活动 |
| MCP注册表 | 工具发现服务 | 8002 | 🟢 活动 |
计算机控制服务
| 服务 | 描述 | 端口 | 状态 |
|---|---|---|---|
| bytebot | AI桌面代理 | 4000 | 🟢 活动 |
| 开放式界面 | 跨平台控制 | 5000 | 🟢 活动 |
| macOS使用 | macOS自动化 | 6000 | 🟢 活动 |
| 事实-AI | 人工智能测试自动化 | 7000 | 🟢 活动 |
| Kali桌面 | 安全测试 | 6080 | 🟢 活动 |
内容和社会服务
| 服务 | 描述 | 端口 | 状态 |
|---|---|---|---|
| 后缀 | 社交媒体日程安排 | 9000 | 🟢 活动 |
| 只有snarf | 内容分发 | 10000 | 🟢 活动 |
| 卷轴夹自动装置 | 视频自动化 | 11000 | 🟢 活动 |
| Wan2GP | 视频生成 | 12000/7860 | 🟢 活动 |
基础设施服务
| 服务 | 描述 | 端口 | 状态 |
|---|---|---|---|
| PostgreSQL | 主数据库 | 5432 | 🟢 活动 |
| 瑞迪斯 | 缓存和消息队列 | 6379 | 🟢 活动 |
| 普罗米修斯 | 指标收集 | 9090 | 🟢 活动 |
| 格拉法纳 | 监控仪表板 | 3000 | 🟢 活动 |
| Nginx | 反向代理 | 80/443 | 🟢 活动 |
🛠️ 安装
系统要求
- 操作系统:支持Docker的Linux/macOS/Windows
- 中央处理器:4+核心(建议8+核心)
- 随机存取存储器:最低16GB(建议32GB+)
- 存储:50GB可用空间
- 图形处理器:NVIDIA GPU(可选,用于AI/ML服务)
Docker安装
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# For GPU support (optional)
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker环境设置
# Clone repository
git clone https://github.com/ai-ecosystem/future-app.git
cd future-app
# Copy environment template
cp .env.example .env
# Edit environment variables
nano .env所需的环境变量:
# Database
POSTGRES_PASSWORD=your_secure_password
GRAFANA_PASSWORD=your_grafana_password
# AI Services
OPENAI_API_KEY=sk-your-openai-key
HUGGINGFACE_TOKEN=hf_your-huggingface-token
# Authentication
JWT_SECRET=your-256-bit-jwt-secret
# VNC/Desktop
VNC_PASSWORD=your-vnc-password⚙️ 配置
开发配置
# Start development environment
docker-compose -f docker-compose.dev.yml up -d
# View service logs
docker-compose -f docker-compose.dev.yml logs -f [service-name]
# Run tests
npm run test
python -m pytest tests/生产配置
# Start production environment
docker-compose -f docker-compose.prod.yml up -d
# Scale services
docker-compose -f docker-compose.prod.yml up -d --scale aios=3
# Update services
docker-compose -f docker-compose.prod.yml up -d --no-deps [service-name]有关详细的配置选项,请参阅 配置.md
🎯 用法
基本使用示例
AI文本生成
from ai_ecosystem_sdk import AIEcosystemClient
client = AIEcosystemClient(api_key="your-api-key")
response = client.ai.generate_completion(
prompt="Explain quantum computing",
model="gpt-4-turbo-preview",
max_tokens=500
)
print(response.choices[0].text)计算机自动化
# Take screenshot
screenshot = client.computer.capture_screenshot()
print(f"Screenshot captured: {screenshot.id}")
# Simulate user input
client.computer.click_at(x=500, y=300)
client.computer.type_text("Hello World!")社交媒体管理
# Schedule a post
post = client.social.schedule_post(
content="Exciting AI developments! #AI #Tech",
platforms=["twitter", "linkedin"],
scheduled_time="2024-01-02T10:00:00Z"
)
print(f"Post scheduled: {post.id}")MCP工具使用
const { MCPClient } = require('@ai-ecosystem/mcp-client');
const client = new MCPClient({
registryURL: 'http://localhost:8002'
});
// Discover tools
const tools = await client.discoverTools();
console.log('Available tools:', tools.map(t => t.name));
// Use Kali desktop tools
const screenshot = await client.callTool('kali_screenshot', {
analyze: true
});高级用法
工作流程编排
from ai_ecosystem_sdk import Workflow
# Create a content creation workflow
workflow = Workflow(client)
@workflow.step
async def generate_content():
return await client.ai.generate_completion(
prompt="Write an engaging social media post about AI",
model="gpt-4-turbo-preview"
)
@workflow.step(depends_on=generate_content)
async def create_visual(content):
return await client.video.generate_video(
prompt=f"Create visuals for: {content}",
duration=15
)
@workflow.step(depends_on=[generate_content, create_visual])
async def schedule_post(content, video):
return await client.social.schedule_post(
content=content,
media_urls=[video.download_url],
platforms=["twitter", "instagram"]
)
# Execute workflow
result = await workflow.execute()
print("Content workflow completed:", result)实时监控
const monitor = client.monitor.createDashboard({
services: ['aios', 'kali-desktop', 'wan2gp'],
metrics: ['cpu_usage', 'memory_usage', 'request_rate'],
alerts: {
high_cpu: { threshold: 90, duration: '5m' },
high_memory: { threshold: 85, duration: '3m' }
}
});
monitor.on('alert', (alert) => {
console.log('Alert triggered:', alert);
});
monitor.on('metric_update', (service, metrics) => {
console.log(`${service} metrics:`, metrics);
});📚 API文档
REST API端点
人工智能操作
POST /api/v1/ai/generate-生成AI完成项POST /api/v1/ai/chat-多回合对话GET /api/v1/ai/models-列出可用型号
计算机控制
POST /api/v1/computer/screenshot-截图POST /api/v1/computer/click-模拟鼠标点击POST /api/v1/computer/type-发送键盘输入GET /api/v1/computer/windows-列出打开的窗口
社交媒体
GET /api/v1/social/posts-列出已安排的帖子POST /api/v1/social/posts-安排新职位DELETE /api/v1/social/posts/{id}-删除已安排的帖子
视频生成
POST /api/v1/video/generate-生成视频GET /api/v1/video/generation/{id}/progress-检查进度GET /api/v1/video/generation/{id}/result-获取结果
MCP工具规格
所有服务都公开了用于AI代理集成的MCP工具:
// Available tool categories
const toolCategories = {
ai: ['generate_completion', 'chat_completion', 'analyze_text'],
computer: ['screenshot', 'click', 'type_text', 'get_windows'],
social: ['schedule_post', 'get_posts', 'analyze_engagement'],
video: ['generate_video', 'edit_video', 'add_subtitles'],
security: ['scan_network', 'analyze_vulnerability', 'penetration_test']
};有关API的完整文档,请参阅 API毫米
💻 发展
开发设置
# Install development dependencies
pip install -r requirements-dev.txt
npm install
# Set up pre-commit hooks
pre-commit install
# Run development server
docker-compose -f docker-compose.dev.yml up -d
npm run dev测试
# Run all tests
npm run test:all
# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:e2e
# Run with coverage
npm run test:coverage
# Run performance tests
npm run test:performance代码质量
# Lint code
npm run lint
python -m flake8 .
# Format code
npm run format
python -m black .
# Type checking
npm run type-check
python -m mypy .有关详细的开发信息,请参阅 Developpent.md
🤝 贡献
我们欢迎捐款!请查看我们的 贡献指南 了解详情。
快速贡献步骤
- 分叉存储库
- 创建要素分支(
git checkout -b feature/amazing-feature) - 按照我们的代码标准进行更改
- 为您的更改添加测试
- 确保所有测试通过
- 提交拉取请求
开发工作流程
- 使用 Git 工作流 分支策略
- 遵循常规提交消息
- 编写全面的测试
- 更新文档
- 确保CI/CD通过
📄 许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
🙏 致谢
- 用于GPT模型和API的OpenAI
- 拥抱脸为模特主持
- Docker用于容器化
- 神奇工具的开源社区
📞 支持
- 文档: docs/
- 问题:
- 讨论:
- 电子邮件: support@ai-ecosystem.com
______________________________________________________________________
AI模拟器生态系统 -通过统一的服务编排实现人工智能驱动的自动化。
