triggair /docs
Agent-first game backend

Ship the game. The backend's already wired.

One import and one publishable key give a browser game a full backend: identity, saves, leaderboards, an economy, LiveOps, competition, trust & safety, analytics — and errors that tell an agent how to fix the call.

drop-in.ts
import { createClient } from '@triggair/sdk';

const tg = createClient({ key: 'tg_pk_your_key' });

await tg.login();                              // anonymous player, auto-refreshed
await tg.saves.put('slot1', { level: 4 });     // cloud save
await tg.leaderboards.submit('high', 9000);    // leaderboard
await tg.achievements.report('first_win');     // reward → tg.inbox
tg.track('level_complete');                    // durable analytics

Everything a game needs, already built

Player-facing calls are the SDK; the server-side setup lives in a dashboard and the MCP server. Turn on only what you use — the surface is the same shape everywhere.

Players & saves

  • Anonymous-first identity
  • Cloud saves (conflict-safe)
  • Cross-device recovery
  • Player stats & profile

Engagement

  • Leaderboards
  • Achievements
  • Daily rewards & streaks
  • Inbox & reward claims
  • Quests · battle pass · progression

Social

  • Friends & requests
  • Share / invite links
  • Teams & clans
  • User content + remix (UGC)

Economy

  • Currencies & wallet
  • Stores & inventory
  • Loot boxes (disclosed odds)
  • Energy meters
  • Promo codes

Competition

  • Tournaments
  • Leagues (promotion/relegation)
  • Keyed boards (team / UGC)
  • Turn-based matches

LiveOps

  • Remote config
  • Feature flags + kill switch
  • Player segments
  • Live events

Trust & safety

  • Moderation (names, chat, UGC)
  • Evasion-resistant filtering
  • Age gate & parental consent
  • Reports · bans · appeals

Insight

  • Analytics: DAU/MAU, retention
  • Funnels & sessions
  • Economy health
  • Crash reporting (grouped)
Built for coding agents

The docs are the integration

llms.txt, built in

A concise /llms.txt index and a full /llms-full.txt guide — every snippet a real SDK call. Point your coding agent at them and it wires the backend itself.

An MCP server

Configure games, boards, economy, flags, moderation and more from your agent via the Model Context Protocol — no dashboard round-trips.

Errors that fix themselves

Every failure is a TriggairError with an agentHint that says how to fix the call. Transient errors retry on their own.

A one-command self-test

Run triggair_verify_integration after wiring: it live-probes the key services and reports pass/fail with fixes, so the loop actually closes.