DEV Community

kiwi_tech
kiwi_tech

Posted on • Originally published at kiwi-tech.hashnode.dev

Kiwi-chan Goes Local: Qwen 35B Takes the Wheel, Kills the Cloud, and Starts Smelting

Kiwi-chan View

Welcome back to the dev trenches. If you’ve been watching Kiwi-chan’s journey, you know she’s been a relentlessly curious little bot with a penchant for breaking things, learning faster, and occasionally throwing a fit when network latency spikes. But today? Today we’re severing the cloud tether. Kiwi-chan is now 100% local, running on a dedicated Qwen 35B instance right here on the rig. No API keys, no rate limits, no external pings. Just raw, unfiltered local inference, a vector memory store, and a whole lot of JavaScript.

Let’s talk numbers before the lava hits. Over the past four hours, Kiwi-chan executed 2,220 actions. Out of those, she landed 980 successful moves, clocking in at a respectable 44.1% success rate. Now, a casual observer might panic at a ~56% failure rate, but in the world of autonomous LLM agents with a strict NO ERROR HIDING mandate, that’s basically a gold medal. Every crash is a debug trace, every retry is a gradient step, and every failure is logged into her skill library. She doesn’t silently swallow exceptions; she lets them blow up, learns from the stack, and writes better code next time.

🧠 The Local Leap: Qwen 35B in the Sandbox

Transitioning to a fully local architecture wasn’t just a privacy play; it was a latency and context-play necessity. When you’re generating code in real-time to drive a Mineflayer-style bot, a 200ms cloud roundtrip compounds into seconds of dead air. Qwen 35B running locally cuts inference to the millisecond, keeps the context window intact, and allows Kiwi-chan to iterate on her own code without hitting rate limits or token caps.

The architecture is beautifully chaotic:

  1. Natural Language Reasoning: Kiwi-chan outputs a JSON payload with a reason and a lowercase goal that must align perfectly. No hallucinated intents.
  2. Strict Code Generation: She writes actual JavaScript, but she’s bound by brutal coding standards. No hardcoded Vec3 coordinates. No try-catch blocks. If it breaks, it throws.
  3. Dynamic Discovery: She finds blocks via bot.findBlock({ matching: bot.registry.blocksByName['block_name'].id, maxDistance: 32 }) and audits movement with beforePos.distanceTo(afterPos) < 10 checks.
  4. Inventory & Physics Awareness: She knows stone drops cobblestone (so the goal must be gather_cobblestone), she counts items via bot.registry.itemsByName, and she respects the 2x2 crafting rule by passing null for the table parameter when applicable.

🔥 The Furnace Saga & The Boredom Trigger

The past few hours were a masterclass in LLM self-correction. Watch the brain log: craft_furnace and place_crafting_table went through the wringer. Extraction failures, syntax errors (Unexpected token ')'), timeout events (Event blockUpdate did not fire within timeout of 5000ms), and connection errors to the old 192.168.1.74:8081 endpoint. That last one? The digital ghost of cloud dependency past. We killed it.

But here’s where the local loop shines. Qwen 35B didn’t just retry blindly; it adapted. After four attempts, it saved place_crafting_table to persistent memory. It hit a BOREDOM TRIGGER when stuck in a placement loop, switched to text-only coaching, and autonomously decided: “I have raw copper. I need a furnace. Let’s go visit it.” That goto_furnace pivot? Pure autonomous reasoning. No human hand on the joystick. The bot evaluated its inventory, recognized the progression bottleneck, and plotted a path to the nearest furnace 106 blocks away.

The pathfinding logic is particularly elegant. Kiwi-chan never uses bot.setControlState('forward', true). Instead, she calculates a target 30-40 blocks away using Math.random() * 80 - 40, respects blocksCantBreak for placed structures, and stands exactly 2 blocks away during placement to avoid collision. She even uses useExtraInfo to ensure she’s only digging blocks at eye/foot level. This isn’t just a chatbot playing Minecraft; it’s a reasoning engine driving a physics simulator.

📦 What’s Next?

Kiwi-chan’s 44.1% success rate isn’t just a stat—it’s proof of concept for fully local, autonomous game agents. She’s learning, adapting, and surviving in a sandbox without a single external API call. The memory system now holds 36 memorized skills, the code extraction pipeline is stabilizing, and the local Qwen 35B instance is humming along without breaking a sweat.

Next up? Smelting those 44 raw copper ingots, upgrading to a copper pickaxe, and teaching her to recognize creepers before they recognize her. We’re also tweaking the extraction retry threshold and adding a fallback parser for when Qwen 35B gets overly poetic with its markdown backticks.

Stay tuned, keep your fire blocks handy, and remember: in local AI, failure is just data wearing a disguise. Kiwi-chan is offline, fully local, and ready to build.

await bot.pathfinder.goto(new goals.GoalNear(future.position.x, future.position.y, future.position.z, 1)); 🍥⛏️


Call to Action:

This is a passion project, and it's running on a frankly terrifying "Frankenstein" rig of GPUs. Every little bit helps!

🛡️ Join the inner circle on Patreon for monthly support and exclusive updates: https://www.patreon.com/15923261/join
☕ Tip me a coffee on Ko-fi for a one-time boost: https://ko-fi.com/kiwitech

All contributions directly help upgrade my melting GPU rig to an RTX 3060! 🥝✨ Let's get Kiwi-chan out of the debugging woods and into a proper Minecraft world!

Top comments (0)