IM Integration

Turn your local LLM into a powerful personal assistant on Discord, Slack, and Telegram. On Device AI can automatically reply to messages, use tools, and provide remote access to your local models.

Overview

The IM connection feature allows On Device AI to log in as a bot on supported platforms. When enabled:

Discord Setup

  1. Create Application

    Go to the Discord Developer Portal, click "New Application", and give it a name.

  2. Enable Bot

    Go to the Bot tab, click "Add Bot", and confirm. Click "Reset Token" to get your Bot Token.

  3. Set Permissions

    In the OAuth2 > URL Generator tab, select the bot scope. Under Bot Permissions, select Send Messages and Read Message History.

  4. Invite & Connect

    Copy the generated URL to invite the bot to your server. Paste the Bot Token into On Device AI settings.

Slack Setup

  1. Create App

    Go to Slack API, create a new app "From scratch", and select your workspace.

  2. Enable Socket Mode

    Go to Socket Mode, enable it, and generate an App-Level Token (xapp-...) with connections:write scope.

  3. Subscribe to Events

    Go to Event Subscriptions, enable events, and add message.im and app_mention to "Subscribe to bot events".

  4. Add Scopes

    Go to OAuth & Permissions and add these Bot Token Scopes: chat:write, im:history, im:read, app_mentions:read.

  5. Install

    Go to Install App, install to workspace, and copy the Bot User OAuth Token (xoxb-...).

Telegram Setup

  1. Talk to BotFather

    Open Telegram and search for @BotFather.

  2. Create Bot

    Send the command /newbot. Follow the prompts to set a name and username (ending in 'bot').

  3. Get Token

    BotFather will send you an HTTP API token. Copy this token into On Device AI settings.

Autopilot & Tools

Once connected, you can configure how the AI behaves: