Agentic PrimitivesAGENTIC PRIMITIVES

Example application · third-party on the substrate

Game Night.
The house holds nobody’s key.

A card room where people and AI agents sit at the same table — and every chip is authorized, settled and receipted by the substrate.

Play it — play money, demo people Source
Cloudflare WorkersDurable ObjectsVite + ReactA2AERC-7710Sheqel (SHQ)faithchain
Game Night landing page
gamenight.faithnet.io

01By the numbers

What the card room did not have to build.

Game Night is a Texas Hold'em and Canasta card room on the faithnet estate. It is a third-party application: it imports the published @agenticprimitives packages, signs people in through the estate's Home, and never holds a player's keys. It exists to be played — and to exercise every layer of the substrate end to end, for play money.

2
Games
Hold'em (staked) · Canasta (scored)
4
Agent kinds at the table
person · AI player · house treasury · club workspace
1
App-owned contracts
Sheqel — the rest is the platform's
0
Player keys held by the house
every buy-in is the player's own mandate
The whole right-hand side of the diagram below — Home, agents, treasuries, mandates, the runtime, the registry, the chain — is the same code and the same contracts that run every other application on the estate. Game Night wrote a card room.

02Architecture

What the card room built, and what the substrate supplied.

Game Night architecture: the card room's own Workers and one contract, on the substrate's Home, agents, delegations, registries and chainWHAT THE CARD ROOM BUILTWHAT THE SUBSTRATE SUPPLIEDWeb client · gamenight.faithnet.ioVite + React · CloudflarePlay · Tables · Your money · your clubsone board per game (hold'em, canasta)Tables Worker · games.faithnet.iohono routes · SessionDO · LobbyDOPokerTableDO: WebSockets, SQLite, alarmsa table HOSTS a game, never knows whichseeded shuffle + commit–reveal; byte-identical replaymoney in chips; asset + rate PINNED per tableasks AI seats for a move over A2A; keeps no rosterEngines (pure)@pokernight/engine@pokernight/canastano I/O, no clockAgent workerA2A personas: poker.act,canasta.actadmits the house onlySheqel (SHQ) · contracts/the ONE contract the app owns: a parameterised ERC-20, 6 decimals, open mintCoach words + playbooks (~/skills)SKILL.md contracts: hold'em / canasta coach · study grant · quiet unless asked Home · www.faithnet.mepasskey sign-in → OIDC (PKCE) → alice.mecharters alice.treasury on first connectceremonies: buy-in mandate · club charter · club wirethe mission registry's org-create + covenant signaturealice.mePerson Smart Agentsigns the buy-inmandate (ERC-1271)alice.treasuryService Agent, hersholds SHQpayer of buy-inspokernight.treasury (the house)Service Agent of the card roompayee of every buy-in · payer of cash-outssigns with a KMS key that is a DELEGATEunder a session wire — revocable at the Homesharkbot.svcAI playeradvertises poker.actasked by the tablethursday.workspacea club = its agentroster in ITS vaultroom holds a wireThe buy-in mandate (ERC-7710 delegation, signed by alice.me)alice.treasury → pokernight.treasury · caveats: target = SHQ · method = transfer · value ≤ 2,000 SHQ · 30 daysasset pinned — a table refuses a mandate in any other coin · redeemed per buy-in with a single-use noncerevoke = one transaction from her Home → the next buy-in is refused at every table, with no list to updateAgent runtime · a2a.faithnet.ioher agent runs the coach playbook under a STUDY grant:reads only what her seat sees (viewFor), offers a move,the move is checked against the rules before a buttonis drawn; tokens billed to her, quiet unless askedMission registry (registry kit)gamenight-missions on AgentRegistryBaseOPEN: the mission org registers itself (RB-01);the operator admits from chain + vault; the stewardsigns a 3-clause covenant; a mission is a game's GUESTfaithchain (Besu QBFT · chain 34348 · free gas · 2 s blocks)an AgentAccount (ERC-4337 / 7579) for every agent above · DelegationManager + caveat enforcers redeem the mandateSheqel transfers · a receipt per buy-in and cash-out · club membership and mission admission readable from chain stateOIDCverify · redeemdeploysplaybookchartersignsdelegatordelegateredeem · receiptPlayer keys held by the house: 0Contracts the app owns: 1 (Sheqel)Agent kinds at one table: person · AI player · house treasury · clubEverything in the right column is the same code and the same contracts that run the estate's other applications. Game Night wrote a card room.agenticprimitives.dev
Left: the card room's own code — a Vite client, one Tables Worker with Durable Objects per table, two pure game engines, an agent worker that answers A2A turn requests, one ERC-20 (Sheqel), and coach playbooks. Right: everything from the substrate — the Home that signs people in and charters treasuries, the Smart Agents at the table, the buy-in mandate with its caveats, the agent runtime that hosts the coach, a registry built from the kit, and the chain where every buy-in is redeemed and receipted.

03The requirements

Every capability the app needed, and where it came from.

Below is the list a product team writes on day one for an application like this — and, for each line, what the team would have stitched together versus what the substrate handed them.

NeedTypically stitched fromOn the substratePrimitive
People sign in with a passkey and are known by a nameAuth0 + a users table + a display-name columnHome OIDC (PKCE) → session; the player is `alice.me`Person Smart Agent · typed name · Home ceremony
A player has money that is theirs, not the house'sA custodial balance in Postgres, or a hot wallet per player that you holdA `.treasury` Service Agent chartered under the person at their Home; one per playerService Agent · charteredUnder · custody policy
The house may take a buy-in — only this payee, only up to this much, only in this coinA saved payment method + a max-amount check in application codeA buy-in mandate the player signs: payee = house treasury, value ceiling, asset pinned, time-boundedERC-7710 delegation · caveat enforcers · intent digest
The house signs settlements without holding an identity key on a serverA private key in an environment variable, signing as the house forever`pokernight.treasury` signs with a KMS delegate under a session wire; revocable from the Homedelegated-signer · ap-kms · session wire
An app-specific currencyAn ERC-20 — the one thing you would write either way`Sheqel`, a parameterised ERC-20 — the only contract the app ownsthe app's own contract beside the platform's
AI players sit at the same tables as peopleBot accounts with API keys and a bespoke bot protocol`.svc` agents advertise `poker.act` / `canasta.act`; the table asks each turn over A2AA2A AgentSkill · standard surface · admission
A club with a roster, but the card room keeps no member listA members table + an invite-codes table + an admin roleA club is a `.workspace` Smart Agent at the Home; membership lives in its vault; the room holds only a wireworkspace agent · vault records · membership situations
Your own agent coaches your hand — and pays for its own tokensAn LLM call with the whole table state in the prompt, billed to the houseThe person's agent, with a study grant, runs the coach playbook from the skills registryharness · playbook by digest · scoped grant
A mission organization can be a game's guest — vetted, not just listedAn allow-list in a config file, edited by handA kit-built registry `urn:ap:registry:gamenight-missions`; the org self-registers, the operator admitsregistry-kit · admission receipts · covenant signed by the steward
Every hand replays; every chip movement has a receiptApplication logs + a hand-history table you hope nobody editsSeeded shuffle with commit–reveal; on-chain settlement receipts per buy-in and cash-outprovenance · receipts · vault-resident records

04The flow

One evening at a table, step by step.

  1. 1

    Sign in

    Passkey → OIDC code → the card room mints a session for `alice.me`

    Alice · Home (faithnet.me)

  2. 2

    Get ready

    Charter `alice.treasury`; seed the play coin; sign the buy-in mandate (payee, ceiling, coin)

    Alice · Home

  3. 3

    Sit down

    The table verifies the mandate is live, then asks the house treasury to settle the buy-in

    Table · Cloudflare Durable Object

  4. 4

    Settle

    KMS delegate signs under its wire; the caveat enforcers check payee, value and time on chain; a receipt lands

    House treasury · faithchain

  5. 5

    Play

    People act over WebSocket; AI players are asked over A2A in their own game's skill; hands replay byte-identically

    Everyone · Table

  6. 6

    Coach

    Under a study grant it reads only what her seat sees and offers a move — checked against the rules before a button is drawn

    Alice's agent · Agent runtime

  7. 7

    Cash out

    The cash-out settles from the house to Alice's treasury; the row and the receipt are hers

    Table → House · faithchain

  8. 8

    Revoke

    One transaction revokes the mandate; the next buy-in is refused everywhere, with no list to update

    Alice · Home

05The mandate

The one signature that makes a buy-in possible — and the one transaction that ends it.

The player never sends money to the house. She signs a delegation from her treasury to the house's, bounded by caveats the chain enforces. Every buy-in redeems it once. When she revokes, every table refuses the next buy-in and there is no list to update.

Anatomy of a delegation and a mandate: delegator, delegate, caveats with enforcers, intent digest, signature, revocationDELEGATION · ERC-7710 · EIP-712 SIGNEDdelegatoralice.treasury — whose authority this isdelegatepokernight.treasury — who may redeem itauthorityROOT — or the hash of a parent delegation: attenuation is a chain, never a functionCAVEATS[] — EACH AN ENFORCER CONTRACT + TERMS; ALL MUST PASS AT REDEMPTIONTimestampEnforcernotBefore · notAftervalid 30 daysAllowedTargetsonly the SHQ tokencontractAllowedMethodstransfer(address,uint256)and nothing elseValueEnforcer≤ 2,000 SHQper redemptionPaymentEnforcerpayee pinned tothe house treasuryDigestBinding ★sha256 of the exact intent —this caveat makes it a MANDATEsalt · signaturesingle-use nonce · ERC-1271 by alice.merevocationDelegationManager.revoke(hash) — one tx, finalCompare: an OAuth token is a cached verdict — valid until it expires, whatever happens in between.LIFECYCLE1 Minted at the Homethe custodian signs; the preview is the caveats in words2 Presented per requestlive? unrevoked? delegate = actor? selector = this step?3 Redeemed on chainevery enforcer runs again; the nonce is spent once4 Receiptedintent · mandate · step · playbook digest · tx → owner’s vault5 Revoked — when the owner saysno expiry to wait out; no cache to flush; refused at the next gateChecked once is cached. Checked every time is authority.agenticprimitives.dev
The buy-in mandate as the chain sees it. Each caveat is an enforcer contract that runs at redemption. The asset is pinned: a table that plays in SHQ refuses a mandate in any other coin.

06Screens

What a player sees.

Game Night — Play, signed in as Alice
Play, as Alice. Two doors: learn canasta, or play hold’em against the house. One press deals you in.
Deal me in — Texas hold’em
Deal me in. Texas hold’em, play money — no buy-in, no authorisation, the same engine the money tables run.
Alice playing a Texas hold’em hand
A hand in progress. Alice holds A♠ 8♥; it is her turn. The house players are seated. bob-coach.svc, via alice.me, says why a check is free — she still has to press the button.

Captured from gamenight.faithnet.io, signed in as Alice Okoro, the estate’s demo person.

07What this proves

A complete agentic application without a custom trust stack.

Humans and agents on one identity model.

Alice, an AI player, the house treasury and a club are all Smart Agents. The table does not know or care which seats are people — the protocol is the same.

Money moved under the player's own authority.

No custodial balance, no hot wallet with everyone's chips. The house holds a delegation it cannot exceed, and the player can end it in one transaction.

Evidence without a trust-us dashboard.

Every buy-in and cash-out is a redeemed delegation with a receipt. A dispute is settled by reading the chain and the player's vault, not by asking the operator.

Your application is the left column.

Everything on the right is packages you install and contracts already deployed. Start with sign-in and a treasury; add mandates when money moves; add agents when you want them at the table.