AI Agent Filters
AI Agent Filters
AI Agent Filters allow Administrators to define custom input filters for AI agents in their organization. When a user's message to an agent contains a configured phrase, the filter automatically takes the configured action (ending the session, sending a canned response, or routing to a Guided Conversation) before the message ever reaches the AI.
AI Agent Filters are built on top of Capacity's System Enforced AI Guardrails framework and apply globally across all agents in the organization.
Accessing AI Agent Filters
AI Agent Filters are managed from Settings ā AI ā AI Agent Filters. This page displays a table of all filters configured for your organization, including each filter's name, configured action, and whether it is currently enabled.
From this page you can:
- Click Add in the top-right corner to create a new filter.
- Click any existing filter row to open it and make edits.
- Toggle a filter on or off directly from the list without opening it.
Creating or Editing a Filter
Clicking Add or selecting an existing filter opens the filter detail page. This is the same page for both creating and editing a filter.
The filter detail page includes the following fields:
Filter Name
A label to identify this filter in the filters list. Choose something descriptive that makes the filter's purpose clear at a glance (for example, "Discount Requests" or "Competitor Mentions").
Filtered Phrases
One or more phrases to watch for in user messages. When a user's message contains any of the configured phrases, the filter triggers. Matching is case-insensitive.
For example, if the filtered phrase is give me a discount:
- "give me a discount please" - triggers the filter
- "these prices are too high, give me a discount" - triggers the filter
- "what are your prices?" - does not trigger the filter
Note: Each phrase must be unique across all filters in your organization. If you try to save a phrase that is already used by another filter, you will see an inline validation error.
Action
The action that fires when the filter is triggered. Select one of the following options from the dropdown:
- End Conversation Session: The agent sends a configurable message and then terminates the session. You will be prompted to enter the message the agent should send before ending the conversation. This is the default action.
- Canned Response: The agent replies with a configurable phrase, but the conversation continues. You will be prompted to enter the phrase the agent should say. Use this when you want to redirect the user without ending the session.
- Route to a Guided Conversation: The conversation is handed off to a Guided Conversation of your choice. A search field will appear so you can find and select the target Guided Conversation.
Enforcement Scope
At this time, all filters are set to Globally Enforced, meaning the filter applies across all agents in your organization. Per-agent scoping will be available in a future update.
Saving and Deleting Filters
Click Save at the bottom of the detail page to create or update a filter. To delete a filter, open it and select Delete from the triple-ellipsis (āÆ) menu in the top-right corner of the page.
How Filters Work During a Conversation
When a user sends a message to an AI agent, Capacity checks the message against all active filters for your organization before passing it to the AI. If the message contains a filtered phrase, the configured action fires immediately and no LLM call is made for that message.
Filters check for contains matches, so a phrase will trigger even if it appears as part of a longer message. Matching is not dependent on the exact position or surrounding words.
Trigger Ceiling
To prevent users from repeatedly attempting to get around a filter, Capacity enforces a trigger ceiling of 3 refusals per conversation. If End Conversation Session or Route to a Guided Conversation actions are triggered 3 times within a single conversation, the session automatically ends.
Note: Canned Response matches do not count toward the trigger ceiling, since those represent a configured product response rather than a refusal. The ceiling resets when the user starts a new conversation.
Tips for Writing Effective Filter Phrases
- Keep phrases specific. Broader phrases may catch unintended messages. For example, "discount" alone would match many general pricing questions, while "give me a discount" is more targeted.
- Use one phrase per concept. Since matching is phrase-level, you can add multiple phrases to a single filter to cover variations of the same topic (for example, "give me a discount" and "lower your price").
- Plan your action carefully. If you want the conversation to continue after a match, use Canned Response. If the topic should end the interaction entirely, use End Conversation Session.
