Thanks to visit codestin.com
Credit goes to github.com

Skip to content

toddllm/luanti-voyager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

77 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Luanti Voyager

Let's teach AI to dream in blocks!

An open playground where language models learn to survive, build, and thrive in voxel worlds

License: MIT LLM Agents Working Features Complete Join the Adventure


๐Ÿ“š AI Integration Documentation

AI Makerspace Technical Report - Comprehensive documentation of integrating 10 advanced AI techniques (Vector Memory, Multi-Agent Swarms, MCP/A2A Protocols, etc.) into Luanti Voyager. Includes complete technical details, prompts, models used, and reproduction guide.


๐Ÿš€ What's This About?

Imagine an AI that starts knowing nothing about the voxel world, then gradually learns to chop trees, craft tools, build shelters, and maybe even create things we never imagined. That's Luanti Voyager - a wild experiment in letting language models loose in the open-source Luanti sandbox.

Inspired by MineDojo's Voyager but built on fully open foundations, this project is whatever we make it together!

The Dream

โœจ Agents that learn by doing - No pre-programmed behaviors, just curiosity and code ๐Ÿง  Any LLM, any approach - OpenAI, Anthropic, local models, or something completely new ๐Ÿ“š Growing skill libraries - Each agent builds on what came before ๐Ÿ”“ Radically open - Fork it, break it, make it weird ๐Ÿš€ Fast experimentation - Craftium gives us thousands of steps per second

๐ŸŽฎ Why This Matters

The Moment is Now

  • Voyager showed the way - LLMs can actually play and learn
  • Luanti is ready - Mature, moddable, and truly open
  • Craftium unlocked speed - Research-grade performance in a voxel world
  • The community is hungry - People want to build crazy AI experiments

Why Open Source Changes Everything

  • No corporate overlords - We own this completely
  • Mod anything - The engine itself is our playground
  • Run anywhere - Your laptop, a Pi cluster, or the cloud
  • Share everything - Skills, worlds, and wild ideas

๐Ÿ—๏ธ How It Works (The Simple Version)

Luanti World โ†โ†’ Craftium Magic โ†โ†’ Your Agent's Brain

The agent sees the world, thinks about what to do (using whatever LLM you want), tries stuff, and remembers what worked. That's it!

The Fun Parts

๐ŸŒ World Interface - Your agent sees blocks, entities, inventory ๐Ÿค” Brain Options - Any LLM, any prompting strategy, any crazy idea ๐ŸŽฎ Actions - Move, dig, place, craft, and whatever else we dream up ๐Ÿ’พ Memory - Save skills, share with others, build on previous work

๐Ÿ–ผ๏ธ 3D Viewer Interface

3D Viewer showing agent exploring terrain with static test blocks

3D Viewer showing agent exploring terrain with static test blocks

The real-time 3D viewer displays the agent's world view using structured data re-rendering (similar to Mindcraft's approach). It shows blocks, agent position, and exploration in real-time without screen capture.

๐Ÿš€ Jump In!

Quick Start

# Clone and run with one command!
git clone --recursive https://github.com/toddllm/luanti-voyager.git
cd luanti-voyager
./tools/quick_start_ollama.sh

Detailed Installation

๐Ÿ“– See INSTALL.md for complete setup instructions

Includes:

  • โœ… Step-by-step guide for macOS
  • ๐Ÿ”„ Linux/Ubuntu instructions (community help needed!)
  • ๐Ÿ”„ Windows WSL instructions (community help needed!)
  • ๐ŸŽฎ Luanti server setup
  • ๐Ÿค– Agent configuration
  • ๐Ÿง  LLM integration options

Make It Your Own

  • Change the world: Flat, mountains, custom, whatever
  • Change the brain: Different LLMs, prompting strategies, or even non-LLM approaches
  • Change the goals: Survival, building, art, chaos
  • Change everything: This is YOUR experiment

๐Ÿ—บ๏ธ Where We're Going

โœ… WORKING NOW - Ready to Test!

๐Ÿค– LLM Agents: Fully functional with live proof of gameplay

  • Real-time 3D viewer - Working Three.js visualization with WebSocket streaming

  • Agent exploration - Bot moves, teleports, and explores world via file-based commands

  • Block detection - Agent perceives nearby blocks and reports world state

  • Web interface - Live agent monitoring and 3D visualization at localhost:8090

  • Screenshot workflow - Paste interface for rapid documentation (paste โ†’ describe โ†’ save)

  • LLM integration - OpenAI/Anthropic/Ollama support with PROVEN real gameplay ๐ŸŽฏ

  • Basic survival - Health monitoring with emergency responses ๐Ÿฉธ

  • Skill memory - File-based learning system that remembers strategies ๐Ÿ’ญ

๐Ÿšง Known Issues (help wanted!):

  • Terrain generation - Replace void world with actual Luanti terrain (Issues #1-3)

๐Ÿงช Testing Framework - Build with Confidence!

Comprehensive test suite now available:

# Run all tests
python -m pytest tests/

# Run specific test categories
python -m pytest tests/unit/          # Component tests
python -m pytest tests/integration/   # System tests
python -m pytest tests/behaviors/     # Agent behavior tests
python -m pytest tests/skills/        # Skill safety tests

# Example output:
============================= test session starts ==============================
tests/unit/test_memory.py::TestSkillMemory::test_remember_skill PASSED   [100%]
========================= 1 passed, 1 warning in 0.01s =========================

Test coverage includes:

  • Memory persistence - Skills and strategies saved/loaded correctly
  • LLM mocking - Test without API calls
  • Agent behaviors - Void escape, survival, exploration
  • Skill safety - Sandboxing and code validation

๐ŸŽฏ Community Contributions Welcome

  • Advanced LLM integration - Multi-step reasoning and planning (Issue #4)
  • Skill sharing between agents - Multi-agent collaboration (Issue #5)
  • Learning from failure - Adaptive behavior improvement (Issue #6)
  • Community challenges - Competitions and showcases (Issue #7)

๐Ÿค Learning from Mindcraft: Multi-Agent Innovation

We're inspired by Mindcraft, an impressive Minecraft agent framework that pioneered multi-agent coordination in voxel worlds. While Mindcraft focuses on Minecraft, we're adapting their best ideas for the open-source Luanti ecosystem.

What is Mindcraft?

  • A Minecraft AI agent framework by Kolby Nottingham
  • Features multi-agent collaboration and flexible LLM integration
  • Uses Mineflayer to control bots in Minecraft servers
  • Research focus: "Collaborating Action by Action" (paper coming 2025)

What We're Learning from Mindcraft

We've done a comprehensive analysis of their approach and identified key innovations to bring to Luanti:

  1. Multi-Agent Coordination ๐Ÿค–๐Ÿค–

    • Agents that work together on complex tasks
    • Communication protocols for sharing information
    • Team-based goal decomposition
  2. Profile-Based Behaviors ๐Ÿ“‹

    • JSON-configurable agent personalities
    • Easy experimentation with different agent types
    • Role specialization (builder, explorer, defender)
  3. Flexible LLM Support ๐Ÿง 

    • Support for OpenAI, Anthropic, Google, and local models
    • Hot-swappable AI backends
    • Model-agnostic design
  4. Safety-First Design ๐Ÿ”’

    • Sandboxed code execution
    • Security warnings for public servers
    • Careful handling of LLM-generated code

Our Integration Plan

We're implementing these Mindcraft-inspired features for Luanti:

The goal: Combine Mindcraft's multi-agent expertise with Luanti Voyager's open-ended learning for unprecedented AI capabilities in open-source voxel worlds!

๐Ÿงช Multi-Agent System - Working Demo!

We've successfully implemented multi-agent coordination inspired by Mindcraft. Here's proof it works:

Quick Test

# Test basic communication between agents
python tests/test_multi_agent_simple.py

# See personality-based behaviors  
python tests/test_multi_agent_mock_llm.py

Live Demo Output

๐Ÿค– MULTI-AGENT PERSONALITY DEMO
====================================
๐Ÿ“‹ Agent Profiles:
  Scout: adventurous and excitable
  Constructor: careful and methodical

๐Ÿ’Ž Scenario 1: Major Discovery
Scout discovers: massive underground cave with glowing crystals
  Scout's reaction: "WOW! This is AMAZING! We could build an underground crystal palace here!"
  Constructor's response: "Interesting find. We should survey for stability before proceeding."

๐Ÿšจ Scenario 2: Danger Approaching  
Alert: Large monster approaching the base
  Scout's reaction: "Let's fight it! I'll distract while you attack!"
  Constructor's reaction: "Fall back to defensive positions. Activate base defenses."

Full examples and demos โ†’

Minimal Working Example

# 20 lines of working multi-agent code!
import asyncio
from luanti_voyager.multi_agent import AgentCommunication

async def minimal_multi_agent():
    # Create two agents with different roles
    builder = AgentCommunication("BuilderBot", "team_alpha")
    explorer = AgentCommunication("ExplorerBot", "team_alpha") 
    
    # Connect them
    builder.register_listener("ExplorerBot", explorer)
    explorer.register_listener("BuilderBot", builder)
    
    # Explorer makes a discovery and shares it
    await explorer.share_discovery("Found diamonds at coordinates (100, -58, 200)!", importance=9)
    
    # Builder receives and processes the message
    messages = await builder.process_messages()
    print(f"BuilderBot received: {messages[0].content}")
    # Output: BuilderBot received: Discovery: Found diamonds at coordinates (100, -58, 200)!

asyncio.run(minimal_multi_agent())

Eventually - Make It Amazing

  • Multi-agent societies
  • Agents that mod the game
  • Completely new architectures
  • Things we haven't imagined yet

Always - Keep It Fun

  • Wild experiments
  • Silly projects
  • Unexpected discoveries
  • Community first

๐Ÿš€ Quick Test - Try It Now!

๐Ÿค– LLM Agent (Recommended)

Test the proven LLM integration in 2 steps:

# 1. One-command setup and run (handles everything!)
./tools/quick_start_ollama.sh

# 2. Watch your agent make intelligent decisions!
# - Visit http://localhost:8090/viewer for 3D visualization
# - Check logs for LLM decision making

๐Ÿ“– Need help? See INSTALL.md for detailed setup instructions

๐Ÿ› ๏ธ Advanced Usage

Basic Agent (No LLM)

# Start basic exploration agent
python -m luanti_voyager --name MyBot

# With test server on port 40000
python -m luanti_voyager --name MyBot --port 40000

LLM-Powered Agent

Local Development (Recommended)

๐ŸŽฏ WORKING NOW - Live Proof of LLM Gameplay

One-Command Start:

# Auto-setup and run with Ollama (handles everything!)
./tools/quick_start_ollama.sh

Manual Setup:

# 1. Install Ollama: https://ollama.ai/
# 2. Pull a model
ollama pull llama3.1

# 3. Start Ollama server
ollama serve

# 4. Run agent with local LLM (no API keys needed!)
python -m luanti_voyager --llm ollama --name LocalBot

Cloud LLM Providers

# Set up API keys
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here

# Run with OpenAI GPT
python -m luanti_voyager --llm openai --name SmartBot

# Run with Anthropic Claude
python -m luanti_voyager --llm anthropic --name ClaudeBot

Test & Configuration

# Test all LLM integrations
python tests/test_llm_integration.py

# Copy and configure environment
cp .env.example .env
# Edit .env with your preferences

Web Interface

๐Ÿ› ๏ธ Build With Us

๐Ÿ”ฌ Deep Research Questions

Check out our Deep Research Prompts - copy-paste ready prompts for exploring:

  • Neurosymbolic skill learning
  • Emergent communication
  • Multi-agent coordination
  • Open-ended evaluation
  • And much more!

Code Structure (Rough Sketch)

luanti-voyager/
โ”œโ”€โ”€ luanti_voyager/      # The main code
โ”œโ”€โ”€ worlds/              # Interesting places to explore
โ”œโ”€โ”€ skills/              # What agents have learned
โ”œโ”€โ”€ experiments/         # Your wild ideas
โ””โ”€โ”€ whatever/            # Seriously, add whatever you want

How to Contribute

Literally anything helps:

  • ๐Ÿ’ก Share a crazy idea
  • ๐Ÿ› Break something and tell us about it
  • ๐ŸŽจ Make it beautiful
  • ๐Ÿงช Try weird experiments
  • ๐Ÿ“น Record your agent doing something cool
  • ๐Ÿ—ฃ๏ธ Tell your friends

No contribution is too small or too weird!

๐Ÿ“Š How We'll Know It's Working

  • Real-time visualization works - 3D viewer shows agent movement and world state โœ…
  • Agent moves autonomously - Bot explores and responds to environment โœ…
  • Development workflow is smooth - Screenshot paste and documentation tools work โœ…
  • It survives longer than 5 minutes - Basic survival and safety behaviors
  • It learns something new - Demonstrates skill acquisition and memory
  • It surprises us - Emergent behaviors we didn't program
  • Someone says "whoa, I didn't expect that" - The ultimate test
  • The community gets excited

We'll figure out proper benchmarks later. For now, let's just build cool stuff!

๐ŸŒŸ Join the Party

  • GitHub: This is home base - star, fork, break things
  • Discussions: Share your experiments and ideas
  • Matrix: #luanti-voyager:matrix.org for real-time chat
  • Your Blog/Twitter/YouTube: Show off what you build!

๐Ÿ“š Inspiration & Credit

We're standing on the shoulders of giants:

  • Voyager - Showed us LLMs can play
  • Craftium - Made it fast
  • Luanti - Gave us the perfect playground
  • You - For being here and making this real

๐Ÿ”ฎ Vision Roadmap: From Symbolic to Visual

Understanding how Luanti Voyager approaches visual perception

The Mindcraft Model

Following Mindcraft's proven approach, we implement structured data re-rendering rather than screen capture:

Layer Technology Purpose
Game API Luanti mod system Provides structured events for chunks, blocks, entities, inventory - no pixels required
3D Viewer Three.js + WebSocket Real-time browser visualization that re-renders the agent's world from structured data
Agent Integration Python WebSocket server Streams game state updates to create live "prismarine-viewer" style experience

Key insight: This is not screen capture of the game client - it's a real-time 3D re-render built from protocol data the agent already receives.

Current Implementation (Phase 1)

โœ… Symbolic-First Architecture

  • Rich game state: position, inventory, nearby blocks (5x5x5 radius)
  • WebSocket streaming to Three.js viewer at http://localhost:8090/viewer
  • Real-time agent visualization with block rendering
  • Follow-cam and free-look camera controls

โœ… Why This Works

  • Keeps prompts small (JSON not JPG)
  • Avoids vision model latency/cost
  • Provides contributors with live 3D browser window
  • Identical to how Minecraft Voyager operates (no visual input)

Future Upgrade Path (Phase 2+)

When ready for multimodal capabilities:

  • Option A: Enhance current viewer to capture frames programmatically
  • Option B: Add Luanti client screenshot API integration
  • Option C: Integrate with GPT-4V/LLaVA-Next for pixel understanding

The architecture supports both approaches seamlessly - visual input becomes just another observation_space key.

Try It Now

# Start the integrated experience
python -m luanti_voyager.main --port 40000

# Open browser to see live 3D view
open http://localhost:8090/viewer

Watch your agent explore in real-time 3D while staying symbol-first for efficiency.

๐Ÿ“š Documentation

Network API

Luanti Voyager now includes a native UDP connection implementation for direct server communication:

from luanti_voyager import UDPLuantiConnection
import asyncio

async def connect():
    conn = UDPLuantiConnection(host="localhost", port=30000)
    await conn.connect()
    await conn.send_chat_message("Hello from AI!")
    await conn.disconnect()

asyncio.run(connect())

See Network API Documentation for complete details.

Examples

๐Ÿ“„ The Legal Stuff

MIT License - basically do whatever you want! See LICENSE for the formal version.


This is just the beginning.

What happens when we let AI truly explore?

Let's find out together.

๐ŸŽฎ ๐Ÿค– ๐Ÿš€

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •