A highly customizable chatbot/waifu for Discord featuring smart agentic AI features such as memory, personas, tool usage, and more!
  • TypeScript 98.2%
  • PLpgSQL 1.1%
  • Python 0.4%
  • Astro 0.2%
Find a file
2026-10-21 00:28:31 +08:00
.agents/skills Fix | Docs Page 404s 2026-10-11 16:07:18 +08:00
.github Fix | Voice Channel Permission Notices 2026-10-13 12:04:03 +08:00
apps Fix | Website Gallery Scrolling 2026-10-15 13:03:27 +08:00
assets Emoji Assets Folder 2026-09-07 10:50:35 +08:00
docker Fix | Docker Compose Setup Simplification 2026-09-26 16:53:06 +08:00
docs Fix | Reminder Processing 2026-10-21 00:28:31 +08:00
patches Fix | Residual Security 2026-10-09 10:25:32 +08:00
scripts Locale Syncing 2026-10-19 21:55:52 +08:00
servers Fix | Leave response time within SearXNG search deadline 2026-10-19 09:12:13 +08:00
src Fix | Reminder Processing 2026-10-21 00:28:31 +08:00
tests Fix | Reminder Processing 2026-10-21 00:28:31 +08:00
tokenizers Docs | ST Preset Documentation 2026-03-28 12:44:01 +08:00
.dockerignore CI/CD | SearXNG and Container Efficiency with zram 2026-08-06 13:32:17 +08:00
.env.example Refactor | Dead Custom Provider Code 2026-07-24 14:14:34 +08:00
.env.optional.example Fix | Moved Decision model slot 2026-10-18 10:08:37 +08:00
.gitattributes Chore | CRLF->LF Normalization 2026-06-01 12:51:13 +08:00
.gitignore Fix | Custom Link for Expression Logic 2026-10-07 19:35:19 +08:00
AGENTS.md Fix | Error Log Handling and Printing 2026-10-20 09:08:51 +08:00
biome.json Fix | Test Linting and TS Checks 2026-09-24 15:10:38 +08:00
bun.lock Fix | Docs Page 404s 2026-10-11 16:07:18 +08:00
bunfig.toml Docs | Prose Linting 2026-09-25 11:35:24 +08:00
docker-compose.yaml Feat | Custom Prose Linter Servers and Slop-Guard 2026-10-11 13:11:19 +08:00
Dockerfile Fix | Default MCP Retirment 2026-10-08 19:18:09 +08:00
LICENSE Legal | Terms and Policies Draft 2025-11-24 23:12:28 +08:00
package.json Fix | Preserve package metadata encoding 2026-10-19 10:50:20 +08:00
README.md Fix | Default MCP Retirment 2026-10-08 19:18:09 +08:00
tsconfig.json Fix | /tests/ Type Errors 2026-09-26 15:52:12 +08:00

English | 日本語 | 繁體中文 | 简体中文 | Español | Português (Brasil) | Tiếng Việt

Note

This README is a quick overview. For the full, up-to-date documentation (setup guides, feature walkthroughs, provider info, and more) visit docs.tomoribot.app.


Logo

TomoriBot

A self-hosted and customizable personal AI assistant/role-playing system for Discord with memory, multiple personas, tool calling, multimodality, and API/local model support.

Official Website · Invite TomoriBot · Discord Server
Latest Releases · Report Bug · Request Feature

GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests License

TomoriBot Banner BunDiscord.jsTypeScriptPostgreSQL

About the Project

TomoriBot is a free and open-source self-hosted personal AI assistant and role-playing system for Discord, inspired by SillyTavern and Discord's discontinued Clyde. It can be used as a practical assistant, customizable companion, and role-play partner for yourself in DMs, or for everyone in your Discord server.

TomoriBot supports long-term memory, multi-persona behavior, web and MCP tools, in-chat media generation, 200+ Discord slash commands, and multiple providers including custom proxies and self-hosting your own models for everything from text generation to video generation.

Getting Started

