Autonomous Minecraft Agent Swarm powered by Google Gemini AI
An ambitious multi-agent system designed to autonomously complete complex objectives in Minecraft, starting with the ultimate goal: Beat the Ender Dragon.
Aetherius is a distributed, collaborative multi-agent system that uses:
- Strategic AI Planning (Gemini 1.5 Pro) for high-level objectives
- Tactical AI Coordination (Gemini 1.5 Flash) for squad-level execution
- Autonomous Agents (Mineflayer) for in-game actions
- Shared World Knowledge (MongoDB) for strategic memory
- Real-time Communication (WebSockets) for coordination
βββββββββββββββ
β Frontend β (Optional)
β (WebUI) β
ββββββββ¬βββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββ
β Orchestrator Service β ββββ Gemini 1.5 Pro (Strategic Planning)
β - Strategic Planning β
β - Squad Management β
β - Global Coordination β
ββββββββββ¬βββββββββββββββββββββββββ
β spawns
ββββββββββββββββ¬βββββββββββββββ
βΌ βΌ βΌ
βββββββββββ βββββββββββ βββββββββββ
β Squad β β Squad β β Squad β ββββ Gemini 1.5 Flash (Tactical)
β Leader β β Leader β β Leader β
ββββββ¬βββββ ββββββ¬βββββ ββββββ¬βββββ
β β β
βββββββββββββββΌββββββββββββββ
βΌ
ββββββββββββββββββββββββββββ
β Bot Server Manager (BSM) β
β - Agent Lifecycle β
β - Message Routing β
ββββββββββ¬ββββββββββββββββββ
β spawns & manages
ββββββββββΌββββββββββ¬βββββββββ
βΌ βΌ βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββ
β Agent ββ Agent ββ Agent ββ Agent β ββββ Mineflayer (Minecraft Bots)
β #1 ββ #2 ββ #3 ββ #N β
ββββββββββββββββββββββββββββββββββββββββ
β β β β
ββββββββββ΄ββββββββββ΄βββββββββ
β
βΌ
ββββββββββββββββββββββββββββββββ
β World State Service β ββββ MongoDB (Strategic Memory)
β - POIs, Resources β
β - Infrastructure β
ββββββββββββββββββββββββββββββββ
orchestrator-service- Strategic AI planner and squad coordinatorsquad-leader- Tactical AI commander for agent squadsbot-agent- Individual Minecraft bot with modular capabilitiesbot-server-manager- Agent lifecycle and message routingworld-state-service- Persistent world knowledge (MongoDB + API)shared-types- Common TypeScript types and utilitiespathfinder- Advanced A* pathfinding for Minecraftcombat- PvP combat system (bow & sword)mineflayer-core- Custom Mineflayer buildfrontend- Optional web UI (basic implementation)
- Node.js β₯ 20.x
- pnpm β₯ 8.x (
npm install -g pnpm) - MongoDB (local or cloud)
- Minecraft Server (Java Edition, version 1.20.1 recommended)
- Google Gemini API Key (Get one here)
# Clone the repository
git clone <repository_url>
cd aetherius-dragon-ai
# Install dependencies
pnpm install
# Build all packages
pnpm run build# Copy environment template
cp .env.example .env
# Edit .env with your values
nano .envRequired environment variables:
GEMINI_API_KEY- Your Google Gemini API keyMONGO_URI- MongoDB connection stringMC_HOST,MC_PORT,MC_VERSION- Minecraft server details
Start services in this order:
# Terminal 1: MongoDB (if running locally)
mongod --dbpath /path/to/data
# Terminal 2: World State Service
pnpm --filter @aetherius/world-state-service start
# Terminal 3: Bot Server Manager
pnpm --filter @aetherius/bot-server-manager start
# Terminal 4: Orchestrator
pnpm --filter @aetherius/orchestrator-service startpnpm run build# In separate terminals
pnpm --filter @aetherius/shared-types run watch
pnpm --filter @aetherius/bot-agent run watch
pnpm --filter @aetherius/orchestrator-service run watchpnpm run lint- β Core architecture implemented
- β TypeScript monorepo structure
- β WebSocket communication system
- β Agent lifecycle management
- β World State Service with MongoDB
- β LLM integration (Gemini Pro & Flash)
- β Advanced pathfinding
- β Combat system (PvP)
- β Configuration validation
- β Logging infrastructure
- β Error handling & retry logic
- β Health checks
- β Circuit breakers
- β Rate limiting
- β Metrics collection
- β LLM response caching
- π§ Bot agent module implementations (exploration, mining, crafting)
- π§ LLM prompt engineering and refinement
- π§ End-to-end integration testing
- π§ State persistence for agents
- π§ Advanced squad coordination
- Add unit and integration tests
- Implement advanced building system
- Add more sophisticated agent roles
- Improve error recovery mechanisms
- Add web UI for monitoring
- Performance optimizations
- Multi-server support
- Start the system (all services running)
- Trigger a goal via Frontend or manual WebSocket message:
{ "type": "frontend::startGoal", "payload": { "goal": "Gather 10 wood logs" } } - Monitor logs to see the orchestrator plan, squad formation, and agent execution
- Orchestrator: Check strategic planning and squad management
- Squad Leaders: Monitor tactical decisions and agent commands
- Agents: Watch task execution and perception reports
- World State: Query
http://localhost:3000/queryfor stored data
Each service exposes a health endpoint (when implemented):
- World State Service:
http://localhost:3000/health - Orchestrator:
http://localhost:5000/health - BSM:
http://localhost:4000/health
# Check if all packages built successfully
pnpm run build
# Verify environment variables
cat .env
# Check if ports are available
lsof -i :3000 # World State
lsof -i :4000 # BSM
lsof -i :5001 # Orchestrator WS# Verify MongoDB is running
mongosh
# Test connection string
mongosh "mongodb://localhost:27017/aetherius_world_state"# Verify server is running and accessible
telnet localhost 25565
# Check MC version matches
# Check auth requirements (online-mode in server.properties)- Check BSM logs for spawn errors
- Verify ORCHESTRATOR_ADDRESS is correct
- Check that agent script path is valid
- Ensure MC_HOST/PORT/VERSION are correct
- Verify GEMINI_API_KEY is valid
- Check rate limits (60 calls/minute for Pro, 1500/minute for Flash)
- Monitor circuit breaker state in logs
- Development Guide - Detailed setup and development instructions
- Architecture Plan - Complete system design and roadmap
- Pathfinder API - Pathfinding documentation
- Combat API - Combat system documentation
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE for details
- Mineflayer - Minecraft bot framework
- PrismarineJS - Minecraft protocol libraries
- Google Gemini - AI planning
- Original pathfinding implementation by GenerelSchwerz
- Combat system by nxg-org
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Goal: Beat the Ender Dragon π β π