← all posts

Allay: A Minecraft AI Helper Built on Relate by Neo4j

Allay is a helper for Minecraft, named after the little blue mob that fetches things for you. I built it for the Relate by Neo4j hackathon.

Allay, a Minecraft helper that runs on your own PC. To find out more: github.com/martinohanlon/Allay

Type /allay what am I missing for an iron pickaxe? in chat and it looks at what you are holding, works out the recipe route from the game’s own data, and tells you what is left.

In Minecraft chat, /allay how do I get started? is answered in a few lines from the wiki's Beginner's guide

What is Relate?

Relate is a new open-source embedded graph database from Neo4j, built for AI agents. There is no server to run and no signup. It is a library you open from your own code (Python, Rust, a CLI or WebAssembly), and the whole database can live in a single file. It speaks Cypher and has vector and full-text search built in.

That last part is what made Allay possible. The graph, the vector search and the agent all live in one process on one machine.

The Relate by Neo4j hackathon launched alongside Relate at NODES 2026. The challenge is to build an AI agent, app or tool with Relate, under the theme “Context, Connected”.

Why Minecraft?

Minecraft has a complex structure, which makes it a very good fit for a graph. The game’s own data is already nodes and relationships: an iron pickaxe is made from a recipe, which needs a class of materials, which includes iron ingots, which are smelted from raw iron, which you get by mining ore, which is found at certain heights in certain places.

Minecraft also has a huge community, and I wanted to give it something useful for free. Allay has no subscription and needs no API keys. It runs on your own machine.

Allay builds the graph straight from the server’s own jar, so the graph matches the version you are actually running. It takes about a second and gives roughly 6,300 nodes: 1,585 recipes, 1,166 mining and drop actions, 66 biomes, 90 mobs and 795 spawn links, 34 structures and 40 ore placements.

The route to an iron pickaxe drawn as a graph, from the pickaxe recipe back through iron ingots and raw iron to the ore blocks

The same route is one Cypher query:

MATCH p = (:Item {name:'Iron Pickaxe'})<-[:CREATES]-(:Recipe)-[:REQUIRES]->(:ItemClass {name:'Iron Tool Materials'})
          -[:INCLUDES]->(:Item {name:'Iron Ingot'})<-[:CREATES]-(:Recipe)-[:REQUIRES]->(:Item {name:'Raw Iron'})
          <-[:CREATES]-(:Mine)-[:TARGETS]->(:Block)
RETURN p

Context, connected

The hackathon theme describes what Allay does with each question. Three graphs sit in one Relate file and share nodes:

Graph What it holds
Game data Items, recipes, stations, mobs, biomes, spawns, structures and ore heights
Live state The asking player, what they hold and which biome they are in
Wiki 703 passages from ten Minecraft Wiki tutorials, each with an embedding

The live state is the part I like most. With every question, the plugin sends a snapshot of the player, and the agent writes it to the graph as (Player)-[:HOLDS]->(Item). Those Item nodes are the same ones the recipes use, so “what am I missing for an iron pickaxe?” is a graph traversal with your own inventory subtracted from the route.

For how-to questions, like “why shouldn’t I dig straight down?”, the agent searches the wiki passages with a vector index and a full-text index together, and says which page the answer came from.

It all runs on one machine

Allay is entirely local. Relate is embedded in the agent, and both the chat model and the embedding model run through Ollama. There is no cloud and there are no API keys. It is meant to sit on the same machine as your Minecraft server, and the plugin starts and stops the agent along with the server.

The default model is a 4B parameter Qwen3 model, which is small enough to run on a laptop CPU. A small model makes mistakes, so the agent does not rely on it for facts. It has six read-only tools (recipes, routes, where to find things, the player’s state, wiki search and name lookup), and each one returns a small, bounded result for the model to put into words.

Does the graph help?

I wanted to test that rather than assume it. The eval asks 36 questions of the same model twice, once alone and once with the graph. The right answers are computed from the graph and scored automatically.

Model alone: 8 of 36 right. Model plus graph: 36 of 36 right

The model alone got 8 of 36. With the graph it got 36 of 36. The model alone was fine at refusing and at saying something does not exist, but it could not remember recipes, ore heights, drops or routes.

That number comes with caveats, and the README lists them. The answers come from the same graph the agent reads, so this measures faithful retrieval rather than whether the data is right. I tuned the agent against this set, and the first run before any fixes scored 28 of 36. It is one run on one model, with no held-out set. The gap is real, but treat 36 of 36 as the result after tuning.

Showing where an answer came from

/allay-explain opens a book in game with your last five questions, the answers and the sources behind each: the recipe or route, the wiki page, or your own inventory. Under each source is the graph path that was walked.

The sources page for a wiki answer, with a link to the Beginner's guide and the graph path from WikiPage through WikiSection to WikiChunk

The sources are built by code from what each tool returned, never by the model, so a source is something Allay really read. A model that cites its own sources can make them up, and this way it cannot.

Try it

Allay needs Ollama, Python 3.10 or newer and a Minecraft Java client. On a new server, the installer fetches everything else:

git clone https://github.com/martinohanlon/Allay.git; cd Allay
scripts\install.ps1
scripts\start.ps1 -AcceptEula

Join localhost and type /allay where do I find diamonds?. The README covers adding it to a server you already have. There are .ps1 scripts for Windows and .sh for Linux and macOS.

Where it came from

Allay borrows its ideas from MineCorp, my earlier Minecraft agent built on Neo4j: the graph model, the read-only purpose-built tools, the result budgets and the benchmark method. The jar parsers are ported from Neo4j to Relate. The code is on GitHub, and Relate is open source if you want to try it yourself.


Originally published on the Neo4j Developer Blog on 30 November 2026.