You can invite the public TomoriBot to your Discord server, or self-host your own instance if you prefer full control over your privacy and API keys. TomoriBot uses best security practices and encryption that keeps data safe, but self-hosting ensures that all data remain entirely on your device.

After adding her to your server through either method above, run the /setup command for instructions. Then you can simply say her name (or @ mention her) in order to get a response.

Feature Showcase

Screenshots 1

Agentic AI-Powered Conversation

TomoriBot has LOTS of tools that allows her to go beyond just chatting, such as searching the web, setting recurrent tasks/reminders, utilizing your server's emotes/stickers, and memory options such as RAG and STM that allow her to remember context across channels and servers.


Screenshots 2

Complete Multimodal Input/Output

TomoriBot can process images, audio, and video sent directly in Discord and generate them in return using your own local model endpoints or through API keys, all of which are encrypted inside a persistent database. Ready-to-use ComfyUI workflows can be found in assets/comfyui-workflows/ and local audio inference servers in servers/!


Screenshots 3

Multi-Persona Support

TomoriBot's in-server personality, behavior, and avatar can be easily changed, created, as well as exported for others as Personas (akin to shareable AI Character Cards). Import and even transform your favorite SillyTavern cards through /persona generate. You can have an unlimited amount of different personas in a single server, each having their own memories and agendas. You can also orchestrate them to work with each other to do work in your server (or just mess around with each other).


Screenshots 4

200+ Native Commands for Configuration

Everything can be managed through Discord's native slash commands and interactive UI. Completely manage personas, prompts, tweak model parameters, set up MCP tool servers, adjust permissions, configure memory, set server member rate limits, and much more! You can also ask TomoriBot directly on what she can do and what her slash commands are. Currently, a Web Dashboard is in the works for even easier management.


Screenshots 6

SillyTavern Integration (Beta)

Use your favorite SillyTavern presets directly in Discord through TomoriBot which adjusts her prompt completely, just plop the .json right in through st-preset. Discord's new native checkbox groups for modals makes it easy to toggle nodes on and off like in SillyTavern. You can also import SillyTavern character cards directly through /persona import or you can modify them first with /persona generate.

Screenshots 5

Lots of More Features, and Counting!

A bunch of fun features that are easy to setup ranging from practical automatic greetings for new server members and cross-channel movement, to silly ones like user impersonations for some trolling. New ones are constantly in development, so please report through GitHub issues or the official Discord for any bugs (or to share any fun suggestions).

Useful Resources

Self-Hosting

Choose one install path:

  • A. Local Bun Setup (Recommended): requires Bun and either PostgreSQL or Docker for the database.
  • B. Docker Compose Setup: requires Docker only for running the bot/database, but host-side maintenance scripts still need host tooling.

The recommended path for most self-hosters is the local Bun setup wizard. bun run setup installs the locked dependencies first, so it works in a fresh clone. Its default Full Install path creates .env, generates a safe CRYPTO_SECRET, asks for your Discord bot token, configures PostgreSQL, then attempts the database and AI helper extras.

A. Local Bun Setup

  1. Clone the repository

    git clone https://github.com/Bredrumb/TomoriBot.git
    cd TomoriBot
    
  2. Run the setup wizard (more info at Setup Wizard guide)

    bun run setup
    
  3. Start TomoriBot

    bun run dev
    

Once you see TomoriBot up and running!, run /setup in Discord.

B. Docker Compose Setup

Docker Compose builds and runs TomoriBot plus PostgreSQL. It does not use the setup wizard.

Required .env variables for Docker Compose:

  • DISCORD_TOKEN - Your Discord bot token
  • CRYPTO_SECRET - 32-character encryption key
  • POSTGRES_PASSWORD - Database password (other DB settings are auto-configured)

For Docker Compose, start from .env.example, then add POSTGRES_PASSWORD if you have not already set it. Optional Docker or runtime tuning values can still be copied from .env.optional.example.

# Build and start TomoriBot and her database
docker compose up --build

For later starts, docker compose up is enough unless you changed code or dependencies.

