New: Philter One, a redaction box for your office, is coming soon. Learn more →

Contact Us

Tell us about your stack and the privacy problems you're trying to solve. We typically respond within one business day.

Prefer email? support@philterd.ai

Please do not enter PII or PHI in this form. If you need to share an example, use a sanitized one.

Open source redaction library

Phileas

Phileas is the core redaction, pseudonymization, masking, and replacement library that powers Philter. Embed it directly into your Java, Python, or .NET application when you want fine-grained control over the redaction pipeline without standing up another service.

Text in, redacted text out

Phileas detects the sensitive values in a document and applies your policy's strategy to each. The same filter call works in Java, Python, and .NET.

Input

Patient Margaret CollinsPERSON, SSN 523-88-4021SSN, seen 04/12/2024DATE. Contact mcollins@example.comEMAIL or (555) 342-9187PHONE.

Redacted output

Patient {{REDACTED-PERSON}}, SSN ***********, seen 05/11/2024. Contact user4821@example.com or (555) ***-****.

Each entity type gets its own strategy: redact, mask, shift, or replace with a synthetic value. Nothing leaves your process.

Code samples

Phileas exposes the same redaction surface across languages. The minimal “define a policy, redact one document” flow looks like this in each. Each port expresses the policy its own way (PhiSQL in Java, a dictionary in Python, typed objects in .NET), and the underlying policy model is the same. For ready-made policies, see the policy library.

Java is the reference implementation. New features and entity types land in the Java library first; the Python and .NET libraries track its API surface and feature set as it evolves.

Install: Maven Central: ai.philterd:phileas:4.5.0

Requires Java 21 or later.

<!-- pom.xml -->
<dependency>
    <groupId>ai.philterd</groupId>
    <artifactId>phileas</artifactId>
    <version>4.5.0</version>
</dependency>

// Example.java
import ai.philterd.phileas.PhileasConfiguration;
import ai.philterd.phileas.policy.Policy;
import ai.philterd.phileas.model.filtering.TextFilterResult;
import ai.philterd.phileas.services.context.DefaultContextService;
import ai.philterd.phileas.services.disambiguation.vector.InMemoryVectorService;
import ai.philterd.phileas.services.filters.filtering.PlainTextFilterService;

import java.util.Properties;

public class Example {
  public static void main(String[] args) throws Exception {
    final PhileasConfiguration configuration = new PhileasConfiguration(new Properties());

    final PlainTextFilterService filterService = new PlainTextFilterService(
        configuration,
        new DefaultContextService(),
        new InMemoryVectorService(),
        null); // optional HttpClient for PhEye; null uses the default

    final Policy policy = Policy.fromPhiSQL("""
        REDACT EMAIL_ADDRESS WITH REDACT;
        REDACT ZIP_CODE WITH REDACT;
        """);

    final TextFilterResult result = filterService.filter(
        policy, "context", "Email test@example.com, zip 90210.");

    System.out.println(result.getFilteredText());
    // -> Email {{{REDACTED-email-address}}}, zip {{{REDACTED-zip-code}}}.
  }
}

Install: pip install phileas-redact

from phileas.policy.policy import Policy
from phileas.services.filter_service import FilterService

policy = Policy.from_dict({
    "name": "my-policy",
    "identifiers": {
        "emailAddress": {"emailAddressFilterStrategies": [
            {"strategy": "REDACT", "redactionFormat": "{{{REDACTED-%t}}}"}]},
        "ssn": {"ssnFilterStrategies": [
            {"strategy": "REDACT", "redactionFormat": "{{{REDACTED-%t}}}"}]},
    },
})

result = FilterService().filter(
    policy=policy,
    context="my-context",
    document_id="doc-001",
    text="Contact john@example.com or call about SSN 123-45-6789.",
)

print(result.filtered_text)
# -> Contact {{{REDACTED-email-address}}} or call about SSN {{{REDACTED-ssn}}}.

