Skip to content

vizi2000/borgos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 BorgOS - AI-First Multi-Agent Operating System

License: MIT Python 3.11+ Docker FastAPI Agent Zero Zenith Coder

BorgOS is an AI-first operating system that integrates multiple AI agents, project management, and deployment automation into a unified platform. It combines the power of Agent Zero, Zenith Coder, and MCP (Model Context Protocol) to create an autonomous development and operations environment.

✨ Key Features

πŸ€– Multi-Agent System

  • Agent Zero: Autonomous AI with code execution, web browsing, and memory management
  • Zenith Coder: Specialized coding assistant with project analysis and generation
  • MCP Server: Model Context Protocol for enhanced AI interactions
  • Custom Agents: Extensible framework for specialized agents

πŸ“Š Project & Deployment Management

  • Real-time Monitoring: Track all projects and deployments
  • Auto-deployment: One-click deployment with automatic port management
  • Health Tracking: Automatic health checks and error monitoring
  • Resource Management: CPU and memory limits per deployment

πŸ” AI-Powered Search & Memory

  • Semantic Search: ChromaDB vector database integration
  • Persistent Memory: Long-term learning and context retention
  • Knowledge Base: Automatic documentation indexing
  • Cross-agent Memory: Shared knowledge between agents

πŸ› οΈ Developer Experience

  • Web Dashboard: Beautiful real-time monitoring interface
  • REST API: Comprehensive API with WebSocket support
  • Docker-First: Fully containerized architecture
  • CLI Tools: Command-line interface for all operations

πŸš€ Quick Start

Option 1: Docker Compose (Recommended)

# Clone the repository
git clone https://github.com/vizi2000/borgos.git
cd borgos

# Copy environment template and add your API keys
cp .env.example .env
nano .env  # Add your OpenAI/Anthropic API keys

# Start all services
docker-compose up -d

# Access the dashboard
open http://localhost:8080

Option 2: Quick Install Script

# One-line installation
curl -fsSL https://raw.githubusercontent.com/vizi2000/borgos/main/install.sh | bash

Option 3: Create Bootable USB (Full Linux Distribution)

# Create bootable BorgOS Linux USB
sudo ./create_full_borgos_usb.sh

πŸ“‹ System Requirements

Minimum Requirements

  • OS: Linux (Ubuntu 20.04+, Debian 11+), macOS 12+, Windows with WSL2
  • RAM: 4GB (8GB recommended)
  • Storage: 20GB free space
  • Docker: Version 20.10+
  • Docker Compose: Version 2.0+

For AI Features

  • API Keys: OpenAI, Anthropic, or local Ollama
  • GPU: Optional - NVIDIA GPU for local model inference

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              BorgOS Dashboard               β”‚
β”‚         (React + WebSocket Client)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           BorgOS Core API                   β”‚
β”‚  (FastAPI + WebSocket + Background Tasks)   β”‚
β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   β”‚          β”‚          β”‚          β”‚
β”Œβ”€β”€β–Όβ”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”
β”‚Postgreβ”‚  β”‚Redis β”‚  β”‚ChromaDBβ”‚ β”‚Dockerβ”‚
β”‚  SQL  β”‚  β”‚Cache β”‚  β”‚Vectors β”‚ β”‚Engineβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚      AI Agents Layer        β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚ β€’ Agent Zero                β”‚
    β”‚ β€’ Zenith Coder              β”‚
    β”‚ β€’ MCP Server                β”‚
    β”‚ β€’ Custom Agents             β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ€– AI Agents

Agent Zero

Powerful autonomous agent with capabilities:

  • Code Execution: Write and run code in isolated environments
  • Web Browsing: Search and extract information from the web
  • File Operations: Read, write, and manage files
  • Memory Management: Long-term memory and learning
  • Task Scheduling: Automated recurring tasks
  • Tool Creation: Dynamic tool generation

Zenith Coder

Specialized coding assistant featuring:

  • Project Analysis: Deep understanding of codebases
  • Code Generation: High-quality code creation
  • Error Detection: Automatic bug finding
  • Refactoring: Code improvement suggestions
  • Documentation: Automatic documentation generation

MCP Server

Model Context Protocol integration providing:

  • Enhanced Context: Better context management
  • Tool Registration: Dynamic tool discovery
  • Cross-agent Communication: Agent coordination
  • State Management: Persistent state across sessions

πŸ“š API Documentation

Core Endpoints

Projects

GET  /api/v1/projects         # List all projects
POST /api/v1/projects         # Create new project
GET  /api/v1/projects/{id}    # Get project details
POST /api/v1/projects/scan    # Scan for new projects

