Skip to content

zhaofei0923/oh_my_brain

Repository files navigation

🧠 OH MY BRAIN

CI PyPI Python License

English | δΈ­ζ–‡

Multi-Agent Collaborative Development Framework - Let AI Teams Code for You in Parallel

✨ Features

  • 🧠 Central Brain Coordination - Brain manages task distribution, context, and Git operations
  • πŸ€– Parallel Multi-Worker - Multiple AI Agents develop different modules simultaneously
  • πŸ”Œ Flexible AI Configuration - Choose different models per task type (cost/performance trade-offs)
  • πŸ“‹ Standardized Dev Docs - YAML format, can be generated by any AI
  • πŸ”’ Safety Audit - Dangerous commands are pre-reviewed to protect your codebase
  • πŸ“Š Real-time Monitoring - Dashboard to view each Worker's progress
  • πŸ–₯️ Cross-Platform - Supports Linux, macOS, Windows, and WSL

πŸ— Architecture

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚            BRAIN                β”‚
                    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
                    β”‚  β”‚ Context β”‚ β”‚  Model  β”‚       β”‚
                    β”‚  β”‚ Manager β”‚ β”‚  Router β”‚       β”‚
                    β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜       β”‚
                    β”‚  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”       β”‚
                    β”‚  β”‚   Task Scheduler   β”‚       β”‚
                    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚ ZeroMQ
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β–Ό                   β–Ό                   β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚  Worker 1  β”‚      β”‚  Worker 2  β”‚      β”‚  Worker N  β”‚
      β”‚(Mini-Agent)β”‚      β”‚(Mini-Agent)β”‚      β”‚(Mini-Agent)β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Installation

pip install oh-my-brain

Or with uv (recommended):

uv add oh-my-brain

1. Configure AI Models

# ~/.oh-my-brain/models.yaml
models:
  - name: "deepseek-coder"
    provider: "openai"
    api_base: "https://api.deepseek.com"
    model: "deepseek-coder"
    api_key_env: "DEEPSEEK_API_KEY"
    cost_per_1k_tokens: 0.001
    capabilities: [code]

  - name: "minimax-m21"
    provider: "anthropic"
    api_base: "https://api.minimax.io"
    model: "MiniMax-M2.1"
    api_key_env: "MINIMAX_API_KEY"
    cost_per_1k_tokens: 0.002
    capabilities: [code, reasoning, planning]

task_model_mapping:
  planning: "minimax-m21"
  coding: "deepseek-coder"
  review: "minimax-m21"
  default: "deepseek-coder"

2. Prepare Development Document

Generate a standardized dev doc using your preferred AI (Claude, DeepSeek, GPT, etc.):

# my_project/dev_doc.yaml
project:
  name: "my-awesome-app"
  version: "0.1.0"
  description: "A sample web application"
  tech_stack:
    language: "Python"
    framework: "FastAPI"
    database: "PostgreSQL"

modules:
  - id: "mod-auth"
    name: "Authentication Module"
    description: "User authentication and authorization"
    priority: 1
    dependencies: []
    acceptance_criteria: "Users can register, login, and logout"
    sub_tasks:
      - id: "task-001"
        name: "Implement JWT Login"
        type: "feature"
        description: "Create login endpoint with JWT token generation"
        estimated_minutes: 30
        files_involved:
          - "src/auth/router.py"
          - "src/auth/service.py"
        requirements: |
          - POST /auth/login endpoint
          - Accept email and password
          - Return JWT token on success

3. Start Brain

oh-my-brain start --config ./brain.yaml

4. Start Workers

oh-my-brain worker --count 4  # Start 4 workers

5. Submit Dev Doc

oh-my-brain submit ./dev_doc.yaml

Then watch your AI team work in the Dashboard!

πŸ“– Documentation

πŸ–₯️ Platform Support

Platform Status Notes
Linux βœ… Full Support Recommended for production
macOS βœ… Full Support
Windows βœ… Supported Uses TCP transport, slightly lower performance
WSL βœ… Full Support Recommended for Windows users

πŸ›  Development

# Clone the repository
git clone https://github.com/zhaofei0923/oh_my_brain.git
cd oh_my_brain

# Install dependencies
uv sync --all-groups

# Run tests
uv run pytest

# Run linters
uv run ruff check .
uv run mypy src/

🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md

πŸ“„ License

Apache 2.0 - See LICENSE

πŸ™ Acknowledgments

About

No description or website provided.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages