How danyalabbas/simulatecraft works
SimulateCraft runs LLM-driven Minecraft agents: a user configures and starts a simulation, agents observe the world and choose actions, the environment applies them, and the browser presents live state and accepts human input. The core Runner orchestrates agent decisions, environment steps, and events. The README confirms browser map/chat/goals and the local viewer; sampled source supports the core loop and selected memory, skill, world-settings, and server relationships. Other UI and integration details are not fully sampled, so uncertain links are omitted.
Main entry points: llm.py LLM brain · env.py Minecraft environment · runner.py Simulation runner · app.py REST and WebSocket server
Components 24
Simulation control
- CLI startup
src/simulatecraft/cli.py - Simulation runner
src/simulatecraft/core/runner.py - Agent model
src/simulatecraft/core/agent.py - Action and observation schemas
src/simulatecraft/core/schemas.py - Event bus
src/simulatecraft/core/events.py
Agent reasoning
- LLM brain
src/simulatecraft/brains/llm.py - Plan generation
src/simulatecraft/planning/planner.py
Minecraft world
- Environment interface
src/simulatecraft/core/environment.py - Minecraft environment
src/simulatecraft/minecraft/env.py - Minecraft actions
src/simulatecraft/minecraft/actions.py - World observations
src/simulatecraft/minecraft/observations.py - Bot connection
src/simulatecraft/minecraft/connection.py - Mineflayer bot
src/simulatecraft/minecraft/bot/bot.js - World settings
src/simulatecraft/minecraft/world_settings.py - Minecraft RCON
src/simulatecraft/minecraft/rcon.py - World settings file
data/world_settings.json
Memory and skills
- Memory stream
src/simulatecraft/memory/stream.py - Memory retrieval
src/simulatecraft/memory/retrieval.py - Skill registry
src/simulatecraft/skills/registry.py - Agent personas
src/simulatecraft/server/persona.py
Browser interface
- REST and WebSocket server
src/simulatecraft/server/app.py - Browser viewer
src/simulatecraft/server/static/app.js - Event log viewer
src/simulatecraft/viewers/log.py
Other components
- User
Connections 26
- User → CLI startup: starts simulation
README.md - CLI startup → Simulation runner: starts
- Simulation runner → Agent model: queries decisions
src/simulatecraft/core/runner.py - Simulation runner → Environment interface: observes and steps
src/simulatecraft/core/runner.py - Simulation runner → Event bus: publishes events
src/simulatecraft/core/runner.py - Agent model → LLM brain: requests decisions
- LLM brain → Action and observation schemas: validates actions
src/simulatecraft/brains/llm.py - LLM brain → Plan generation: uses planning
src/simulatecraft/brains/llm.py - LLM brain → Memory retrieval: retrieves memories
src/simulatecraft/brains/llm.py - LLM brain → Skill registry: reuses skills
src/simulatecraft/brains/llm.py - LLM brain → Memory stream: records experience
src/simulatecraft/brains/llm.py - Memory retrieval → Memory stream: reads records
src/simulatecraft/memory/retrieval.py - Environment interface → Minecraft environment: implemented by
src/simulatecraft/minecraft/env.py - Minecraft environment → Minecraft actions: applies actions
src/simulatecraft/minecraft/env.py - Minecraft environment → World observations: builds observations
src/simulatecraft/minecraft/env.py - Minecraft environment → Bot connection: manages bot links
src/simulatecraft/minecraft/env.py - Bot connection → Mineflayer bot: connects to
- Minecraft environment → Minecraft RCON: runs commands
src/simulatecraft/minecraft/env.py - World settings → Minecraft RCON: applies world rules
src/simulatecraft/minecraft/world_settings.py - World settings → World settings file: persists settings
src/simulatecraft/minecraft/world_settings.py - REST and WebSocket server → Simulation runner: controls simulation
src/simulatecraft/server/app.py - REST and WebSocket server → Event bus: handles inbound chat
src/simulatecraft/server/app.py - REST and WebSocket server → Agent personas: manages agents
src/simulatecraft/server/app.py - Browser viewer → REST and WebSocket server: controls and views
README.md - User → Browser viewer: views map and chat
README.md - Event bus → Event log viewer: feeds event log
src/simulatecraft/viewers/log.py