moincraft
๐๏ธ Architecture
Canonical Moincraft architecture map: layer split, startup order, agent lifecycle, memory, and model slots.
Moincraft is a layered runtime, not a pile of scripts.
System map#
Hermes/Hermit operator โโREST/opsโโโถ Relay :55667
โ โฒ
โโ persona + memory + skills โ optional dashboard API token
PM2 / launch_all.sh
โโ mc-server Paper :25565
โโ dashboard Svelte :55666 + relay :55667
โโ mindcraft-bots MindServer :55668 + main.js
โโ prismarine-viewer WebGL :55669
Layer split#
- Soul/operator: Hermes owns durable persona, memory, skills, and remote messaging.
- Runtime bridge: relay
:55667is the stable API boundary; prefer extending relay contracts over reaching into MindServer internals. - Embodied agents: Mindcraft/Mineflayer owns Minecraft state, pathfinding, action execution, and in-world coordination.
Startup order#
- Paper server; wait for
:25565. - Mindcraft bots with staggered startup.
- Prismarine viewer after server readiness.
- Dashboard UI/relay.
Only one orchestrator at a time. Mixing systemd, PM2, and manual scripts causes EADDRINUSE and session.lock conflicts.
Agent lifecycle#
bootstrap()
โ Mindcraft.init()
โ createAgent(settings)
โ Agent.start()
โโ ActionManager
โโ Prompter
โโ History
โโ Coder
โโ NPCController
โโ MemoryBank
โโ SelfPrompter
โโ VisionInterpreter
โโ CooperationFramework
โโ initModes()
Model slots#
| Slot | Role |
|---|---|
model |
Default chat model and fallback. |
code_model |
!newAction code generation. |
vision_model |
Multimodal world/player analysis. |
embedding |
Semantic retrieval for examples and skill docs. |
Memory and autonomy#
- History keeps a small sliding window (
max_messages, usually 15). - Older turns are summarized into memory for prompt reuse.
SelfPrompterloops through goals withSTOPPED,ACTIVE, andPAUSEDstates.Coderlints generated JS before sandboxed execution.
Sources: wiki/content/docs/architecture.md, moincraft/docs/moincraft-stack-cheatsheet.md, moincraft/docs/bot-architecture.md.