Skip to main content
Go to Build > Guardrails. The Auto protection tab holds two cards: Rate limit and Spam detection. Each card has its own Save button, so save after editing one before moving to the other.
Guardrails here are about protecting your agent from abuse. To set behavioral rules the agent must follow in its replies, such as topics to avoid, use the Guardrails section of the instructions editor instead. See Instructions.

Rate limit

Use Rate limit to cap how many messages one device can send to your agent through any channel over a chosen time period. Set Limit to N messages every N seconds, then write the Message to show when limit is hit. Users who exceed the limit see this message instead of a reply until the window resets. Image

Spam detection

Use Spam detection to have Chatbase automatically check conversations for spam. When spam is detected, the conversation is paused and the agent stops replying to it. You can also pause conversations manually from the chat logs. Turn the toggle on to enable it. The check runs after the 2nd, 4th, 8th, and 16th user message in a conversation, so it catches abuse early without abusing your credits. Image Here is how a paused conversation from spam detection looks: Image

Defining what counts as spam

The What counts as spam for this agent field holds the instructions the spam checker follows, up to 2,000 characters. Chatbase provides a default that flags:
  • Profanity, such as vulgar, obscene, insulting, or sexually explicit words or slang, in any language.
  • Spam, such as unsolicited commercial promotions, scams, repetitive gibberish, random keyboard mashing, or emoji-only messages.
Edit the text to fit your use case. For example, you might loosen the profanity rule for a casual brand, or add patterns you see often, such as competitor promotions or repeated links. Be specific about what should and should not be flagged, since anything the checker considers spam pauses the conversation for that user.
Start with the default definition and adjust it after reviewing paused conversations in Activity. Too broad a definition can pause legitimate users who are simply frustrated.