GABP is a communication protocol that lets AI tools talk to games. It works like a bridge between AI agents and game modifications. This allows AI systems, testing tools, and other programs to control and interact with games in a standard way.
Protocol Version: 1.0
Repository Versioning: SemVer
Wire Protocol Version: gabp/1
The protocol uses semantic versioning for repository releases. The wire protocol version gabp/1 represents the major
version and will only include additive changes within the 1.x series. Breaking changes will require gabp/2 and new
schema folders.
GABP defines these key parts:
- Message Format: JSON messages that look like JSON-RPC with requests, responses, and events
- Transport Layer: Works with stdio, TCP connections (local only), and pipes/sockets
- Security Model: Uses tokens for authentication and only allows local connections
- Method Registry: Standard names for methods and error codes
- Capability Negotiation: Handshake process to discover what features are available
- Bridge: The client program that connects to the game mod (this is your AI tool)
- Mod: The server program running inside the game (the game modification)
- Agent: The AI or automation system that uses the bridge to control the game
- Main Specification - Complete protocol rules and requirements
- Transport & Connections - How to connect and send messages
- Security Guide - Authentication and safety rules
- Method Registry - Standard method names and error codes
- Wire-Model Decisions - Canonical 1.0 wire naming and field choices
- Attention And Execution Gating Architecture -
Architecture and rollout note for additive attention support within
gabp/1 - AI Implementation Guide - AI-assisted development prompts and patterns
Computer-readable definitions are in the SCHEMA/1.0/ directory:
envelope.schema.json- Basic message structuremethods/- Schemas for standard method callsevents/- Schemas for event messagescommon/- Shared definitions used everywhere
Working examples of GABP messages are in EXAMPLES/1.0/:
- Handshake - How to start a session
- Tools - How to find and use tools
- Events - How to subscribe to and receive events
- Attention - Optional attention inspection, lifecycle, and acknowledgement flow
You can validate GABP messages using AJV:
npm install -g ajv-cli
ajv -s SCHEMA/1.0/envelope.schema.json -d 'your-message.json'The CONFORMANCE/1.0/ directory contains:
- Connect: Bridge connects to mod using one of the transport methods
- Handshake: Send
session/helloand receivesession/welcomemessages - Discover: Use
tools/listto see what the game can do - Interact: Call methods, subscribe to events, and read resources
Optional additive support within gabp/1 lets implementations expose important summarized game-side state through:
attention/currentattention/ackattention/openedattention/updatedattention/cleared
Bridges MUST discover that support through capabilities.methods and capabilities.events instead of assuming it is
always present.
Basic handshake example:
// Bridge -> Mod: session/hello
{
"v": "gabp/1",
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "request",
"method": "session/hello",
"params": {
"token": "abc123...",
"bridgeVersion": "1.0.0",
"platform": "windows",
"launchId": "game-session-123"
}
}
// Mod -> Bridge: session/welcome
{
"v": "gabp/1",
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "response",
"result": {
"agentId": "minecraft-mod-v2.1",
"app": {
"name": "Minecraft",
"version": "1.20.4"
},
"capabilities": {
"methods": [
"tools/list",
"tools/call",
"events/subscribe",
"events/unsubscribe",
"resources/list",
"resources/read"
],
"events": ["player/move", "world/block_change"],
"resources": ["gabp://game/world/schematic"]
},
"schemaVersion": "1.0"
}
}The repository includes three versioned schema packages, all sourced from the canonical SCHEMA/1.0/
tree.
The gabp-schemas package bundles the schema tree and exposes preloaded
validators for Node.js and TypeScript consumers.
npm install gabp-schemasconst { validateRequest } = require("gabp-schemas");
const message = {
/* your GABP request */
};
const result = validateRequest(message);
if (!result.valid) {
console.error("Validation errors:", result.errors);
}The Gabp.Schemas package embeds the same schema assets and exposes them
through the SchemaAssets API for .NET consumers.
NuGet package ID: Gabp.Schemas
The github.com/pardeike/GABP/packages/go/schemas module embeds the same versioned
schema assets for Go consumers.
Module path: github.com/pardeike/GABP/packages/go/schemas
Repository releases for the npm package and NuGet package use top-level tags such as v1.1.0. The Go module uses
subdirectory-prefixed tags such as packages/go/schemas/v1.1.0.
See CONTRIBUTING.md for guidelines on contributing to the GABP specification.
See VERSIONING.md for details on how GABP versions are managed.
- Specification documents (in
SPEC/) are licensed under CC BY 4.0 - Code, schemas, and examples are licensed under Apache 2.0
See CHANGELOG.md for a complete history of changes.