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.

The routing front door for Philter

Philter Router

Philter Router is the single front door in front of one or more Philter engines. Hand it a file and it selects the redaction policy and the engine from the file's attributes, then forwards the file to Philter for redaction.

View on GitHub

One policy can't fit every file

A clinical record, a signed contract, and a support export each call for different redaction. One blunt policy applied to everything over-redacts some files and under-redacts others, and hard-coding which policy to use pushes that decision into every caller. Philter Router makes the decision once, in one place: it reads each file's attributes and routes it to the policy and engine built for it, with a default that redacts anything it does not recognize.

Each file gets the policy chosen from its own attributes, not one hard-coded by the caller. Onboard a new file type by adding a route to the config.

Build and run

Philter Router is a single Java application driven by one YAML file. Build it, point it at your Philter engines and routes, and run whichever entry points you enable.

# Build the runnable jar (Java 25)
mvn package

# Run it against your config
java -jar target/philter-router.jar router.yaml

The examples directory ships complete, commented configs (minimal, folder watching, HTTP API, classifier routing, and network shares). Every option is documented in the installation guide.

One front door, one routing pipeline

Attribute-based routing

Each route matches on content type (detected with Apache Tika from the file's actual bytes, not just its extension), filename extension, containing directory, and an optional classification. Within a route every field must match; a list inside a field is any-of. Routes are ordered and the first match wins.

Local-LLM classification

An optional tier sends the extracted text to a local LLM (Ollama) and routes on the label it returns, for content that filename and directory cannot distinguish. The classifier runs at most once per file and the result is cached. Extracted text is classification-only: never written as output, never logged.

Two entry points

A folder-watcher redacts files as they land in watched directories (polling for network shares, low-latency notify for local disks); a Philter-compatible HTTP API redacts on request. Enable either or both from one config.

Philter-compatible API

The HTTP API mirrors Philter's filter contract, so the Philter SDK and existing Philter clients work against it unchanged. It is send-only: redact and return.

Fail-closed by default

A mandatory default policy catches every file that matches no route, and the router refuses to start without it, so no file is routed around redaction.

Self-hosted

Runs inside your own infrastructure and forwards to your own Philter engines. Files and the text extracted for routing never leave your perimeter.

Operations and observability

Built to run as an on-prem service or a Windows service, with the signals an operator needs to run it with confidence.

Structured audit trail

Every routed file is recorded to a structured audit log alongside the operational logs, so you keep a record of which policy and engine handled each file. Logs go to stdout by default; set router.log.dir to also write rolling files.

Metrics and health

The HTTP API is a Spring Boot application with Actuator: GET /actuator/health for liveness and readiness and GET /actuator/prometheus for metrics, plus an OpenAPI 3 spec at GET /openapi.yaml.

Fail-closed validation

Configuration is validated at startup and the router refuses to start when it is incomplete or unsafe, for example when the mandatory default is missing.

How routing works

Routing is tiered, so expensive work runs only when a cheaper signal has not already decided the route: a file that fails a cheaper tier never triggers a more expensive one. A file that matches no route, whose language is not allowed, or whose classifier is unavailable, falls to a mandatory default policy, so nothing is routed around redaction.

Frequently asked questions

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

What does Philter Router do that Philter doesn't?
Philter redacts a document against one policy you choose per request. Philter Router sits in front of one or more Philter engines and chooses that policy, and the engine, for you, from each file's attributes. It adds the routing, a folder-watcher, and a fail-closed default; Philter still performs the redaction.
How does it decide which policy to apply?
Each file is matched against an ordered list of routes. A route can match on content type (detected from the bytes with Apache Tika), filename extension, containing directory, and an optional local-LLM classification, and it can require a language. The first route that matches wins; a file that matches nothing falls to a mandatory default policy.
Do I have to run the LLM classifier?
No. Classification is an optional routing tier. If your routes only need content type, extension, directory, and language, no LLM is involved. When you do enable it, it points at a local Ollama endpoint, runs at most once per file, and caches the result.
Can my existing Philter integration call it?
Yes. The HTTP API mirrors Philter's filter contract, so the Philter SDK and existing Philter clients work against it unchanged. The difference is that the policy is selected by the routes rather than passed in, though you can still override it per request with ?p=.
Does it store the files or the text it extracts?
The router forwards files to Philter and returns the result; it does not retain them. Text extracted for language detection and classification is used only for routing: it is never written as output and never logged.
What happens to a file that matches no route?
It falls to the mandatory default policy, which redacts. The router refuses to start without a default, so no file is routed around redaction. The same fallback applies when a file's language is not allowed or a classifier is unavailable.
Is Philter Router open source?
Yes. Philter Router is open source under the Apache License, version 2, and the code is on GitHub.

Ready to use Philter Router?

Three ways to get going: deploy the open source yourself, spin it up from a cloud marketplace, or work with our team directly. Pick the path that fits.

See your options