/iblai-vibe:iblai-vibe-agent-privacyfrom ibl.ai vibe
Adds an agent Privacy tab with PII/PHI filtering (allow, redact, mask, block) and Incognito mode controls (Users Decide, Always, Never). Activates when users mention PII, redaction, incognito, or conversation privacy.
Ships in ibl.ai vibe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Add the agent Privacy tab -- "Control what personal information the
agent sees and how Incognito works for its conversations." Scope: per
agent. Every control saves at once to the agent's settings, so it applies
to everyone who chats with the agent. The tab opens with a gray info box
(privacy-info-box): "Decide how private conversations with this agent
are. PII Filtering looks for personal details, like names, emails and phone
numbers. PHI Filtering looks for health details, like conditions and
medications. Incognito keeps chats out of history." Below it, two sub-tabs
behind one pill switcher:
This is one tab in the agent-settings family indexed by /iblai-vibe-agent;
it shares the AgentSettingsProvider wrapper with every other tab (optional
for this tab — identity can be passed as props).
Filtering off -- each card's switch turns its kind of filtering on (the first one on also turns the Privacy Router on). The status line is a full sentence with no "On." or "Off." in front, since the switch shows that. Off, it says what reaches the AI: "Names, emails, phone numbers and other personal details reach the AI just as people type them." An opened card that is off shows only a hint: "Turn it on to look for personal details in messages and choose what happens to them."

On, with Redact -- the status line says what happens to which details: "Names, emails, phone numbers and other personal details are replaced with a label before the AI sees them.", or "Only the personal details you picked (3 kinds) are …" when entity types are picked. When PII Is Detected picks the action (the line under it explains it), Entity Types picks what to detect (none selected means the defaults), and Also Filter AI Responses checks the agent's replies too.

Actions -- Allow (detect and log, leave the message unchanged),
Redact (replace with the type, e.g. [EMAIL_ADDRESS]), Mask (replace
with asterisks), Block (reject the message).

Block -- adds PII Block Message, the text the user sees instead of an answer. It saves when the field loses focus.

Incognito -- the three cards, offered only when the organization allows it (Prerequisites).

