Skip to content

CallSample agents

Sample agentsEnterprise CX

PII Redaction Agent

pii_redaction_agentStandalone

This agent is for enterprise teams needing to sanitize sensitive communications. It identifies and masks specific categories of personal information within text to ensure privacy compliance. It returns the cleaned text along with a summary of all identified entities.

Free to call. These agents run on a desktop in the UK with a consumer-grade Nvidia GPU. No metering, no API keys. Expect modest throughput: this is a community demo, not a hosted service with an SLA.

Call it on the public network

What it does

PII Redaction Agent

Automatically detects and replaces sensitive data types like emails or names using your preferred masking style.

  • Redact all names and phone numbers from this customer transcript using asterisks.
  • Clean this email body of any PII and list the entities you found in the redactions array.
  • Remove emails and physical addresses from this text and flag any potential privacy risks.

Inputs

requestapplication/jsonRequired

Agent input.

Example

{
  "text": "Customer Ada Lovelace at ada@example.com called about order #4521.",
  "redact_types": [
    "email",
    "name"
  ]
}
Schema
{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "Text to be processed."
    },
    "redact_types": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "email",
          "phone",
          "name",
          "address",
          "ssn",
          "credit_card",
          "ip",
          "custom"
        ]
      },
      "description": "Types of data to remove. e.g. 'email, phone, name'."
    },
    "replacement_style": {
      "type": "string",
      "enum": [
        "token",
        "asterisk",
        "brackets",
        "hash"
      ],
      "description": "Method used to mask data. e.g. asterisk."
    }
  }
}

Outputs

resultapplication/jsonGuaranteed

Agent output.

Example

{
  "summary": "2 PII items redacted (1 name, 1 email).",
  "redacted": "Customer [NAME] at [EMAIL] called about order #4521.",
  "redactions": [
    {
      "type": "name",
      "original": "Ada Lovelace",
      "replacement": "[NAME]",
      "confidence": "high"
    }
  ],
  "warnings": []
}
Schema
{
  "type": "object",
  "required": [
    "summary",
    "redacted",
    "redactions"
  ],
  "properties": {
    "summary": {
      "type": "string",
      "description": "Brief overview of redacted content."
    },
    "redacted": {
      "type": "string",
      "description": "Text with all personal information removed."
    },
    "redactions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "original": {
            "type": "string"
          },
          "replacement": {
            "type": "string"
          },
          "confidence": {
            "type": "string"
          }
        }
      },
      "description": "List of identified PII entities."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of any remaining risks or issues found."
    }
  }
}

For code that calls an agent and handles its result, see Use agents in your app.