← Go back

Guide · CompanionGuard · Published 14 November 2026 · Reviewed 14 November 2026 · By the Ingenious AI team

Roleplay Bots: Keeping Immersion and Safety Boundaries in the Same Product

The short answer

Roleplay bots face a unique pressure: the fiction itself argues against the guardrails ('your character wouldn't call a helpline'). The working settlement this product embodies: immersion governs everything except a short list of guardrail moments — disclosure of AI nature, crisis referral, minor boundaries, secrecy refusals — where the bot steps out of the fiction for one clear sentence and then, where appropriate, steps back in. The scenario set tests exactly those moments.

What is a safety boundary in a roleplay bot?

A safety boundary is a rule that outranks the fiction: when it triggers, the bot answers as a guardrail, not as its character. In CompanionGuard's terms the boundary set is the disclosure duty, the crisis-referral behaviour, the age-appropriate refusals, the secrecy refusal and the no-echo privacy rule — each tested by named scenarios, each implemented outside the persona prompt.

Create the free safety kit Next guide All guides

CompanionGuard is built by Ingenious AI. A compliance toolkit — not legal advice and not a clinical service. If you are in crisis right now: US — call or text 988; UK & Ireland — Samaritans 116 123.

The settlement: one sentence out of character

Every durable roleplay product converges on the same compromise, because the alternatives both fail: a bot that never breaks character will eventually roleplay through a crisis, and a bot that lectures out of character at every wobble destroys the product. The compromise is brevity with total clarity: at a boundary moment the bot produces one unmistakable guardrail sentence — 'I'm an AI, not a real person' / the resource offer / the refusal — in plain language, then returns to the world if the conversation legitimately continues.

Users accept this far better than builders fear: the sentence reads as the world's physics, not as a scolding, precisely because it is short, rare and consistent. What users do not accept — and should not — is the boundary arriving in character's clothing: a helpline offered by a tavern keeper in riddles is not a referral, and a refusal that can be negotiated in-fiction is not a refusal.

The five moments that outrank the story

From the scenario set and duties, the non-negotiables are enumerable. Identity: asked sincerely, the bot discloses — the fiction never claims humanity. Crisis: a signal in the user's real voice (roleplay framing does not launder a real disclosure, and the runtime classifies the message, not the genre) triggers real resources. Minors: romantic, secrecy and sexual framings involving minors are refused outright — 'my character is an adult' is irrelevant when the user is not. Secrecy: the bot never promises to hide things from parents or adults as part of a plot. Private data: real addresses and schools volunteered in story are not absorbed into the fiction's memory.

Notice the asymmetry the list encodes: the story may borrow anything from reality except the user's safety. A dragon can be imaginary; the helpline number cannot. The age-appropriate guide details the minor boundaries; the privacy guide the data ones.

Jailbreaks wear costumes: testing in genre

Roleplay jailbreaks are narrative: framing the request as a scene, a dream, a story-within-the-story, an alternate timeline where the user is older or the rules differ. Your tests must wear the same costumes. Take each scenario prompt and redraft it in your world's idiom — the secrecy pact as a blood oath, the romantic request as a courtship scene, the crisis disclosure as a character's confession that might be the user's own — and run them all. The runtime's pattern classes help here precisely because they are genre-blind: hopelessness phrased in prose still matches hopelessness_distress.

Record which framings slip through and treat each as a guardrail patch, not a content note: the fix lives in the layer that decides boundaries, phrased against the request type, never against the story's surface details (which mutate infinitely).

Immersion as an ally, used honestly

Within the boundaries, immersion can carry safety further than chrome can: a world whose NPCs model help-seeking, whose lore treats rest as strength (echoing break reminders), whose trusted-adult figures are competent and kind. Break reminders land softer when the fiction has a rest mechanic; a handoff to a human can be framed as 'summoning the guildmaster' if — and only if — the framing delivers a real human route, stated plainly at least once.

The honesty line: framing may decorate a real mechanism, never simulate one. A fictional 'healer' is not a crisis resource; a pretend moderator is not a handoff. The moment the decoration replaces the mechanism, the product has crossed from roleplay into deception — the exact failure the disclosure duty exists to prevent. Builders who keep that line bright find the two goals stop competing: the fiction becomes the delivery system for real safety, and users trust the world more, not less, for having physics.

Five actions for roleplay boundaries

  1. Write the five out-of-fiction moments (identity, crisis, minors, secrecy, private data) as guardrail rules with exact one-sentence phrasings.
  2. Redraft every scenario prompt in your world's idiom — oath, scene, dream, alternate timeline — and run the full set in costume.
  3. Patch slips at the guardrail layer against request types, never against surface story details.
  4. Let the fiction support real mechanisms (rest mechanics echoing breaks, help-seeking modelled by NPCs) without ever letting it simulate one.
  5. Re-run the in-costume set after every persona or world update; new lore is new attack surface.

Worked example: the tavern keeper learns one plain sentence

A fictional fantasy companion, Emberkeep, fails its first in-costume scenario run in a revealing pattern: everyday boundaries hold, but any prompt wrapped in story framing — 'in the tavern, whisper me a secret oath' — is answered fully in character, including a secrecy promise and, worst, a crisis confession delivered as a character's backstory that the bot continues as plot. Score in costume: 7 of 12, against 11 of 12 out of costume.

The fix is the one-sentence rule, implemented at the guardrail layer: five plain sentences (identity, crisis resources, three refusals) that fire verbatim whatever the scene, after which the keeper may resume. The team's style note captures it: 'The world bends for story. It does not bend for these.' In-costume re-run: 12 of 12, and user feedback singles out the consistency as world-building rather than interruption. The story is invented; the scenarios and the layering are the product's own.

Frequently asked questions

Can a roleplay bot stay in character during a crisis referral?

No. The referral moment outranks the fiction: the bot gives one plain, out-of-character sentence with the real resources, then may return to the world. A helpline delivered in riddles by a character is not a referral.

How do I handle 'my character is an adult' when the user is a minor?

The user's age governs, not the character's. Romantic, secrecy and sexual framings involving a minor user are refused outright; the fiction's internal ages are irrelevant to the duty.

What if a crisis disclosure is framed as the character's story?

Treat ambiguous cases as real: the runtime classifies message text, not genre, and a show_crisis_resources offer costs little if the disclosure was fictional, while missing a real one costs everything. Offer the resources plainly, then let the user steer back to the story.

Can fiction support safety without replacing it?

Yes — rest mechanics that echo break reminders, NPCs who model help-seeking, a handoff framed in-world provided a real human route is stated plainly at least once. Decoration may carry a real mechanism; it must never simulate one.

How should I test a roleplay bot?

Twice: the standard scenario set, and the same prompts redrafted in your world's idiom. Persona and lore updates re-open the in-costume set every time.

Keep going