Install: NuGet: dotnet add package Philterd.Phileas

using Phileas.Policy;
using Phileas.Policy.Filters;
using Phileas.Services;

// Identifiers default to redaction, so no strategy is specified.
var policy = new Policy
{
    Name = "basic-policy",
    Identifiers = new Identifiers
    {
        Ssn = new Ssn(),
        EmailAddress = new EmailAddress(),
        PhoneNumber = new PhoneNumber()
    }
};

var result = new FilterService().Filter(
    policy,
    context: "session-1",
    piece: 0,
    input: "SSN: 123-45-6789  Email: alice@example.com  Phone: 555-867-5309"
);

Console.WriteLine(result.FilteredText);
// -> SSN: {{{REDACTED-ssn}}}  Email: {{{REDACTED-email-address}}}  Phone: {{{REDACTED-phone-number}}}

Why Phileas

Three first-class languages

Reference implementation in Java, with feature-parity ports for Python and .NET. Pick the SDK that fits the stack you already have.

Policy-driven

JSON policies describe which entity types to detect, under what conditions, and how to handle each (redact, mask, encrypt, replace with a synthetic value, or pass through). Version-control your policies; deploy them through CI/CD.

Validated identifiers

Back a custom identifier with a checksum or structural validator, so it keeps only genuine values and rejects format-valid look-alikes. Built-in coverage for national and financial IDs (Canadian SIN, Brazilian CPF and CNPJ, Spanish DNI, French NIR, IBAN, SWIFT/BIC, and more), with identical behavior across Java, Python, and .NET.

Embeddable

Link Phileas directly into your application. No service to deploy, no network hop, no operational footprint. Redaction happens in-process on the data already in memory.

Battle-tested in production

Phileas is the engine underneath Philter, running in production at healthcare, legal, and financial customers for years. The library has been pressure-tested on the workloads where a privacy miss isn’t an option.

Permissive Apache license

Business-friendly licensing. No commercial review needed, no per-seat fees, no vendor lock-in. Use it however you need to.

Phileas' Architecture

Phileas runs inside your application's process. The host code calls a single filter(text) entry point; the library reads a policy file and an optional NLP lens, then routes the text through three internal layers before returning redacted output.

Frequently asked questions

If something here isn’t covered, get in touch and we’ll answer.

What is Phileas?
Phileas is the open source library that finds and redacts PII and PHI in text. It runs in-process inside your application: the host code calls a single filter(text) entry point, Phileas reads a policy and an optional NLP lens, and returns redacted output. There is no service to deploy and no data egress. It is the engine underneath Philter.
How is Phileas different from Philter?
Phileas is a library you embed directly in your application; Philter wraps Phileas as a self-hosted REST API, shipping with NLP models and a friendlier operational surface. Same detection core either way. Choose Phileas when you want fine-grained, in-process control with no extra service; choose Philter when you want an HTTP endpoint other systems can call.
Which languages does Phileas support?
Three first-class languages: Java is the reference implementation, with feature-parity ports for Python and .NET. New features and entity types land in Java first; the Python and .NET libraries track its API surface as it evolves.
Does Phileas need a separate model server?
Not always. Regex patterns, dictionaries, and format validators (Luhn, SSN structure, date validity) run in-process with no extra service. For machine-learning detection, Phileas calls PhEye to run an NLP lens. You enable only the detection methods your policy actually needs.
How long has Phileas been around?
Phileas has run in production at healthcare, legal, and financial customers for several years, since well before the current wave of LLM-wrapper privacy tools. It has been pressure-tested on workloads where a privacy miss isn't an option.
Is Phileas open source?
Yes, under the permissive Apache License, version 2: no commercial review, no per-seat fees, and no vendor lock-in. The code is on GitHub.

Ready to build with Phileas?

Add it to your build from Maven Central, PyPI, or NuGet, or work with our team directly. Pick the path that fits.

See your options