C. Optional Local Servers

TomoriBot supports opt-in local servers alongside either setup path to enhance her tools and add local monitoring: SearXNG for web search, Crawl4AI for browser-rendered page fetches, and local TTS/STT voice servers.

With the local Bun setup (A), use bun run launch instead of bun run dev, example runs:

# With the SearXNG and Crawl4AI Docker containers
bun run launch --searxng --crawl4ai

# With a local TTS server after following the voice setup docs
bun run launch --qwen3tts
bun run launch --voxcpm2
bun run launch --cosyvoice3

# See all available flags
bun run launch --help

Available flags: --searxng, --crawl4ai, --qwen3tts, --chatterbox, --irodoritts, --voxcpm2, --fishs2, --cosyvoice3, --moss, --whisperx, --help

Ctrl+C stops the bot and any Python server processes. Docker containers (--searxng, --crawl4ai) are intentionally left running, stop them manually with docker stop searxng / docker stop crawl4ai when you're done.

With Docker Compose (B), local servers are opt-in via Compose profiles instead:

# + SearXNG web search (self-hosted metasearch)
docker compose --profile searxng up

# + Crawl4AI browser-rendered page fetching
docker compose --profile fetch-crawl4ai up

# + Both at once
docker compose --profile searxng --profile fetch-crawl4ai up

See the guides below for full setup details:

  • SearXNG Web Search - A self-hosted metasearch instance to bypass single-engine API limits for the web_search tool.
  • Crawl4AI - A browser-rendering server to fetch and process JavaScript-heavy webpages for the fetch_url tool.
  • Text-to-Speech / Speech-to-Text - Python voice servers for TomoriBot's voice messages; their venv must be set up once beforehand.

Updating TomoriBot

To update your self-hosted instance to the latest version, stop the bot first (so the backup and any migrations run against a quiet database), then run the backup-first updater:

bun run update

The command runs this sequence, stopping immediately if any step fails:

  1. bun run backup - takes a full database backup into /backups/ before touching any code. If the backup fails, the update aborts with your deployment completely unchanged.
  2. git pull --rebase --autostash
  3. bun install --frozen-lockfile

Then restart TomoriBot with bun run dev or bun run launch

Useful flags:

Flag Effect
--build Also runs bun run build after installing dependencies
--docker Docker Compose path: replaces step 3 with docker compose build + docker compose up -d
--skip-backup Skips the pre-update backup (not recommended)
--yes Skips the confirmation prompt before starting

See the full Maintenance Documentation for more details on all host-side scripts.

After Inviting / Setup

Basic Commands

  • /setup - Initial bot setup for your server
  • /config - Multiple ways to tweak TomoriBot
  • /personal memories - Manage your personal memories
  • /memories - Manage server memories, documents, and short-term memory
  • /moderation - Manage member access, user blacklist, channel, persona, and role restrictions

See the full Command Reference for every slash command.

Chat Interaction

Simply mention the bot in a server or use the configured trigger words to start a conversation:

@TomoriBot yo wassup

Or slide into TomoriBot's DMs and say hi!

Contributing

Contributions to TomoriBot are greatly appreciated! Please review the following resources before opening a pull request:

  • Contributing Documentation: Comprehensive step-by-step guides for adding slash commands, tools, event handlers, new AI providers, and locales.
  • Contributing Guidelines: Repository rules covering branching, quality gate checks, and the scope of contributions welcomed without prior discussion.

For users of the official hosted TomoriBot instance

These documents are also accessible within Discord using /legal terms-of-service and /legal privacy-policy commands.

For users self-hosting or using forks

You control your own data and are responsible for your deployment's compliance under the GNU Affero General Public License v3.0.

Official Website: https://tomoribot.app

Project Link: https://github.com/Bredrumb/TomoriBot

Email: bredrumb@gmail.com

Discord: Official Support Server

Support the Project

If you find TomoriBot helpful and want to support its ongoing development, consider leaving a ⭐ on GitHub or supporting via Ko-fi!

  Support on Ko-fi