paritok-4b-v1

Non-destructive compression gateway for AI coding agents. Cuts token bills 25% on turn 1 to past 85% in long or saturated sessions, and fits ~3× more turns in t

What is paritok-4b-v1?

Non-destructive compression gateway for AI coding agents. Cuts token bills 25% on turn 1 to past 85% in long or saturated sessions, and fits ~3× more turns in the same context window. Powered by our open-source code-native 4B model. Drop-in for Claude Code, Cursor, Codex, OpenHands, and any BASE_URL agent.

Overview of paritok-4b-v1

What it is

Paritok is a non-destructive compression gateway for AI coding agents. It sits as a drop-in proxy between the agent and the LLM API, rewriting requests to reduce input token usage without changing the agent itself. The gateway compresses tool schemas, tool results, file reads, and stale history, then forwards the compressed request upstream. Nothing is permanently discarded; the agent can retrieve exact original content on demand. It works with Claude Code, Cursor, Codex, OpenHands, and any agent that honors BASE_URL. The gateway is powered by the Paritok-4B-v1 model, an open-source 4B compression model trained on 45K real agent trajectories.

Key features

  • Tool-schema filter: Semantically filters the tool list on each request, keeping only relevant tools in full schema and stubbing the rest. On a typical Claude Code turn, the tool block drops from ~29K tokens to ~8K. The selection is frozen per conversation to preserve prompt-cache stability. Filtered tools are recoverable via gateway_search_tools. Runs a small open embedding model (BAAI/bge-small-en-v1.5) entirely locally on CPU.
  • Content compression: Compresses tool results, file reads, and stale history down to ~26% of original size using the 4B model. Compressed segments are tagged [REF:id] and recoverable via read_original or expand_context.
  • History summarization: Summarizes turns beyond the recent window once the context fills up, keeping long sessions inside the model's context window.
  • Drop-in integration: Works without changing any agent code; the agent points at Paritok instead of the LLM API.
  • Non-destructive: All compressed or filtered content is recoverable on demand, locally and instantly.

Use cases

Paritok is designed for AI coding agents that send large input token payloads every turn, such as Claude Code, Cursor, Codex, and OpenHands. It is useful for reducing token costs in long, multi-turn sessions where tool schemas, file reads, and history accumulate. It can also help fit more turns into a fixed context window, avoiding context overflow or aggressive client-side compaction.

Getting started

See the repository README for installation and quick-start instructions.

License and pricing

The license is Apache-2.0. The pricing type is open_source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/paritok-officialparitok-4b-v1.svg)](https://yunodb.com/tools/paritok-officialparitok-4b-v1?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/paritok-officialparitok-4b-v1?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/paritok-officialparitok-4b-v1.svg" alt="Featured on YunoDB" height="20"></a>