AGENTIC-GM
Behind the screen · field manual · for OpenCode

agentic-gm

A gamemaster you can play with on any evening, built from a crew of specialist AI agents instead of one chatbot doing everything. It runs in OpenCode. This manual explains who sits behind the screen, what each of them is allowed to do, and how to add your own games and agents.

8 dedicated agents 1 voice at the table real dice, every face kept plain-text files you own any game you bring runs in OpenCode
Illustration of a cybernetic dwarf character in a long coat, with glowing data tendrils at his side
YOUR CHARACTER
01 / WHY

Why not just one AI?

One model asked to be narrator, rules lawyer, dice, NPCs and bookkeeper at once tends to fail in the same few ways. Each of the eight seats exists to stop one of them, in the same order as the dossiers below.

02 / CREW

The crew, one dossier each

Eight roles, each with a narrow job and a written list of things it must never do. Pick a role to open its file.

Own contextEach agent reads only what its job needs. The rules librarian never wades through your chat history; the NPC challenger never sees the dice math.
Own instructionsOne OpenCode agent file per role in agents/: identity, job, boundaries. Change the file, change the agent.
Own model, if you wantAn agent file can pin its own model: a careful one for audits, a fast one for bookkeeping. Or one model for all.
Permissions, not promisesEach agent file carries an OpenCode permission: block. Only the GM voice may call other agents, only the scribe may write files; everyone else is read-only by configuration.
03 / CALLS

Who wakes up, and when

Responsibilities are permanent; calls are proportional. A quick word with a bartender should not summon eight agents. Pick a moment and see the typical crew.

Smallest crewUse the fewest seats the moment needs. Ceremony is a cost, not a virtue.
Plans come back, not ordersThe scenario architect returns a plan; the voice decides when to call each specialist it names.
No one absorbs a seatThe scribe doesn't judge quality, the auditor doesn't write the log, the voice doesn't fake a roll.
04 / REPLY

Anatomy of a reply

All that work ends in one message from one voice. Here is what a typical reply looks like, and why each part is there. Tap a marker.

GMEXAMPLE · ANY GENRE

Rain has made the wall slick. Two floors up, a window glows; behind it, someone is arguing on the phone.

You could climb now while the argument covers the noise, wait for it to end, or circle round to the service door: locked, but nobody seems to watch it.

[Climb: Strength 3 + Athletics 4 = 7 dice. Each 5 or 6 is a hit; more than half showing 1 is a glitch. — official rule]

[Before any roll: do you want to spend a resource on it? Your call.]

What do you do?

05 / CONTRACT

The table contract

The full set of manners every seat obeys, in plain words. The highlighted ones are the ones players notice first.

06 / FILES

What stays on your disk

Every session lives in a folder of plain-text files. Not all files are equal: some are the truth, some are derived from it, one is a novel. Pick a file.

my-campaign/session-03/
Write failed?
The entry is marked PENDING WRITE, the saved position does not advance, and you are told plainly.
No disk at all?
You get a copyable checkpoint marked NOT PERSISTED. Nobody claims it was saved.
Coming back next week?
The resume reads the log first. The novel can never invent a choice you didn't make.
07 / PROGRESS

Your character, across runs

A run ends; your character goes on. Between runs it lives in a record of its own, and that record changes only when a run ends, through a debrief you approve.

baselineYour original sheet

The sheet as you created it. Read-only, forever.

init · copied once
the recordCharacterProgression/<character>/ sheet.md · inventory.md · status.md · progression.md

The current character, plus an append-only log of every permanent change (P-0001, P-0002…).

import at run start · noted as “@ P-0003”
this runThe run's copycharacters/player.md

Everything that changes during play stays here and in the run's log.

end of run · debrief · only what you approve
Debrief · end of runEXAMPLE

WHAT HAPPENED

Slipped past the night watch, opened the archive, delivered the ledger. E-0042 → E-0058

WHAT TO KEEP

✓currency +2,000¥ (delivery fee)E-0057 ✓advancement +6 (GM approved)E-0058 ✓gear + datashardE-0057 ✗gear + armor upgrade (declined)player

STAYS IN THE RUN

bruised ribs (healed) · temporary heat · the patrol clock

P-0004 appended · record P-0003 → P-0004 · sheet, inventory, status replaced · re-read ✓
Only at the endNothing reaches the record mid-run. Rewards, buys and wounds wait for the debrief.
Changes, not copiesApproved changes apply on top of the current record (+2,000¥, +6), so runs played in parallel never overwrite each other. A real conflict comes back to you.
One game per recordPlayed in another game? A per-game subfolder. Statistics are never converted between systems.

Skill: /00-rpg-progression init · import · debrief · apply · status

08 / DICE

The dice never lie

An AI can “roll” by simply writing a number. This table forbids it. Randomness comes from somewhere real, or the roll doesn't happen.

