LLM curriculum plus a symbolic survival fallback.
01 · System shape
A head, a hand,
and an eye.
Alpha proposes macro tasks. Beta retrieves or generates JavaScript and executes it. Gamma verifies outcomes and watches the environment. They are long-lived actors inside one Bun process, cooperatively interleaved through a typed event bus while model requests and game actions are awaiting completion.
Choose the next useful task
Proposes curriculum steps and falls back to a symbolic survival policy when the learned planner repeats or fails.
Retrieve, generate, execute
Selects the top three stored skills, generates code when needed, and runs one task at a time with timeout and abort control.
Watch and verify
Checks local danger continuously, requests visual criticism when needed, and returns success, retry, or interrupt events.
02 · Research idea
Two speeds
of intelligence.
Specialized inference hardware changes which old research ideas are practical. The architecture keeps a fast, deterministic survival loop beside a slower language-model loop. Local health, hunger, and hostile-entity checks can react immediately while strategic planning and visual criticism continue at their own cadence.
Direct game-state danger detection does not wait for an LLM. It can trigger a survival interrupt as soon as the bot becomes unsafe.
Planning, code generation, and screenshot-based verification use the model when the decision benefits from richer context.
The eye checks on a three-second cadence, escalates only inside a warning band, and suppresses monitoring while it is already performing task verification. A storm damper stops repeated interrupts after three signals, cools down, then allows replanning.
03 · Control
Interrupt the
moving hand.
Generated code receives a narrow set of Mineflayer objects and movement, mining, crafting, and combat primitives. Beta runs only one task at a time. Completion races a 120-second timeout and an abort signal; every cooperating primitive checks the shared abort state and clears goals and controls when interrupted.
One incident, one shared clock
Cancellation is cooperative. The wrapper can stop the primitives it owns; it does not pretend that arbitrary JavaScript can always be killed safely.
04 · Reuse
A small, visible
skill memory.
Successful programs are stored in local libSQL with 384-dimensional BGE-small embeddings. A new task is embedded, compared against the small library with cosine similarity, and the top three programs enter Beta’s prompt. The search is intentionally transparent at this scale: an O(n) scan, not an invisible retrieval service.
Task → 384D vector
Local ONNX inference creates the query representation.
Top three programs
Cosine similarity selects candidate skills and their recorded outcomes.
Store only after success
Gamma’s result controls whether a generated program becomes reusable memory.
05 · What the logs revealed
Speed amplifies
bad state.
The strongest result is the failure analysis. Concurrency made several hidden defects loud enough to measure: a repeated emergency transition became an event storm; an inventory-presence check rewarded a proxy instead of the requested change; and storing every accepted skill created extensive duplicate code.
21,778 events
One session repeated the same mining request, turning a bad state edge into a bus-wide storm.
Presence ≠ progress
A success predicate checked whether inventory contained an item, rather than whether the requested action changed inventory.
182 rows · 89 unique
93 redundant rows made up 51.1% of the stored rows, showing that verification alone is insufficient without skill deduplication.
06 · Architecture summary
The engine,
on this page.
The important implementation details stay readable here: who owns each decision, how the event contract moves work, where interruption is allowed, and which parts are deterministic.
Receives completion or failure, tracks repeated mining, consults hunger and inventory state, and emits one next task.
Retrieves the top three skills, applies a timeout and survival guard, executes through bounded primitives, and reports for verification.
Combines local danger state with screenshot criticism, retries failed goals, and emits cooldown-controlled interrupts.