Deployments

GET  /api/v1/deployments      # List deployments
POST /api/v1/deploy           # Deploy project
POST /api/v1/deployments/{id}/stop    # Stop deployment
POST /api/v1/deployments/{id}/restart # Restart deployment

Agent Zero

GET  /api/v1/agent-zero/status       # Check Agent Zero status
POST /api/v1/agent-zero/start        # Start Agent Zero
POST /api/v1/agent-zero/execute      # Execute task
GET  /api/v1/agent-zero/capabilities # List capabilities

MCP Queries

POST /api/v1/mcp/query               # Execute MCP query
GET  /api/v1/mcp/tools               # List available tools

🚒 Deployment Options

Development

docker-compose up -d

Production

docker-compose -f docker-compose.prod.yml up -d

Kubernetes

kubectl apply -f k8s/

Bare Metal

sudo ./installer/install-to-disk.sh

πŸ”§ Configuration

Configuration via environment variables in .env:

# API Keys
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
OLLAMA_API_BASE_URL=http://localhost:11434

# Database
DB_HOST=postgres
DB_PORT=5432
DB_NAME=borgos
DB_USER=borgos
DB_PASSWORD=secure-password

# Features
AGENT_ZERO_ENABLED=true
ZENITH_ENABLED=true
MCP_ENABLED=true
AGENT_ZERO_AUTOSTART=false

# Ports
API_PORT=8081
DASHBOARD_PORT=8080
AGENT_ZERO_PORT=8085

πŸ“ Project Structure

borgos/
β”œβ”€β”€ core/                    # Core API server
β”‚   β”œβ”€β”€ main.py             # FastAPI application
β”‚   β”œβ”€β”€ agent_zero_integration.py
β”‚   β”œβ”€β”€ zenith_integration.py
β”‚   β”œβ”€β”€ mcp_server.py
β”‚   └── vector_store.py
β”œβ”€β”€ webui/                   # Dashboard UI
β”‚   β”œβ”€β”€ index.html
β”‚   └── static/
β”œβ”€β”€ database/                # Database schemas
β”‚   └── init.sql
β”œβ”€β”€ docker/                  # Docker configurations
β”‚   β”œβ”€β”€ Dockerfile.api
β”‚   └── Dockerfile.dashboard
β”œβ”€β”€ installer/               # Installation scripts
β”‚   β”œβ”€β”€ install-to-disk.sh
β”‚   └── quick-install.sh
β”œβ”€β”€ docs/                    # Documentation
└── docker-compose.yml       # Main compose file

πŸ› οΈ Development

Setup Development Environment

# Clone repository
git clone https://github.com/yourusername/borgos.git
cd borgos

# Install dependencies
pip install -r requirements-dev.txt

# Run tests
pytest tests/

# Start development server
python core/main.py

Running Tests

# Unit tests
pytest tests/unit/

# Integration tests
pytest tests/integration/

# Coverage report
pytest --cov=core --cov-report=html

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for:

  • Code of conduct
  • Development setup
  • Pull request process
  • Coding standards

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open a Pull Request

πŸ“– Documentation

πŸ› Troubleshooting

Common Issues

Docker containers not starting
# Check logs
docker-compose logs -f

# Restart services
docker-compose restart

# Clean restart
docker-compose down -v
docker-compose up -d
Agent Zero not responding
# Check status
curl http://localhost:8081/api/v1/agent-zero/status

# Restart Agent Zero
curl -X POST http://localhost:8081/api/v1/agent-zero/restart
Database connection issues
# Check PostgreSQL
docker-compose logs postgres

# Reset database
docker-compose down -v
docker-compose up -d

πŸ—ΊοΈ Roadmap

  • v2.1 - Kubernetes deployment support
  • v2.2 - Multi-user authentication
  • v2.3 - Plugin marketplace
  • v2.4 - Mobile application
  • v2.5 - Voice interface
  • v3.0 - Distributed agent coordination
  • Future - Quantum computing integration

πŸ“Š Performance

  • API Response Time: <100ms average
  • Agent Task Execution: 2-10s depending on complexity
  • Memory Usage: ~500MB base, 2GB with all agents
  • Concurrent Users: 100+ supported
  • Project Scanning: 1000+ files/second

πŸ”’ Security

  • Authentication: JWT-based authentication
  • Authorization: Role-based access control
  • Encryption: TLS 1.3 for all communications
  • Sandboxing: Isolated execution environments
  • Audit Logging: Complete audit trail

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ’¬ Support

⭐ Star History

Star History Chart


Made with ❀️ by the BorgOS Team

Website β€’ Documentation β€’ Live Demo β€’ Twitter