A
A verified host rollThe rpg_dice tool (the OpenCode plugin in plugins/rpg-dice) draws from a secure random source and returns a receipt with every face. The scribe copies it into the log untouched.
B
Your own diceRoll at your desk and type the faces. They are logged as player-reported, never dressed up as a verified roll.
C
No dice availableThe action waits, or, if you agree, an openly recorded non-random house rule decides it. It is never called random, never called official.

And always: choices the rules give to you before a roll (spending a resource, pushing harder) are asked first. Nobody spends your resources for you.

Anatomy of a receipt

What the dice tool hands back, copied untouched into mechanics.md. Example values.

{
  "receipt":  "roll-3f9c0a17d2e4b851",1
  "notation": "7d6",
  "purpose":  "Agility + Locksmith",2
  "faces":    [6, 2, 5, 1, 4, 5, 3],3
  "total":    26,
  "ones":     1,
  "hits_5_6": 3,4
  "provider": "host-csprng"5
}
1A unique ID, written verbatim next to the event it belongs to. 2What the roll is for, stated before the dice are thrown. 3Every face, in order. A d20 roll also reports its natural result. 4Raw counts only. The tool never decides success, glitches, Edge or costs: the active game's rules skill does, from these faces. 5Where the randomness came from: a secure generator on the host.
1 · YOUPre-roll choices the rules give you
2 · DICE TOOLRolls, returns faces + receipt
3 · RULES SKILLJudges hits, glitch, outcome
4 · SCRIBEWrites receipt and event, re-reads
09 / GAMES

Adding your own game

Everything game-related lives in skills: folders of Markdown pages the agents read. The table is one numbered family of skills. Each game is another family stacked on top of it, bringing the real rules and the game's own specifics. Shadowrun and Cypher show the pattern; your game takes the next number.

00
The table
00-rpg-*

System-agnostic. Never holds a game's numbers.

  • session start, checkpoint, resume, end
  • scene fiction-first scenes, the manners
  • resolution when to roll, the dice boundary
  • journal event log, receipts, chronicle
  • character imported sheets, never overwritten
  • npc motives, knowledge limits
  • world places, factions, clocks
  • adventure situations, not outcomes
  • consistency the audit
  • resume rebuild from the log
01
Shadowrun 6E
01-shadowrun-*
01-shadowrun-rules

The 2019 core rulebook embedded as text, twice (flat, and with columns preserved), critical tables verified by hand with an audit of what was checked, plus quick guides: core mechanics, combat, Matrix, magic, rigging, equipment, characters.

01-shadowrun-lore

A Sixth World primer. Every statement is classed: published canon, campaign fact, GM-private, rumor, NPC false belief, unknown.

01-shadowrun-run

Jobs: credible Johnsons, contacts, legwork, security, Heat, two or three ways in, a complication clock, anchored to your runner's sheet.

02
Cypher System
02-cyphersystem-*
02-cyphersystem-rules

The full 2025 SRD (36 Markdown files) with a checksum manifest and its license, plus quick aids: rules engine, combat and recovery, XP and intrusions, cyphers and gear, GM guide.

02-cyphersystem-catalog

How to look up named types, foci, abilities and creatures: open the whole original entry, never just its heading.

02-cyphersystem-character

Pools, Edge, Effort, XP, cyphers; PC and NPC sheet templates.

02-cyphersystem-adventure

Genre clocks, open outcomes, GM intrusions offered with correct XP, solo included.

03
Your game
03-yourgame-*
03-yourgame-rules

Always. The real rules, embedded.

Then only the skills your game actually has: setting lore, a catalog for long option lists, character tracking, an adventure style.

Same skeleton, different organs: Shadowrun needed a lore skill and a job skill; Cypher needed a catalog and a character skill. Build what your game has, not a checklist.

Inside a game skill · real examples
01-shadowrun-rules/
  SKILL.md                when to use it, procedure, limits
  references/
    core-mechanics.md     quick guide: pools, hits, Edge
    combat.md  matrix.md  magic.md  …
    offline-source-index.md   map of the book
    core-2019/            the book as text, 8 pages a file
    core-2019-layout/     same pages, columns kept
    table-corrections.md  tables verified by hand
    table-audit.md        what was checked, what wasn't

02-cyphersystem-character/
  SKILL.md
  assets/
    cypher-character-sheet.md   templates
    cypher-npc-sheet.md
