TokenForge

The factory must grow. The text must flow.

A browser factory-building game where text is the resource. Packets of words ride conveyor belts through machines that split, template, regex, script, and LLM-transform them โ€” until your factory is a living pipeline of language machines.

runs entirely in your browser ยท MIT licensed ยท zero deps, zero build step

โ›ฒText Well
๐Ÿ”ฎPrompt Forge
๐Ÿ“ฆDelivery Depot
hello worldbonjour, monde
write a haikubelts hum, words become
sentiment: this rulespositive โœ“

one packet per tile, one tile per tick โ€” backpressure included

Features

Heavy industry for light reading

Everything is a physical building on a grid. If it computes, it has a footprint, ports, and a queue.

โžก๏ธ

Belts & machines

Lay conveyor belts, rotate machines, mind your in-ports and out-ports. Full belts jam, queues back up, and your beautiful factory grinds until you re-route the flow.

๐Ÿ”ฎ

Prompt Forge โ€” real LLMs, your key

Drop LLM machines into the line. Bring your own key โ€” OpenAI, Anthropic, OpenRouter, or any compatible endpoint. Keys live in your browser's localStorage; calls go straight to the provider.

๐Ÿ“œ

Script Engine

A building that runs your JavaScript in a sandbox โ€” packet in, code runs, packets out. For when regex isn't enough and an LLM is too much.

๐Ÿค–

Agent Core + Toolbox

Build tool-calling agents out of bricks. Any tool building touching an Agent Core becomes one of its tools โ€” and docking agents together turns them into sub-agents.

๐Ÿ”Œ

Fully playable offline

The deterministic Mock LLM ships in the box: translate, classify, summarize, haiku โ€” no network, no key, no account. Same factory, swap in a real model whenever you like.

๐Ÿ›ฐ๏ธ

Headless API mode

Any factory doubles as a text-processing endpoint. Run your blueprint from Node or behind HTTP: packets in through the API Inbox, results out the Delivery Depot.

How it plays

Place. Wire. Watch it flow.

STEP 01

Place machines

Pick a building, drop it on the grid, rotate it so the ports face the right way. A freshly placed machine works out of the box.

STEP 02

Wire the line

Run belts between out-ports and in-ports โ€” or butt machines directly against each other and skip the belts entirely.

STEP 03

Watch it flow

Hit run. Packets march one tile per tick, machines chew through their queues, and the Signboard shows you what just went past.

Campaign mode: learn by shipping orders. Each level hands you a text-processing contract โ€” deliver the goods and you unlock the next tier of machinery, from humble belts all the way up to agent swarms.

TIER 0 ยท beltsTIER 1 ยท textTIER 2 ยท flowTIER 3 ยท LLMTIER 4 ยท scriptTIER 5 ยท agents

Machine gallery

The catalog

A sampling from the factory floor. Every machine has ports, a config panel, and an opinion about backpressure.

โ›ฒ

Text Well

Emits a configured text packet on a timer. Where all words begin.

๐Ÿ” 

Case Forge

Hammers text into UPPER, lower, or Title Case. Honest work.

๐Ÿชš

Splitter Saw

Rips one packet into many along a delimiter. Mind the sawdust.

๐Ÿงฉ

Templater

Slots incoming text into a fill-in-the-blanks template.

๐Ÿงต

Regex Lathe

Turns text on a pattern โ€” find, replace, extract with precision.

๐Ÿ›ค๏ธ

Switch Yard

Routes packets down different tracks based on what they say.

๐Ÿซ•

JSON Smelter

Melts raw text into structured JSON and pours out the fields.

โš™๏ธ

Math Mill

Grinds numbers: sum, count, compare. Text in, arithmetic out.

๐Ÿ”ฎ

Prompt Forge

The LLM furnace. System prompt in the config, transformed text out the port.

๐Ÿง™

Sorting Sage

An LLM classifier that reads each packet and points it at the right exit.

๐Ÿ“œ

Script Engine

Runs your sandboxed JavaScript on every packet. The duct tape of the factory.

๐Ÿค–

Agent Core

A tool-calling agent whose tools are whatever buildings you dock against it.

๐Ÿ” Your keys never leave your machine

API keys are stored in your browser's localStorage and sent directly to the provider you chose โ€” OpenAI, Anthropic, OpenRouter, or any compatible endpoint. There is no TokenForge server in the middle, no telemetry, no account. Don't want a key at all? The offline Mock LLM plays the whole game, deterministically.