Skip to content

MASSIVEMAGNETICS/NexusForge-2.0-

Repository files navigation

πŸš€ NexusForge 2.0

AGI-lite Autonomous Agent Framework

NexusForge 2.0 fuses FractalAgentForge's recursive templates with Auto-GPT's goal-breaking, BabyAGI's self-building functions, SuperAGI's production GUI, JARVIS's multi-modal experts, AutoGen's agent chats, and CrewAI's role crews. Bootstrap from a goal: spawn fractal hierarchies that converse, delegate, and evolve via dashboards and triggersβ€”no deps, Docker-ready.

From R&D swarms to viral apps, it's AGI-lite autonomy in ~600MB. Open-source the uprising!

✨ Features

  • 🌳 Fractal Agent Hierarchies: Recursive agent spawning with depth control (FractalAgentForge-inspired)
  • 🎯 Goal Decomposition: Automatic task breaking and subtask delegation (Auto-GPT-style)
  • πŸ”§ Self-Building Functions: Agents dynamically register new capabilities (BabyAGI-inspired)
  • πŸ’¬ Agent Conversations: Multi-agent communication and collaboration (AutoGen-style)
  • πŸ‘₯ Role-Based Crews: Organize agents into specialized teams (CrewAI-inspired)
  • πŸŽ“ Multi-Modal Experts: Specialized experts for different domains (JARVIS-inspired)
  • πŸ–₯️ Production Dashboard: Real-time monitoring and control GUI (SuperAGI-style)
  • 🐳 Docker Ready: Containerized deployment with minimal dependencies
  • ⚑ Bootstrap from Goals: Start with a high-level objective, let agents handle the rest

πŸ—οΈ Architecture

NexusForge
β”œβ”€β”€ Core
β”‚   β”œβ”€β”€ Fractal Agent System (recursive spawning)
β”‚   └── Main Orchestrator (unified API)
β”œβ”€β”€ Communication Hub
β”‚   β”œβ”€β”€ Agent-to-Agent Messaging
β”‚   β”œβ”€β”€ Task Delegation
β”‚   └── Conversation History
β”œβ”€β”€ Agent Systems
β”‚   β”œβ”€β”€ Crew Manager (role-based teams)
β”‚   └── Expert System (multi-modal specialists)
└── GUI/CLI
    β”œβ”€β”€ Web Dashboard (monitoring & control)
    └── Command Line Interface

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/MASSIVEMAGNETICS/NexusForge-2.0-.git
cd NexusForge-2.0-

# Install dependencies
pip install -r requirements.txt

Using Docker

# Build and run with Docker Compose
docker-compose up -d

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

Bootstrap from a Goal

# Start with a high-level goal
python -m nexusforge bootstrap "Build a web scraper for news articles"

# With GUI dashboard
python -m nexusforge bootstrap "Research AI trends and create a report" --with-gui

Start the Dashboard

python -m nexusforge gui
# Open http://localhost:8080

πŸ“š Usage Examples

Basic Usage

import asyncio
from nexusforge import NexusForge

async def main():
    # Initialize NexusForge
    nexus = NexusForge()
    await nexus.start()
    
    # Bootstrap from a goal
    goal = "Research AI developments and create a presentation"
    root_agent_id = await nexus.bootstrap_from_goal(goal)
    
    # View the agent hierarchy
    hierarchy = nexus.get_agent_hierarchy(root_agent_id)
    print(f"Created {len(hierarchy['children'])} child agents")
    
    # Get system statistics
    stats = nexus.get_statistics()
    print(f"Total agents: {stats['agent_stats']['total']}")
    
    await nexus.stop()

asyncio.run(main())

Creating a Specialized Crew

from nexusforge import NexusForge
from nexusforge.core.fractal_agent import AgentTemplate
from nexusforge.agents.crew import CrewRole

