Skip to main content

Available Integrations

AIRI supports multiple platform integrations, allowing you to interact with your AI assistant across different services and games:

Discord

Voice and text chat integration for Discord servers

Telegram

Intelligent bot for Telegram chats with sticker and photo support

Satori Protocol

Universal chat platform adapter supporting multiple platforms via Satori

Minecraft

Autonomous bot with cognitive architecture for Minecraft gameplay

Factorio

Game automation and RCON integration for Factorio
Twitter/X integration is available via Model Context Protocol (MCP). See the Twitter Services MCP documentation below for setup instructions.

How Integrations Work

AIRI’s integration architecture is built on the server-runtime system, which provides a unified way for different services to connect and communicate with the core AIRI AI.

Architecture

Server Runtime

The @proj-airi/server-runtime package provides the core server infrastructure that:
  • Manages WebSocket connections from integration clients
  • Handles event routing between services and the AI engine
  • Provides session management and context isolation
  • Coordinates multi-platform interactions

Server SDK

The @proj-airi/server-sdk package is used by integration services to:
  • Establish WebSocket connections to the server runtime
  • Send and receive typed events
  • Handle reconnection and error recovery
Basic SDK Usage:
import { Client } from '@proj-airi/server-sdk'

const client = new Client({
  name: 'my-integration',
  url: 'ws://localhost:6121/ws',
  possibleEvents: ['input:text', 'output:gen-ai:chat:message'],
  token: 'your-token'
})

// Send input to AIRI
client.send({
  type: 'input:text',
  data: { text: 'Hello AIRI!' }
})

// Receive responses
client.onEvent('output:gen-ai:chat:message', async (event) => {
  console.log('AIRI responded:', event.data.message.content)
})

Common Setup Steps

Most integrations follow a similar setup pattern:

1. Environment Configuration

Create a .env.local file in the service directory:
cd services/your-service
cp .env .env.local

2. Service Credentials

Add platform-specific credentials (bot tokens, API keys, etc.)

3. AIRI Connection

Configure the connection to the AIRI server runtime:
AIRI_URL=ws://localhost:6121/ws
AIRI_TOKEN=your-token

4. LLM Configuration

Most services require LLM API credentials:
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o

5. Start the Service

pnpm run -F @proj-airi/your-service start

Event Types

Integrations communicate using typed events:
  • input:text - Text messages from users
  • input:text:voice - Transcribed voice input
  • input:voice - Raw audio input
  • output:gen-ai:chat:message - AI responses
  • module:configure - Runtime configuration updates

Session Management

AIRI maintains separate conversation contexts based on:
  • Platform: Discord, Telegram, Minecraft, etc.
  • Channel/Chat: Individual Discord servers, Telegram groups, etc.
  • User: Direct messages or private interactions
Session IDs follow the pattern: {platform}-{channel-or-user-id} Examples:
  • discord-guild-123456789
  • telegram-dm-987654321
  • minecraft-bot

Additional Integrations

Satori Protocol Adapter

The Satori bot (@proj-airi/satori-bot) provides a universal adapter for connecting to multiple chat platforms through the Satori protocol. This allows AIRI to work with:
  • QQ
  • WeChat
  • Line
  • WhatsApp
  • And other platforms supported by Satori adapters
Key Features:
  • Multi-platform support through a single integration
  • Unified message handling across different platforms
  • Automatic protocol translation
  • WebSocket-based communication
Location: services/satori-bot/
cd services/satori-bot
cp .env.example .env

# Configure Satori connection
SATORI_WS_URL=ws://localhost:5500
SATORI_TOKEN=your-satori-token

# Start the bot
pnpm start

Twitter Services MCP

The Twitter/X integration (@proj-airi/twitter-services) uses Model Context Protocol (MCP) to interact with Twitter/X through browser automation. Key Features:
  • Tweet reading and posting via Playwright
  • Headless browser automation with Stagehand
  • MCP server for tool integration
  • Local HTTP server for external access
Location: services/twitter-services/
cd services/twitter-services
cp .env.example .env.local

# Configure Twitter credentials
# Add your authentication details to .env.local

# Install Chromium and start
pnpm dev

# Run MCP inspector (optional)
pnpm mcp:ui
The service exposes MCP tools that can be called from AIRI’s main application.

Next Steps

Set up Discord

Add AIRI to your Discord server

Set up Telegram

Deploy your Telegram bot

Set up Satori

Connect to multiple platforms via Satori protocol

Set up Minecraft

Run AIRI in Minecraft

Set up Factorio

Automate Factorio gameplay

Server Runtime API

Learn about the integration architecture

Build docs developers (and LLMs) love