Inspiration

Paritok solves a real cost problem: agents repeatedly send enormous source files, logs, tool output, and history to an upstream model. Its hosted GPU makes semantic compression easy to adopt—but the same context often contains credentials, connection strings, customer identifiers, internal IPs, and personal data.

We wanted the savings without asking a hosted compressor to see every raw value. That became VaultTok: a privacy firewall designed specifically around Paritok’s hosted path.

What it does

VaultTok protects context in the browser before a network request exists. It detects sensitive values, replaces them with randomized aliases, and keeps the reversible mapping in an ephemeral local vault. The server receives only sanitized context and performs an independent residual-leak scan before calling Paritok’s hosted 4B model.

When compression returns, VaultTok checks every alias. If all survived, the browser restores the exact values locally and displays an auditable privacy/token receipt. If one alias disappeared, VaultTok fails closed to the original context and honestly reports zero savings.

The receipt separates:

  • raw, Paritok-compressed, and final-safe token counts;
  • Paritok-hosted versus deterministic preview mode;
  • protected classes and occurrences without revealing values;
  • egress-scan, alias-integrity, and restoration results; and
  • fallback behavior.

How we built it

The product is a React/TypeScript application deployed as a Cloudflare-compatible Worker. The browser-local engine implements overlap-safe detection for private keys, credentialed database URIs, GitHub and AWS tokens, JWTs, bearer tokens, assigned credentials, emails, IP addresses, and government identifiers.

The server adapter calls Paritok’s official hosted endpoint with paritok-4b-v1, the user’s task objective, log_output context, and GPT-5 attribution. Token receipts use the o200k_base tokenizer. Unit tests cover redaction, repeated-value aliasing, fail-closed behavior, server rendering, preview labeling, and the residual-leak gate.

Paritok is not a decorative API call: it is the semantic compression engine between local protection and local restoration.

Challenges we ran into

The main design challenge was preserving privacy without destroying the semantics Paritok needs. Encrypting the full context would make compression impossible; sending hashes can leak equality and still removes context. Random typed aliases preserve structure while keeping raw values local.

Lossy compression created a second challenge. A high savings number is meaningless if the model drops an alias. We made alias survival a hard invariant and included the cost of restored values in the final-safe token count. Safety can therefore turn an impressive model result into an honest zero-savings outcome.

We also kept preview and live evidence separate. Without a hosted key, the site uses an explicitly labeled deterministic reducer so judges can exercise the full privacy flow without any claim that preview output came from Paritok.

Accomplishments that we’re proud of

  • Raw protected values never enter the VaultTok request body.
  • A second server-side gate blocks recognized residual leaks before Paritok is called.
  • Every alias must survive or the system fails closed.
  • Receipts contain no raw values or hashes.
  • The reproducible synthetic preview fixture protects 8 unique values across 45 occurrences, sends zero raw values, restores exactly, and reduces final-safe o200k_base tokens by 73.9%. This is explicitly a local-preview engineering result, not a Paritok benchmark.
  • The repository includes Apache-2.0 licensing, tests, a threat model, benchmark methodology, synthetic evidence, and a one-command hosted benchmark.

What we learned

Token efficiency is a data-governance problem as much as a model problem. The best hosted compressor can be difficult to adopt inside a real company if developers cannot prove what crossed the boundary. A local vault and fail-closed guard make Paritok easier to trust without hiding the cost of safety.

We also learned to measure the final context the user actually receives—not only the model’s compressed body. Alias overhead and safety fallback belong in the headline number.

What’s next

  • Organization-defined detectors and allowlists.
  • Browser WebCrypto-backed encrypted vault persistence for long agent sessions.
  • A first-class pre-compression hook in the Paritok proxy.
  • Policy packs for source code, incident logs, healthcare, and customer support.
  • Preregistered multi-workload benchmarks with deterministic downstream quality validators.
  • An enterprise mode with content-security policy, audit export, access control, and local deployment attestations.

Built With

  • paritok
Share this project:

Updates