For Agents

This page is the fastest entrypoint for LLM agents and automation tools.

What Air Jam Is

Air Jam is an open AI-native framework for multiplayer games controlled by phones. Hosts run in your game, inputs are routed through the Air Jam server, and both humans and agents work against typed controller, runtime, state, and release surfaces instead of guessing through UI only.

Air Jam is the harness around your existing coding agent, not a separate hosted editor. Local project instructions, CLI commands, MCP tools, runtime observations, and hosted release services form one development path.

Connect to a Project

Run these commands from a generated game project with dependencies installed:

Bash
pnpm exec airjam --help
pnpm exec airjam mcp doctor --dir . --json
pnpm exec airjam mcp config --profile portable --dir .

New projects include .mcp.json. If a project has no declaration, use pnpm exec airjam mcp init --dir .; it does not overwrite an existing declaration unless you explicitly pass --force.

Some clients use their own registration formats instead of reading .mcp.json:

Bash
pnpm exec airjam mcp config --profile codex --dir .
pnpm exec airjam mcp config --profile claude-desktop --dir .

These commands render configuration; they do not install it into the client. Use the rendered command, arguments, and absolute project directory when adding the server. mcp doctor distinguishes project declarations from detected client registrations. Confirm that the connected client discovers Air Jam's tools before treating the connection as working.

Operate and Evaluate

For gameplay assertions, use airjam.open_game_session, airjam.read_game_session, airjam.invoke_game_session_action, and airjam.close_game_session. Read each session's published actions and state; do not guess game-specific action IDs. airjam.capture_game_session_visuals adds host and phone-controller screenshots to the same session.

MCP is optional. A terminal agent can use the same services:

Bash
pnpm exec airjam session open --dir .
pnpm exec airjam session read <session-id> --dir .
pnpm exec airjam session invoke <session-id> <action-id> --payload '{}'
pnpm exec airjam session capture <session-id> --dir .
pnpm exec airjam session close <session-id> --dir .

A session starts or reuses the canonical development process. If you start it yourself, use pnpm run dev, not raw Vite. Use semantic state for repeatable gameplay checks and rendered screenshots or browser interaction for visual polish. During editing, run the relevant focused checks. Before sharing a completed game, run pnpm exec airjam evaluate --dir . or the airjam.evaluate tool for the complete typecheck, lint, test, and build result.

The Quick Start publishing guide covers CLI authentication, hosted release submission, inspection, and explicit publication. Local development and evaluation do not require hosted publishing.

Read These First

  1. Introduction
  2. Quick Start
  3. Architecture
  4. Host System
  5. Project Structure
  6. Controller UI
  7. State and Rendering
  8. SDK Hooks
  9. Debugging and Logs
  10. Unified Dev Logs

SDK Focus Areas

Machine Discovery