Back to projects
AI / MLIn Progress

ECHO_CLAW - Context-Driven Game Agent Framework

Achieving intelligent behavior through context + Skill invocation, similar to Claude Code CLI, extensible to any game.

TypeScriptNode.jsLangChainSQLite

Overview

ECHO_CLAW is a game agent framework with a core design philosophy: everything relies on context + Skill invocation. Starting from Minecraft AI companion, the architecture supports extension to any game—just provide the corresponding Plugin.

Comparison with Other ECHO Paths

ProjectImplementation Approach
ECHO_feelingCognitive science architecture (7-layer cognition, PAD/OCC emotion, BDI), partially hardcoded
ECHO_loopReact Agent Loop engineering
ECHO_CLAWContext + Skill invocation, similar to Claude Code CLI (this project)

Core Architecture

┌─────────────────────────────────────────────────────────────┐
│                     ECHO_CLAW Core Architecture              │
├─────────────────────────────────────────────────────────────┤
│  Fast Reflection    →    LLM Orchestration    →    Execution │
│  (Rule Matching)         (Context-driven)          (Plugin Pool) │
│       │                       │                        │    │
│       ▼                       ▼                        ▼    │
│  Urgent Response         Skill Orchestration      Game Operations │
│  e.g., dodge attack      Parallel/Serial          e.g., move/dig │
├─────────────────────────────────────────────────────────────┤
│                   Context Manager                             │
│  • Current Window (smart compression) • Memory System (persistent query) │
├─────────────────────────────────────────────────────────────┤
│                   Tool Registry                               │
│  Skills(Decision) │ Plugins(Execution) │ MCP(External Resources) │
└─────────────────────────────────────────────────────────────┘

Three-Layer Scheduling

1. Fast Reflection Layer

  • Hardcoded rule matching (health < 20% triggers escape)
  • Skip LLM for direct execution
  • Notify LLM orchestration layer after execution

2. LLM Orchestration Layer

  • Receive game state, conversation history, available tools
  • Select and orchestrate Skills (parallel/serial/branch/loop)
  • Process execution results, update context

3. Execution Engine

  • Manage Plugin pool
  • Execute Skill operation commands
  • Collect execution result feedback

Tool System

Three-Way Design

TypeResponsibilityExample
SkillAI decision logicexplore-nearby, craft-item
PluginGame interaction implementationminecraft-plugin, stardew-plugin
MCPExternal resource integrationwiki-mcp, recipe-mcp

Skill Declaration Specification

interface SkillDeclaration {
  name: string
  description: string
  input: JSONSchema
  output: JSONSchema
  triggers: {
    keywords?: string[]
    events?: string[]
    conditions?: Condition[]
  }
  capabilities: {
    applicableScenes: string[]
    collaborationWith: string[]
  }
  execution: {
    costEstimate: number
    reliability: number
    timeout: number
  }
  dependencies: {
    requires: string[]
    conflicts: string[]
  }
  recovery: {
    retryable: boolean
    fallbackSkill?: string
  }
}

Game Extension Packs

Progressive Support

LevelContentExperience
MinimalPlugin onlyRunnable, basic interaction
StandardPlugin + game knowledgeUnderstands game rules
CompletePlugin + knowledge + specialized SkillsGame-specific decisions
BestComplete + context templates + compression configDeep immersive experience

Current Status

Design phase, architecture documentation complete, awaiting implementation.