What every game skill promises
OfflineThe source is embedded. No web lookups mid-game.
Exact editionNo 5E in a 6E game; no Shadowrun Edge in Cypher.
Source beats summaryQuick guides are aids; on conflict the embedded text wins.
Uncertainty labeledAn unverified table says so instead of guessing.
Real dice onlyPlayer-reported faces or the dice tool, never an invented one.
Fails plainlyA missing source file is reported, not improvised around.
Unknown stays unknownSheets never get plausible filler.
How, not whoA skill describes the procedure; the crew decides who runs it.
Where a new family plugs in
1Resolution00-rpg-resolution loads exactly one local ruleset: 01-shadowrun-rules or 02-cyphersystem-rules. Add yours to that list.
2Session start00-rpg-session asks which game: shadowrun-6e or cypher-system. Add your game's id.
3System contractsystem.md lists the skill families and says a session selects one selected rules family. Add your family to the table and to that sentence.
Claim the next number. One family per game: 03-yourgame-. Never mix two games inside one family.
Write the rules skill first. Embed your source as Markdown split into page or chapter files with an index, add quick guides for the core loop, hand-check the critical tables and write down what you checked.
Add the organs your game has. Lore, a catalog, character tracking with sheet templates, an adventure style: copy the shape of the closest existing family.
Hook it in. The three places above. Nothing else in the table changes.
Play a test session. The table skills create the session folder, run scenes and NPCs, keep the log, receipts and chronicle, exactly as for the other two games. Every skill is also a slash command: /03-yourgame-rules.
Rights, plainly

The two families sit on opposite sides of the line. The Shadowrun rules skill embeds the owner's own copy of a commercial book, marked private and not for redistribution. The Cypher rules skill embeds the open SRD under the Cypher System Open License, with the license kept beside it. Know which one you're building before you share it.

10 / FACTORY

Build your own crew

Every seat is one OpenCode agent file in agents/: a frontmatter block for its permissions, then a page of plain text for its role. Copy this one, rename it, sharpen it.

agents/map-keeper.md · editable
Seat it in three steps1 · Save the file in agents/.
2 · Allow it in agents/gm-voice.md: add map-keeper: allow under subagent:.
3 · Add it to system.md: the crew list, the routing table, and the table-ownership table.
One jobIf a role needs the word “and” twice to describe, it is two roles.
Write the “never” firstBoundaries make an agent trustworthy. What it may not touch matters more than what it may.
Only the voice talks to you, only the scribe writesNew seats hand back to the GM voice and stay read-only. A second narrator or a second writer breaks the table.
Nobody grades their own homeworkWhoever builds something is not the one who checks it. Independent review stays independent.
Evidence over vibesClaims about rolls, saves and rules need a receipt. Missing evidence is “unverified”, not “probably fine”.
Seats people might add
map keeperrival crewsoundtrack cuessafety & tone checkloot appraiserrecap narrator
11 / SETUP

Set up the table

agentic-gm is built for OpenCode: it relies on OpenCode's per-agent permissions, a primary agent, one level of sub-agents and an in-process plugin for the dice.

Install
git clone <agentic-gm> ~/.agentic-gm
ln -s ~/.agentic-gm/system.md ~/.config/opencode/AGENTS.md
ln -s ~/.agentic-gm/agents    ~/.config/opencode/agents
ln -s ~/.agentic-gm/skills    ~/.config/opencode/skills
ln -s ~/.agentic-gm/plugins   ~/.config/opencode/plugins
opencode.json
"default_agent": "gm-voice",
"experimental": { "subagent_depth": 1 }
Play
Start a session. /00-rpg-session start, or /01-shadowrun-run for a Shadowrun job. Bring a character sheet if you have one.
Play. Say what your character does. The GM voice answers; the crew works behind it.
Come back later. /00-rpg-resume <session folder> rebuilds where you were from the log.
12 / FAQ

Questions players ask

Do I need to code?

No, not to play or to shape the crew. Roles are one Markdown page each, and games are families of Markdown skills. You need OpenCode and a model; the only executable piece is the small dice plugin, and you can always roll your own dice instead.

Is it only for solo play?

It is built for one player first: no forced party, no filler companions, your character stays the competent lead. The table rules don't assume solo, though, and group runs fit the same contract.

Will it railroad me?

Adventures are prepared as situations, not scripts: pressures, clocks and several ways in. Declining a job, retreating, negotiating or failing are legitimate outcomes. The GM owns consequences, never your choices.

Can I trust a rule it quotes?

Every ruling is labeled: official rule, interpretation, or table ruling, with the source when there is one. Ask for the page and you get it. If two notes disagree, the original text wins.

What happens when it gets something wrong?

The log is append-only, so a mistake is fixed with a new correction entry that cites the old one. Dice are never re-rolled to fix bookkeeping. The story may glitch; the ledger may not.

Can I keep playing my existing character?

Yes, run after run. Your original sheet is never edited; your character lives in a progression record that each run imports, and that changes only at the end of a run, through a debrief you approve. Rewards earned in a session are offered, not silently written into your campaign.

Does anything I say in character trigger real actions?

No. Fiction never authorizes real effects: an in-character “hack the server” stays inside the story. Real operations are separate requests, handled outside the game.