Skip to navigation

redactions

Read and change the Redactions of your AI Agent. Text rules are regular expressions that remove personal data from conversations. Image rules set which documents in an image the AI Agent does not read. Output redactions keep the value of an API tool output away from the AI Agent, the logs, and the dashboard.

Commands

CommandWhat it does
redactions listLists the built-in rules and the custom rules, with their status and pattern.
redactions enable <key>Turns on a built-in rule.
redactions disable <key>Turns off a built-in rule.
redactions createCreates a custom rule from a key and a regular expression.
redactions delete <key>Deletes a custom rule.
redactions imagesShows the image classes and the message. It is the same as redactions images list.
redactions images listShows which image classes the AI Agent withholds, and the message it sends.
redactions images enable <class>Withholds an image class.
redactions images disable <class>Lets the AI Agent read an image class.
redactions images message set <text>Sets the message that the AI Agent sends when it withholds an image.
redactions images message clearRemoves the message. The AI Agent then uses its default reply.
redactions outputs listLists the output redactions, with the API tool and the output of each.
redactions outputs addRedacts one output of an API tool.
redactions outputs update <id>Changes an output redaction, or turns it on or off.
redactions outputs remove <id>Removes an output redaction. It asks you to confirm.

Examples

Turn on the built-in rule for phone numbers:

adacli acme redactions enable phone_number

Create a custom rule for account numbers:

adacli acme redactions create --key account_number --pattern 'ACC-\d{8}'

Let the AI Agent read government ID documents:

adacli acme redactions images disable government_id

Set the message that the AI Agent sends when it withholds an image:

adacli acme redactions images message set "For your security, I cannot read this image."

Redact the token output of the API tool “Get account”:

adacli acme redactions outputs add --name "Account token" --action "Get account" --action-output token

Details

  • You need the Admin or Owner role to change redaction rules.
  • The built-in rules are credit_card_number, phone_number, sin, ssn, and email. enable and disable work on built-in rules only.
  • The image classes that you can change are government_id and other_credential. The AI Agent always withholds payment cards.
  • The image message is one line of 500 characters or less. It cannot contain < or >.
  • An output redaction works only when it is active. outputs add creates an active redaction. Add --no-active to create it turned off.
  • --action and --action-output take an ID or a name. To see the output IDs of an API tool, run api-tools get <id> --json.
  • A redaction matches the output by its ID. A copy of an API tool keeps the output IDs, so one redaction covers the API tool and its copy.
  • A change that stops a redaction asks you to confirm. Add --yes to confirm.

For every option of a command, run it with --help, for example adacli acme redactions create --help.

  • variables: set which variables are sensitive.
  • conversations: read conversations to check a rule.
  • snapshot: export the redaction rules with the rest of the configuration.