async def create_dev_team():
    nexus = NexusForge()
    await nexus.start()
    
    # Create specialized agents
    agents = [
        nexus.create_agent_from_template(AgentTemplate(
            name="TechLead",
            role="Leader",
            capabilities=["plan", "coordinate", "review"],
            goal_template="Lead development"
        )),
        nexus.create_agent_from_template(AgentTemplate(
            name="Developer",
            role="Builder",
            capabilities=["code", "test", "debug"],
            goal_template="Write code"
        ))
    ]
    
    # Create a crew
    crew_id = nexus.create_crew(
        name="DevTeam",
        agent_ids=[a.agent_id for a in agents],
        roles=[CrewRole.LEADER, CrewRole.BUILDER],
        goals=["Build a REST API"]
    )
    
    return crew_id

🎯 CLI Commands

# Bootstrap from goal
nexusforge bootstrap "Your goal here"

# Start GUI dashboard
nexusforge gui

# Show system status
nexusforge status

# List components
nexusforge list agents
nexusforge list crews
nexusforge list experts
nexusforge list messages

# View agent hierarchy
nexusforge hierarchy

# Show detailed statistics
nexusforge stats

πŸ”§ Configuration

Create a .env file (see .env.example):

NEXUSFORGE_ENV=production
NEXUSFORGE_LOG_LEVEL=INFO
DASHBOARD_HOST=0.0.0.0
DASHBOARD_PORT=8080
MAX_AGENT_DEPTH=5
SPAWN_THRESHOLD=0.7

πŸ“Š Dashboard Features

The web dashboard provides:

  • Real-time System Status: Monitor agents, crews, and experts
  • Agent Hierarchy Visualization: See the fractal structure
  • Message History: Track agent communications
  • Bootstrap Interface: Start new agent systems from goals
  • Statistics Dashboard: Detailed system metrics

πŸ›οΈ System Components

Fractal Agents

  • Recursive spawning up to configurable depth
  • Automatic goal decomposition
  • Parent-child communication
  • Dynamic capability registration

Communication Hub

  • Message passing between agents
  • Task delegation system
  • Broadcast capabilities
  • Conversation tracking

Crew Manager

  • Role-based team organization
  • Leader assignment
  • Crew-wide broadcasting
  • Goal tracking

Expert System

  • Multi-modal specialization (text, code, data, etc.)
  • Automatic expert selection
  • Capability-based routing
  • Pluggable expert functions

πŸ§ͺ Examples

See the examples/ directory for:

  • basic_usage.py: Simple bootstrapping example
  • crew_example.py: Creating and managing crews
  • More examples coming soon!

🐳 Docker Deployment

The system is optimized for containerized deployment:

# Build the image
docker build -t nexusforge .

# Run with custom configuration
docker run -p 8080:8080 -p 5000:5000 \
  -e NEXUSFORGE_ENV=production \
  -v $(pwd)/data:/app/data \
  nexusforge

Target size: ~600MB

πŸ”¬ Development

# Install in development mode
pip install -e .

# Run tests (when available)
pytest

# Run linting (when available)
flake8 nexusforge/

🎨 Use Cases

  • R&D Swarms: Autonomous research teams
  • Application Development: Self-organizing dev teams
  • Data Processing Pipelines: Adaptive data workflows
  • Content Generation: Multi-agent content creation
  • Task Automation: Complex workflow automation
  • Experimental AGI: Research platform for autonomous systems

🚧 Roadmap

  • LLM integration for enhanced reasoning
  • Persistent storage for agent state
  • Advanced visualization tools
  • Plugin system for custom experts
  • Distributed agent deployment
  • Enhanced security features
  • Performance optimization
  • Extended test coverage

πŸ“– Documentation

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

πŸ“„ License

MIT License - See LICENSE for details

πŸ™ Acknowledgments

Inspired by:

  • FractalAgentForge (recursive templates)
  • Auto-GPT (goal breaking)
  • BabyAGI (self-building functions)
  • SuperAGI (production GUI)
  • JARVIS (multi-modal experts)
  • AutoGen (agent conversations)
  • CrewAI (role-based crews)

πŸ“ž Contact

For questions, issues, or contributions, please open an issue on GitHub.


Open-source the uprising! πŸš€

About

Forge Fractal Agents

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •