Back to blog

ECHO_feeling: Emergent Minecraft AI Companion

A desktop application for emergent AI companion in Minecraft, based on cognitive science architecture with independent in-game operation and long-term memory.

#AI#Minecraft#Electron#LangChain#Cognitive Architecture

Project Overview

ECHO_feeling is a desktop application for an emergent AI companion in Minecraft. The AI exists as an independent player character in the game, with long-term memory capabilities, able to remember shared adventures with the player.

Implementation Approach: Emergent drive — based on cognitive science architecture (seven-layer cognition, PAD/OCC emotion, BDI intention), with some hardcoded adherence to theoretical frameworks.

Core Differences

AspectRegular Game AIECHO_feeling
MemoryNone/Single sessionCross-session long-term memory
OperationVoice suggestions onlyIndependent character executing actions
EmotionNonePAD/OCC emotion model
IntentionNoneBDI intention system

Technical Architecture

Built on Electron + Vue 3, core components:

  • Mineflayer Bot Controller: Headless Minecraft client, complete game interaction
  • LangChain Agent: DeepSeek API integration, natural language instruction processing
  • Seven-Layer Cognitive Architecture: Progressive cognition from perception to self-awareness
  • Layered Memory System (L0-L3): From character settings to deep retrieval
  • Code Execution Sandbox: node:vm + static checking, upgradable to isolated-vm
  • Local Vector Database: sql.js storage, supports encrypted persistence

Seven-Layer Cognitive Architecture

Layer 7: Self-awareness - Who am I, what do I want
Layer 6: Intention - BDI intention system
Layer 5: Emotion - PAD/OCC emotion model
Layer 4: Decision - Action selection and planning
Layer 3: Memory - Long-term memory and retrieval
Layer 2: Understanding - Semantic understanding and reasoning
Layer 1: Perception - Game state perception

Code Agent Mode

Player command → Mineflayer listener → LangChain Agent
→ Generate JavaScript code block → Local sandbox batch execution
→ Store memory → Reply to player

Key design: Single LLM call generates complete operation code, zero API consumption during execution.

Memory Layers

LayerContentLoad Timing
L0Character identityAlways loaded
L1Core memory summaryEvery conversation
L2On-demand vector retrievalAI active call
L3Deep hybrid searchAI active call

Development Scripts

CommandDescription
npm run devDevelopment mode
npm run buildCompile to out/
npm run typecheckTypeScript check
npm testUnit tests
npm run e2eLightweight smoke test
npm run packGenerate Windows installer

Current Status

Core features complete, in tuning phase. Seven-layer cognitive architecture, PAD/OCC emotion system, BDI intention system, and layered memory implemented.


Related Links


Last updated: 2026-05-14