AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 17, 2026, 04:00 JST

TomoriBot: several AI personas, one Discord bot, cascade_limit 3

Send on LINE
TomoriBot: several AI personas, one Discord bot, cascade_limit 3

3 Key Points

  1. What happened

    Bredrumb's TomoriBot houses multiple personas in one Discord bot process, verifying Webhook origin by registered Webhook ID instead of the sender name and scoping memory by persona_lineage_id.

  2. Why it matters

    Anyone in a channel can post under a persona's display name, so name-based routing would let an outside Webhook impersonate a persona; the identity check reportedly closes that gap.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The design targets a gap the author sees in current personal AI agents. Meta's Muse lets users adjust an agent's name, tone and personality and keeps long-term memory about the user, while the open-source OpenClaw writes persona and policy into a SOUL.md file and user information into USER.md and MEMORY.md. Both, the author notes, assume one agent facing one user. TomoriBot is built for a Discord server or DM where many people meet several personas, so the unit of memory becomes (user × persona) plus (server × persona).

Much of the engineering follows from that shift. Personal memories are read where the lineage matches the responding persona or is 0, the latter meaning the user's memories all personas may know; server memories are filtered by server and lineage without the lineage-0 allowance. The lineage-0 case is a remnant of a February 2026 migration (6727970) that moved memories from a single per-user array column into per-persona rows without deleting existing data. The author also recounts fixing a short-term cache key that omitted the persona ID, causing sisters in the same channel to briefly share short-term memory (788299b).

A trade-off comes with swapping persona instructions and memories each turn: per-turn prompts get lighter, but the LLM's prompt cache (reuse of a matching request prefix, whether in cloud APIs or local engines like llama.cpp and Ollama) is disrupted whenever the persona at the front of the prompt changes. One mitigation the author suggests is assigning a separate text model per persona via the Persona > Overrides setting, so frequently speaking personas stop evicting each other's cache.

FAQ
Why not just check the sender name on a Webhook message?
Because a Webhook message's sender name is just a string, and anyone with another Webhook in the same channel could post under a persona's name. TomoriBot checks whether the message's webhookId is a managed Webhook registered to that channel (or its parent thread) before matching the name to a persona.
How do personas keep their memories when moved to another server?
Memory is tied to a separate persona_lineage_id rather than the persona_id of a server's config row. Config rows can differ while sharing a lineage, so a character carries its memories across servers; imports can preserve an incoming lineage or fork a new one.
Can personas talk to each other indefinitely?
No. Only confirmed self-messages count toward the chain, tracked per channel, and the cascade_limit (default 3, settable from 0 to 10) stops automatic persona-to-persona replies; a real user message resets the counter.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTOKIUM to list on TSE Growth Market on 25th