Setting Up AI Guardrails
AI Guardrails let Knowledge Agent owners add safety controls to how an agent handles user inputs. Guardrails screen every input before it reaches the agent — across web chat, the search bar, the API, and Slack — so potentially harmful or off-topic queries are blocked at the door.
Two guardrail types are available: Jailbreak Detection and the Custom Input Prompt Guardrail. Both are configured per Knowledge Agent, managed by the agent's owner, and are off by default.
Access RequiredYou must be a Knowledge Agent Owner or relevant custom role to configure guardrails.
To access guardrails, open your Knowledge Agent's settings and go to the Guardrails section. The Guardrails section also includes chat thread retention, which controls how long Guru keeps the chat threads on your agent. Learn more in Setting chat thread retention.
Jailbreak Detection
Jailbreak Detection screens user inputs for adversarial prompting — attempts to manipulate or override your agent's behavior. When enabled, every input is evaluated before it reaches the agent.
- Enable it. Toggle Jailbreak Detection on in the Guardrails section of your Knowledge Agent settings.
- On pass. The input is forwarded to the agent and processed normally. The user sees no difference.
- On fail. The input is blocked and the user receives a generic error message. The error is intentionally vague so bad actors can't use it to refine their approach. Jailbreak Detection applies to all users on all channels — there's no per-user exception.
Note.
If the detection service is temporarily unavailable, the system fails open — the input is assumed safe and processed normally.
Custom Input Prompt Guardrail
The Custom Input Prompt Guardrail lets you define your own rules for what inputs your agent should accept. You write a plain-language rule describing what an input must (or must not) do, set how strictly it's enforced, and define the message a user sees when their input is blocked.
- In your Knowledge Agent settings, go to the Guardrails section.
- Click Add Rule under the Custom Input Prompt Guardrail.
- Give the rule a name.
- Write a moderation prompt — a plain-language description of what inputs should be allowed or blocked. For example: "This agent should only handle questions related to banking operations" or "Does this query ask the user to compare our product to a competitor?"
- Set the confidence threshold to Low, Medium, or High. A higher setting requires greater confidence that the input matches your rule before it's allowed through — stricter settings block more aggressively.
- Write a custom error message that users will see when their input is blocked.
- Toggle the rule on. You can add multiple rules to a single agent. Each rule has its own name, moderation prompt, confidence threshold, and custom error message, and each can be toggled on or off independently.
Like Jailbreak Detection, Custom Input Prompt Guardrail rules apply to all users on all channels — web chat, search bar, API, and Slack.
TipStart with a Medium confidence threshold and adjust based on how your users interact with the agent. Lower thresholds allow more inputs through; higher thresholds block more aggressively.
Setting chat thread retention
Chat thread retention controls how long Guru keeps the chat threads on a Knowledge Agent before it deletes them. If your organization has data retention requirements, this setting helps you meet them. Conversations can include customer details or other sensitive information, and you decide how long it sticks around.
Retention is set per Knowledge Agent. An agent that supports customer-facing teams can use a short window while your other agents keep the default. The setting applies to every chat thread on that agent, no matter who started it or where.
Every agent starts at 90 days, counted from the last message. Nothing changes for an agent until its owner changes the setting. Threads that aren't tied to a Knowledge Agent also stay on the 90-day default.
Set chat thread retention
- Open your Knowledge Agent's settings and go to the Guardrails section.
- Find the chat thread retention controls. [MISSING INFORMATION ABOUT the exact heading of the retention controls inside the Guardrails section]
- In Retention days, enter a number from 1 to 90.
- Click Save.
- Under Count days from, choose when the clock starts.
Choose when the clock starts
- When the last message is sent. Guru deletes a thread after it sits idle for the number of days you set. A thread that keeps getting used stays. This is the default.
- When the thread is created. Guru deletes a thread that many days after it started, even if someone posted in it yesterday. Choose this option when no thread should outlive your retention window.
NoteCount days from saves as soon as you select an option. You don't need to click Save for that one.
ImportantDeleted threads are removed permanently, along with everything attached to them. Guru can't recover them. If you lower the number of days or switch to When the thread is created, Guru deletes every thread on that agent that's already past the new window during the next daily cleanup. Double-check your settings before you save.
TipStart with one customer-facing agent. Once you've confirmed it works the way you expect, update your other agents.
Frequently asked questions about AI Guardrails
Are guardrails on by default? No. Every guardrail is opt-in and off by default. They're configured per Knowledge Agent by the agent owner.
Which channels do guardrails apply to? All of them — web chat, the search bar, the API, and the Slack bot. When a guardrail is enabled, it evaluates every input regardless of channel or user.
What does a user see when their input is blocked? It depends on the guardrail. Jailbreak Detection returns a generic error on purpose, so the detection can't be reverse-engineered. The Custom Input Prompt Guardrail returns the specific custom error message the agent owner wrote for that rule.
Can I create more than one Custom Input Prompt rule? Yes. You can add multiple rules on a single agent, each with its own name, moderation prompt, confidence threshold, and custom error message. Each rule can be toggled on or off independently.
What does the confidence threshold do? Each Custom Input Prompt rule has a Low, Medium, or High setting that controls how confident the model must be that an input matches the rule before it's allowed to pass. A stricter setting blocks more aggressively.
What happens if the jailbreak detection service is down? It fails open — if the detection service is unavailable, the input is assumed safe and processed normally.
Can admins see a log of blocked inputs? Not at this time. Audit and logging visibility for blocked inputs is not part of this release.
Is chat thread retention a hard limit? It depends on the option you choose. When the last message is sent deletes a thread after that many days with no new messages. When the thread is created is a hard limit. Guru deletes the thread that many days after it started, even if people are still using it.
Can I recover a deleted thread? No. Deletion is permanent, and there's no trash or restore.
What happens to existing threads when I lower the number of days? Guru deletes every thread on that agent that's already past the new window during the next daily cleanup. The same applies when you switch to When the thread is created.
Can I keep threads longer than 90 days? No. 90 days is both the default and the maximum.
Why can't I enter 0? Zero days would delete every thread on the agent, including ones people are using right now. Retention days must be between 1 and 90.
Can I set one retention period for my whole workspace? Not at this time. Retention is set per Knowledge Agent.
Can I delete one specific chat on demand? Not with this setting. Retention works as a rolling window. To remove a specific chat, contact us by clicking Contact Guru Support under ? in the web app or by emailing [email protected].
Does chat thread retention use credits? No. It's a scheduled cleanup, not AI work.
Updated 14 days ago
