RepoTogether AITogether AIpublished Jul 15, 2026seen 1w

togethercomputer/abacus-game

TypeScript

Open original ↗

Captured source

source ↗
published Jul 15, 2026seen 1wcaptured 1whttp 200method plain

togethercomputer/abacus-game

Description: Abacus DM — dungeon master tech demo (Slack + Hub web)

Language: TypeScript

Stars: 0

Forks: 0

Open issues: 5

Created: 2026-07-15T09:30:53Z

Pushed: 2026-07-15T20:55:22Z

Default branch: main

Fork: no

Archived: no

README:

DM — an AI Dungeon Master (a playable intro to agents at Together)

**A tabletop RPG you play in Slack *and* on the web**, set inside a fantasy version of the AI industry — and a low-risk, hands-on way to learn how agents at Together actually work. Built as an Abacus extension.

Web Hub (canvas tech demo): https://hub.tap.t6r-ai.dev — Okta-gated DM console with live Abacus dynamic canvas. Mesh twin: https://hub.mesh.tap.t6r-ai.dev. See [web/README.md](./web/README.md) and [docs/DEPLOY.md](./docs/DEPLOY.md).

In this realm the currency is tokens (the LLM kind), magic is inference drawn from GPUs, and the monsters are the things that break real agents — rate limits (the 429 Hydra), out-of-memory ogres, cold-start wraiths, the 503 Dragon. The villain is the Token King, a closed-weights monopolist who hoards every GPU and every minted token — alone. You play underdog open-source builders from Together who win the only way Together wins: by working *together*.

The DM is an Abacus agent that narrates the story *and* teaches the machinery underneath: every move it makes is a real tool call (surfaced in a 🛠 footer), your Slack channel is a multi-user session, and the world it remembers lives in a database. It is a deliberately low-risk sandbox — fork it and add a tool, a campaign, or a skill to a real, production-shaped agent with zero production data or business logic at stake. It's whimsical and family-friendly by design — a fun thing to play with your team.

> jkail: We're broke open-source builders — we march on the Token King.
🐉 The Token King laughs from the Aureate Bastion, his GPU hoard humming with
stolen heat. "Come back when you can afford a single token," he sneers.
_🛠 create_entity, create_entity, award_rp · 2 rounds_ ← the agent, working

> jkail: I emerge from the Foundry. What are my stats now?
🔥 You rise as an ARCHMAGE OF INFERENCE — your weights are open, your mana has no
token price. You can crack the Bastion precisely because it was built from
tokens you no longer have to buy.
_🛠 update_character, create_entity, award_rp · 2 rounds · +10 RP_

What you'll learn (it's a teaching demo)

Playing the DM is a tour of how agents work — each concept is visible in the game:

| Agent concept | How the game shows it | |---------------|------------------------| | Tool calls | The DM's "spells" are tool calls; the 🛠 footer lists the ones it made each turn. | | The agentic loop | A turn is a ReAct loop — think → call tools → observe results → repeat → narrate (src/ai/dm/agent.ts). | | Multi-user sessions | One Slack channel = one shared Abacus session; the party is everyone in the channel. | | Persistent memory | The world (NPCs, factions, your character) lives in a Drizzle/SQLite DB and survives restarts. | | Skills | The agent profile loads skills (session-awareness, context-pressure) — see profiles/dungeon-master.md. | | Models & rate limits | It runs on Together's Kimi models; hit the 429 Hydra and watch the SDK's retry/back-off kick in. |

Grounded in the real Together AI

The fantasy is a love letter to where it's built — **Together AI**, "The AI Native Cloud," on a mission to lower the cost of AI for everyone and a bet that the future of AI is open source. The game wears that on its sleeve:

  • Open vs. closed — the Token King personifies closed, proprietary AI; you

win as open-source builders (open weights, open data, shared kernels) — the one thing infinite compute can't buy.

  • The four values — the guild lives Together's values: *empower innovation,

discover the magic, do more with less, model stewardship*.

  • Real open gifts as legendary relics — the Flash (attention kernel), the

RedPajama Trove (open dataset), the Thunder Kittens.

  • Real infra trends — *The Capacity Crunch* is a whimsical build-out against

power (a ~200 MW ley-line), cooling, GPU supply (GB200s), vendors, and outages; *Descent into the Data Center* is heroic, family-friendly on-call.

(All in good fun and family-friendly — the game never names or disparages real companies.)

Make it your own (your first agent feature)

This repo is a safe place to ship your first feature on a production-shaped agent — there's no business logic or real data to break. Good starter PRs:

  • Add a DM tool in src/ai/dm/tools.ts (e.g. roll_dice, summon_npc) — it

becomes a new "spell" the DM can cast, and shows up in the 🛠 footer.

  • Add a campaign in src/ai/campaigns/index.ts — a new themed world with its

own rules and arc (copy The Token King and reskin it).

  • Add a class or monster to the deterministic engine in src/game/content.ts.
  • Tweak the persona in src/extension/profile.ts / profiles/dungeon-master.md.

Then prove it locally with npm test and npm run demo:ai (both offline, no network) before you ship.

Add the game to your Slack (quickstart)

There are two ways to run it. Pick based on whether you want a dedicated DM bot or just the tools inside your existing Abacus bot:

| | A · Dedicated DM agent *(recommended)* | B · In-process extension | |---|---|---| | You get | Its own DM bot + AI assistant pane, separate from Abacus | dnd_* / dnd_ai_* tools inside your existing Abacus bot | | Best when | You want a standalone, always-on Dungeon Master | You already run an Abacus Slack bot and just want the game tools | | Effort | Slack app + own abacus serve + a 2nd bridge | One symlink + restart | | Full steps | [Run it as a Slack agent](#run-it-as-a-slack-agent-own-serve--own-app--drinference-style) | [Install into Abacus](#install-into-abacus) |

Fast path (Option A — dedicated DM agent):

# 0. build this repo
npm install && npm run build

# 1. install both extensions + the agent profile onto the DM serve
ln -sfn "$PWD" ~/.abacus/extensions/abacus-dnd # the game (dnd_ai_*/dnd_*)
ln -sfn "$HOME/Documents/abacus-slack/extension" ~/.abacus/extensions/abacus-slack-tools # slack_*...

Excerpt shown — open the source for the full document.