Common setup (brand, conventions, env files, verification): see docs/skill-setup.md.
Incognito is one feature with four tiers; this tab is the agent
tier. /iblai-vibe-incognito explains how they resolve and mounts the
in-chat toggle.
/iblai-vibe-incognito — the chat-header Incognito toggle and
its "Enable Incognito for this chat?" dialog, plus the tier order./iblai-vibe-profile — the user's own Privacy tab: their
default (Normal / Anonymized / Incognito)./iblai-vibe-account — organization settings → Advanced →
"Allow users to control chat privacy", the gate that makes the
Incognito sub-tab (and the toggle) exist at all./iblai-vibe-auth, or vibe-starter).AgentSettingsProvider wraps the route (/iblai-vibe-agent §1), or pass
tenantKey / mentorId / username as props.@iblai/iblai-js@^3.6.0 (resolves @iblai/web-containers 2.6.0). Check with
pnpm why @iblai/web-containers.allow_user_chat_privacy_control). With
the gate off there is no Incognito to govern: below the info box the
tab shows the Privacy Filtering content (both cards and Also
Filter AI Responses) on its own, with no sub-tab switcher.Look for iblai.env in the project root with PLATFORM, DOMAIN, and
TOKEN. If it is missing, tell the user:
"You need an iblai.env with your platform configuration. Download the
template and fill in your values:
curl -o iblai.env https://raw.githubusercontent.com/iblai/vibe/refs/heads/main/iblai.env"
AgentPrivacyTab// app/(app)/agents/[mentorId]/privacy/page.tsx
"use client";
import { AgentPrivacyTab } from "@iblai/iblai-js/web-containers/next";
export default function AgentPrivacyPage() {
return (
<div className="flex h-full flex-col bg-white">
<AgentPrivacyTab />
</div>
);
}
The tab reads tenantKey, mentorId, username, enableRBAC and
executeGatedAction from AgentSettingsProvider, loads the agent settings
and the organization's chat-privacy gate, and decides which sub-tabs to offer
(see Which sub-tabs appear below). Each can be passed as a prop instead,
for example to mount the tab outside the provider:
import { AgentPrivacyTab } from "@iblai/iblai-js/web-containers/next";
export function PrivacyPanel(props: { org: string; agentId: string; username: string }) {
return (
<AgentPrivacyTab tenantKey={props.org} mentorId={props.agentId} username={props.username} />
);
}
With enableRBAC on, each control follows the agent's field permissions
(enable_privacy_router, filter_pii, privacy_action,
privacy_response, privacy_entities, filter_phi, phi_action,
phi_response, phi_entities, enable_privacy_output_filter,
disable_chathistory, disable_privacy_mode) and is disabled when the user
may not edit it.
executeGatedAction wraps every save, so the host can put a paywall or
confirmation in front of it.
The tab renders with the default agent-facing copy
(AGENT_PRIVACY_TAB_LABELS, localized through the SDK's i18n). Pass a
partial labels object to change any string:
import { AgentPrivacyTab } from "@iblai/iblai-js/web-containers/next";
<AgentPrivacyTab
labels={{
header: { title: "Data privacy", description: "Filter PII; decide how Incognito works." },
subTabs: { filtering: "Personal data", incognito: "Incognito" },
fields: { action: { options: { allow: "Log only" } } },
incognito: {
options: { always: { title: "Always private", description: "Nothing is ever saved." } },
},
}}
/>;
Label groups (PrivacyTabLabels): header (title, description),
infoBox (optional; infoBox: "" hides the box), categories (pii and
phi, each title, expand, offHint, summary, whose all and
selected receive the action's key: redact, mask, block or allow),
switchState (on, off), groups (action, entityTypes,
aiResponses, privacyLog), fields -- action (label, tooltip,
options and descriptions per action), blockMessage (label,
placeholder), entities (tooltip, emptyHint, labels per entity
type), outputFilter (label, description) -- phiFields (action,
blockMessage, entities), privacyLog (description), subTabs
(filtering, incognito), incognito (description, groupAriaLabel,
options per card), noAccess, and toasts (updateSuccess,
updateError).
get_component_info("AgentPrivacyTab")
get_component_info("AgentSettingsProvider")
get_component_info("ChatPrivacyToggle")
<AgentPrivacyTab> PropsImport from @iblai/iblai-js/web-containers/next.
| Prop | Type | Required | Description |
|---|---|---|---|
labels | DeepPartial<PrivacyTabLabels> | No | Override user-visible strings |
tenantKey | string | No | Organization key; defaults to AgentSettingsProvider |
mentorId | string | No | Agent UUID; defaults to AgentSettingsProvider |
username | string | No | Signed-in username; defaults to AgentSettingsProvider |
enableRBAC | boolean | No | Follow the agent's field permissions; defaults to the provider, else false |
executeGatedAction | (fn: () => unknown) => unknown | No | Wrap every save (paywall, confirmation); defaults to the provider |
rbacPermissions | object | No | Gates View Privacy Log (/mentors/{mentor_id}/#view_privacy_flags); defaults to the provider |
PII Filtering and PHI Filtering cards (privacy-pii-card,
privacy-phi-card). Each header has a chevron that opens the card, the
title, a status line and a switch (privacy-filter-pii-toggle,
privacy-filter-phi-toggle). Turning one on while both are off turns the
Privacy Router on for that kind only; turning the last one off turns the
router off. An open card that is off shows only its hint.
The status line (privacy-pii-summary, privacy-phi-summary) is a
full sentence. For PII: off, "Names, emails, phone numbers and other
personal details reach the AI just as people type them."; on, "Names,
emails, phone numbers and other personal details are …", or "Only the
personal details you picked (2 kinds) are …" when entity types are picked.
The sentence ends with what the action does: Redact "replaced with a label
before the AI sees them", Mask "hidden behind asterisks", Block "caught,
and the message is stopped before it reaches the AI", Allow "noticed, but
still reach the AI as written". The PHI card says the same of
"Conditions, medications, medical record numbers and other health
details".
When PII Is Detected — a select with an inline description of the chosen action:
| Action | Wire value | What happens |
|---|---|---|
| Allow | allow | Detected but left untouched — the message passes through unchanged. For monitoring or auditing without altering messages |
| Redact (default) | redact | Replaced with its type — e.g. Email [EMAIL_ADDRESS] |
| Mask | mask | Hidden behind asterisks — e.g. Email *********** |
| Block | block | The message is rejected and your block message is shown |
PII Block Message — a textarea shown only for Block; saves on blur.
Entity Types — the 13 chips, multi-select. With none selected the hint reads "Using defaults."
The PHI card has the same three controls: When PHI Is Detected (default Allow), PHI Block Message, and 12 chips (Condition, Medication, Treatment, …); with none selected it looks for all 12.
Also Filter AI Responses — "Check the agent's replies for PII and PHI too. May slightly slow down replies."
View Privacy Log — opens the log of what was detected, for a user
whose rbacPermissions hold /mentors/{mentor_id}/#view_privacy_flags.
"Incognito keeps a conversation out of chat history and memory. Choose how it works for this agent." Three radio cards:
| Card | Flags saved | Effect in the chat header |
|---|---|---|
| Users Decide | disable_chathistory: false, disable_privacy_mode: false | Users can turn Incognito on for any conversation; otherwise chats are saved as usual |
| Always Incognito | disable_chathistory: true | Every conversation is incognito, for anyone. The Incognito pill shows locked on |
| Never Incognito | disable_privacy_mode: true | Incognito isn't available for this agent; the toggle disappears. Users whose profile default is Incognito are saved anonymously instead |
One control writes both flags in the same PUT, so the contradictory
"always and never" pair cannot be configured from here. A record that
still carries both (older data) behaves as Always Incognito: the
backend checks disable_chathistory first, answers mode: disabled,
source: mentor, and writes no history — even though the tab displays
it as Never Incognito. Choosing any card rewrites both flags and clears
the mismatch.
| Condition | Result |
|---|---|
Organization gate allow_user_chat_privacy_control off | Incognito sub-tab not offered |
enableRBAC and no filtering field (PII, PHI or output filter) is readable (permissions.field) | Privacy Filtering not offered |
enableRBAC and either Incognito flag is unreadable | Incognito not offered |
| Only one sub-tab offered | It renders on its own, with no switcher (no privacy-sub-tab-* triggers) |
| Nothing readable | The tab shows a single notice: "You don't have permission to view this agent's privacy settings." |
Members typically see Incognito read-only and no Privacy Filtering. Writes stay per control: a field the user may read but not write renders disabled.
Read with GET and written with PUT on
${dmUrl}/api/ai-mentor/orgs/{org}/users/{username}/mentors/{mentor_unique_id}/settings/
(a partial update — send only what changes):
| Field | Type | Sub-tab |
|---|---|---|
enable_privacy_router | boolean | Privacy Filtering — on while either card is on |
filter_pii, filter_phi | boolean | Privacy Filtering — each card's switch (with the router) |
privacy_action, phi_action | "allow" | "redact" | "mask" | "block" | Privacy Filtering |
privacy_response, phi_response | string | Privacy Filtering — the block messages |
privacy_entities, phi_entities | string[] (PERSON, EMAIL_ADDRESS, …; MEDICATION, …) — [] means defaults (all 12 for PHI) | Privacy Filtering |
enable_privacy_output_filter | boolean | Privacy Filtering |
disable_chathistory | boolean | Incognito — Always |
disable_privacy_mode | boolean | null (null = off on older records) | Incognito — Never |
From @iblai/iblai-js/web-containers/next:
AGENT_PRIVACY_TAB_LABELS -- the default label bundle.AgentPrivacyTabProps, PrivacyTabLabels -- types.From @iblai/iblai-js/web-containers: ChatPrivacyToggle -- the chat-header
toggle that reacts to the Incognito policy (/iblai-vibe-incognito).
From @iblai/iblai-js/data-layer:
PRIVACY_ACTIONS (allow, redact, mask, block),
PRIVACY_ENTITY_TYPES (PERSON, EMAIL_ADDRESS, PHONE_NUMBER, US_SSN,
CREDIT_CARD, LOCATION, DATE_TIME, US_PASSPORT, US_DRIVER_LICENSE,
IP_ADDRESS, IBAN_CODE, MEDICAL_LICENSE, US_BANK_NUMBER),
DEFAULT_PRIVACY_ACTION, DEFAULT_PRIVACY_RESPONSE, and the
PrivacyAction / PrivacyEntityType types.PHI_ENTITY_TYPES (DISEASE_DISORDER, MEDICATION,
THERAPEUTIC_PROCEDURE, BIOLOGICAL_STRUCTURE, CLINICAL_EVENT,
BIOLOGICAL_ATTRIBUTE, HISTORY, FAMILY_HISTORY, MEDICAL_RECORD_NUMBER,
HEALTH_PLAN_BENEFICIARY_NUMBER, ACCOUNT_NUMBER, DEVICE_SERIAL_NUMBER),
DEFAULT_PHI_ACTION (allow), and the PhiEntityType type -- the PHI
card's counterparts.isPrivacyBlockedError, PRIVACY_BLOCKED_ERROR_KIND -- recognise the
privacy_blocked error a Block action sends over the chat stream, to
style it apart from a moderation block.MentorChatPrivacyPublicSettings -- disable_privacy_mode as members read
it from the agent's public settings.| Hook | Purpose |
|---|---|
useGetMentorSettingsQuery | Current privacy fields and field permissions |
useEditMentorJsonMutation | Save a change (JSON, so privacy_entities stays an array) |
useGetTenantChatPrivacyConfigQuery | The organization gate the Incognito sub-tab depends on |
REST twin: /iblai-api-agent-privacy
(also the privacy-flags audit log of every detection, which View
Privacy Log opens).
Run /iblai-vibe-ops-test before telling the user the work is ready, and give
every page, control and state this skill added its own checkpoint — one Playwright
test titled <ID> · … in e2e/journeys/, listed in e2e/coverage.json;
pnpm e2e:coverage must pass:
pnpm build -- must pass with zero errors.pnpm test -- vitest must pass./agents/<uuid>/privacy in the browser as /iblai-vibe-ops-test says,
signed in as an org admin: the info box shows; turn PII Filtering on and read
its status line; pick Block -- the PII Block Message field appears; pick
each Incognito card; read the console; check the phone width.Stable selectors: privacy-info-box, privacy-sub-tab-filtering,
privacy-sub-tab-incognito, privacy-filter-{pii|phi}-toggle,
privacy-{pii|phi}-summary, privacy-{pii|phi}-expand,
privacy-output-filter-toggle, privacy-incognito-{users|always|never}
(with aria-pressed), privacy-no-access.
privacy-flags
audit log; only the message is left alone./settings/ mutation (useEditMentorJsonMutation), not the
multipart variant, so privacy_entities round-trips cleanly. The tab
refetches agent settings after each save because that mutation does
not invalidate the settings cache tag.ChatPrivacyEffective and the agent's
mentorPublicSettings caches, so an open chat's Incognito pill locks,
unlocks or disappears without a reload. Custom UI writing the two
flags must do the same.AgentSettingsProvider once at the layout
level (/iblai-vibe-agent §1); do not wrap each tab.sonner and @iblai/iblai-web-mentor
(pnpm add sonner @iblai/iblai-web-mentor).iblai-vibe-agent-privacy-1-off.png (opens in a new tab)iblai-vibe-agent-privacy-3-actions.png (opens in a new tab)iblai-vibe-agent-privacy-4-block.png (opens in a new tab)iblai-vibe-agent-privacy-block.png (opens in a new tab)iblai-vibe-agent-privacy-disabled.png (opens in a new tab)iblai-vibe-agent-privacy-incognito.png (opens in a new tab)iblai-vibe-agent-privacy-mask.png (opens in a new tab)iblai-vibe-agent-privacy-redact.png (opens in a new tab)iblai-vibe-agent-privacy.png (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub iblai/base --plugin iblai-vibe166 skills in this plugin
/iblai-api-agent-accessManage role-based access to an ibl.ai agent via the platform API — list role policies, search users/groups, and grant/revoke editor, chat, or analytics_viewer roles for users, groups, and emails. Use when controlling who can edit, chat with, or view analytics for an agent./iblai-api-agent-auditRead an ibl.ai agent's audit log via the platform API — a who-changed-what trail filterable by action, actor email, and date range. Read-only. Use when investigating configuration changes to an agent./iblai-api-agent-chatSet up live chat with a deployed ibl.ai agent by wiring the hosted iblai-api-agent-chat MCP server into the project (.mcp.json / claude mcp add) using the .env Api-Token and a chosen agent's unique id, or by signing in from claude.ai, ChatGPT or Claude Desktop with only the URL. Use to enable runtime conversations with an agent, and to list or disconnect the apps a user has connected. The actual chatting then happens through the MCP server's tools.Other plugins' skills for the same job