Skip to main content

pithio

Local context compression for AI agents. Less to read, details within reach.

pithio shortens the text and data your agents read from terminals, APIs, web pages and connected tools, before the model reads it. Every shortened output says what it left out, and the full original stays on your machine: when the agent needs a detail, it fetches it or queries it exactly.

Install and set up (two commands)

1. Install (one line, no Rust needed):

# macOS and Linux
curl -fsSL https://raw.githubusercontent.com/allenjoseph05/pithio/main/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/allenjoseph05/pithio/main/install.ps1 | iex

Or download the file for your system from Releases, or build it with cargo install --git https://github.com/allenjoseph05/pithio pithio.

2. Connect your agent:

pithio init --agent claude-code --write      # or: codex, cursor, copilot, gemini
pithio doctor                                # checks the setup

That is all: from your agent's next session, its tool outputs are shortened. pithio dashboard shows what was saved; pithio uninstall --agent claude-code --write removes it again.

Results

on real developer tool output without pithio with pithio
correct answers (171 questions, Claude Haiku) 86.5 % 91.8 %
input tokens per tool output 39,775 28,330 (29 % fewer)
correct answers on real system logs (Loghub) 57.4 % 74.1 %, with 60 % fewer tokens
tool-result tokens on GitHub API pages 100 % 7.8 %, every answer still visible

How these were measured: BENCHMARKS.md.

What it shortens

  • Terminals and repositories: test runs, builds, compiler diagnostics, git log and diff, file lists.
  • Tables and structured data: JSON API responses, CSV and delimited tables, YAML and TOML.
  • Logs and search: application logs, failed CI jobs, code and text search matches.
  • Web and MCP results: fetched web pages, issue lists, search hits, database rows, connector logs.

Source files the agent is editing and short outputs are left alone. Output is never larger than the input, and the same input always gives the same output, so prompt caches keep working.

Every output says what it did

Each shortened output opens with a note naming its level:

  1. Lossless: the same data, written more compactly.
  2. Repeats only: every distinct value or kind of line shown, repeats counted.
  3. Focused: some parts left out; the note says what and how to get them.
test sample::case_001 ... ok
[... 79 more lines of the kinds shown above (other numbers) ...]
test sample::reports_expired_session ... FAILED

[pithio: level 2, repeats only: every kind of line is shown, repeats folded with exact counts; original 1,204 tokens: kept locally as handle 3f2a9c1e8b7d6a54]

Getting a detail back

The agent (or you) can recover anything from a shortened output by its handle:

pithio more HANDLE                      # read the original, page by page
pithio more HANDLE --grep timeout       # matching lines
pithio q HANDLE                         # the tables in it and their columns
pithio q HANDLE "count status = 500"    # exact counts, sums, filters and lookups (SQL)
pithio grep HANDLE "worker 7"           # lines that contain a text

Other ways to use it

  • In your own app (Python, Node), coming soon as pip install pithio and npm install pithio: client = pithio.wrap(anthropic.Anthropic()) shortens tool results in every request and adds a recovery tool.
  • MCP gateway: list your MCP servers in the config, then connect your client to pithio serve --config PATH.
  • Any shell command: pithio run -- COMMAND.
  • Local proxy: point an Anthropic client at http://127.0.0.1:8788 (pithio proxy).

See what it saved

pithio gain        # tokens saved today, this week, all time
pithio show        # recent shortened outputs, each next to its original
pithio audit       # checks every stored output against what its note promised
pithio dashboard   # the same in a local web page

Privacy

Everything runs on your machine; pithio sends nothing anywhere. Originals are kept locally for one day (~/.pithio); pithio forget deletes them. Outputs that look like they hold a secret are never stored.

Building from source

cargo build --release -p pithio
cargo test --release -p pithio-core -p pithio

See CONTRIBUTING.md and SECURITY.md.

Licence

FSL-1.1-ALv2.

Metadata

Release files for pithio 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pithio 0.1.0
File Size Uploaded Provenance Actions
pithio-0.1.0.tar.gz 1.5 MB With provenance Details for pithio-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pithio 0.1.0
File Actions
pithio-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pithio-0.1.0-py3-none-win_amd64.whl
pithio-0.1.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for pithio-0.1.0-py3-none-manylinux_2_28_aarch64.whl
pithio-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for pithio-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pithio-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pithio-0.1.0-py3-none-macosx_11_0_arm64.whl
pithio-0.1.0-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details for pithio-0.1.0-py3-none-macosx_10_12_x86_64.whl

Total release size: 31.9 MB

Release files / pithio-0.1.0.tar.gz

Download URL pithio-0.1.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
ecbc22f1060fe7aa05e5a4be41c7ef15c52785a32535401569e62100b3987685
BLAKE2b-256 checksum
How to use checksums
20b029c9a6b17b30adb996a8c03152c6af12439ef4d568cd4672091ab90747ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / pithio-0.1.0-py3-none-win_amd64.whl

Download URL pithio-0.1.0-py3-none-win_amd64.whl
Size 6.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
209e7179ea6853d323750214417a44f24079e7c5521a2497592f46b2db4013bd
BLAKE2b-256 checksum
How to use checksums
8f89f8ea3ee3221c0fd8716af335f1046d3c1d97cba14d63fee425626426238e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / pithio-0.1.0-py3-none-manylinux_2_28_aarch64.whl

Download URL pithio-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Size 5.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
74bab712b0d6e352eecc62c94d6a898f4c655e766beff0dfa44ea8d026a5573b
BLAKE2b-256 checksum
How to use checksums
2dcaa4c06a1644def3f65a7637c95e94a8eaee4b895ae004dd681c6a664ee7d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / pithio-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pithio-0.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 6.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c191f098bfd6e6a0c05e31219cc38245298419edced8a1075fb97739e0786fc0
BLAKE2b-256 checksum
How to use checksums
6fbae5d040accb96597335e45b9e0e7feb0470975f10275ace9d2115a7ee5eb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / pithio-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL pithio-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 5.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
df46d057c6e59f99325a03c198652ed289289a84b1dfa45b9a6f81929bd6e49a
BLAKE2b-256 checksum
How to use checksums
ab42312e334a7f9d876899b6b95fa8c2069cf64d5187a8aaa1384e87465983db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / pithio-0.1.0-py3-none-macosx_10_12_x86_64.whl

Download URL pithio-0.1.0-py3-none-macosx_10_12_x86_64.whl
Size 6.1 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9e60783f99231a25f2cffdb10af79b734be7f3d4896555a8da8a60cde35bbf15
BLAKE2b-256 checksum
How to use checksums
9a1dce512ae4780cd681d24645b97d3eebb41320ad514b143b773fd4e5512516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Security for pithio 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for pithio-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page