git clone https://github.com/mstuart/tare && cd tare
cargo build --release # builds target/release/{tare, tare-proxy}The default build uses keyword/symbol-based relevance and has no external model dependency. To enable neural semantic relevance (exact cosine ranking via fastembed — downloads an embedding model on first use):
cargo build --release --features neural-embedOr with Docker:
docker compose up --build # runs tare-proxy on :8787Point your agent's API base URL at tare; it forwards to the real upstream and compresses on the way.
TARE_UPSTREAM=https://api.anthropic.com TARE_PORT=8787 ./target/release/tare-proxyIt speaks Anthropic (/v1/messages) and OpenAI (/v1/chat/completions).
| Env var | Default | Meaning |
|---|---|---|
TARE_UPSTREAM |
https://api.anthropic.com |
upstream API base URL |
TARE_PORT |
8787 |
listen port |
TARE_RECENCY |
4 |
tool outputs always kept regardless of relevance |
TARE_ENABLED |
true |
set 0/false for byte-exact passthrough |
TARE_CONTEXT_LIMIT |
200000 |
model context window (drives the fill-based aggression dial) |
TARE_OUTPUT_HOLDOUT |
0 |
fraction of sessions that bypass compression (A/B baseline for tare output-savings) |
TARE_LOG |
unset | set it to log one line per turn with the compression report |
Response headers report what it did: x-tare-input-tokens, x-tare-net-tokens, x-tare-dropped,
x-tare-aggression, x-tare-verbosity-spike, x-tare-halted.
cat ctx.json | tare compress --task "fix the auth bug"
cat big.rs | tare skeletonize --path big.rs
ps aux | tare compact-lossy --max-rows 30 --max-field 110See the CLI reference for all subcommands.
tare-mcp is a stdio MCP server. Point any MCP client at the tare-mcp binary; it exposes
tare_skeletonize, tare_compact_lossy, tare_compress, tare_deref_images, tare_stats, and a
reversible tare_expand — when a tool compacts something it returns an id, and
tare_expand({id}) returns the exact original (CCR-style retrieval), so the agent can drill back in
on demand — plus persistent cross-session memory: tare_remember, tare_recall, tare_forget,
tare_memory_stats.