teamchong

pxpipe: Reduce Coding-Agent Context Tokens with Images

pxpipe is a local TypeScript proxy that turns bulky coding-agent context into images before sending requests to vision-capable models, including Anthropic Claude and Google Gemini. It aims to cut input-token costs while keeping recent turns and model responses as text.

View on GitHub Compare
Stars
7.7k
Forks
661
Last commit
1 day ago
Contributors
32
Releases, 12 months
12

Our take

Newless than six months old and changing fast

Health score

50/100

How it is scored
Activity
67
Community
46
Issues
39
Pull requests
46
  • Merges more pull requests than 76% of the projects we track
  • Slower to merge pull requests than 83% of the projects we track

pxpipe is an actively developed, MIT-licensed context-compression tool with promising measured savings, but its young age, concentrated authorship and model-dependent reading accuracy call for a workload-specific trial.

Good fit if

  • Your coding-agent workflow sends large, token-dense context and uses a vision model you have validated for your tasks.
  • You can run Node.js 20.19 or newer and are comfortable testing a fast-changing project before broad adoption.
  • You want a local proxy or offline exporter and can benefit from its MIT license.

Look elsewhere if

  • Your workflow depends on exact recall from imaged logs or identifiers, but you cannot have the agent re-check those details with tools.
  • You primarily send sparse prose, where the README says image conversion may not be cost-effective.
  • You need a mature project with broadly distributed maintainer ownership rather than one where most contributions come from a single person.
All health signals
Last commit2026-11-11 (1 day ago)
Commits, last 90 days87
Releases, last 12 months12 (latest v0.16.0, 2026-11-11)
Contributors32 (top contributor: 82% of commits)
Issues closed, last 90 days3+ (typically closed in 45 days)
Pull requests merged, last 90 days54 (typically merged in 3 days)
Project age6 months

Checked on 2026-11-12 with the GitHub API.

Overview

pxpipe is a local proxy for coding agents, built around Claude Code's Anthropic Messages traffic and image-reading vision models such as Anthropic's Claude Fable 5 and Google's Gemini 4. It renders eligible bulky input, including tool output, older history, system prompts and tool documentation, as PNG pages to reduce the tokens used to send dense context. Responses are not modified, and recent turns stay as text.

It also supports OpenAI-compatible and Google request formats, and can run as a CLI or be used as a TypeScript library. Its main target is local coding-agent workflows on Node.js; Windows is community-supported.

Key Features

  • Proxies supported Anthropic Messages, OpenAI Responses and Chat Completions, and Google generateContent requests.
  • Converts eligible context to images and applies model-specific rendering profiles and profitability gates.
  • Keeps recent turns and model output as text; requests that are not eligible pass through unchanged.
  • Provides pxpipe warp to launch supported agent CLIs without changing their base URL settings.
  • Offers offline PNG export for text, files and Git diffs without running the proxy.
  • Includes a local dashboard and event log for viewing conversions and token-savings measurements.
  • Exposes rendering and request-transformation functions for TypeScript library use.

Use Cases

  • Coding-agent users who repeatedly send large tool outputs, source files or logs and want to reduce input-token usage.
  • Teams using a supported vision model that have tested its ability to read their context accurately, especially exact identifiers and dense data.
  • Developers who want to render files or diffs as image pages for an image-upload client without setting up a proxy.
  • TypeScript developers integrating context rendering or Anthropic request transformation into their own tooling.

What you need

Detected in the repository

  • Node.js >=20.19 (from package.json)
  • A Dockerfile, so it can run in a container; a Compose file sets up the related services
  • A test suite and automated checks on GitHub Actions

License in plain words

MITpermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

npx pxpipe-proxy

For agent-specific setup and routing, see the README.

Alternatives

  • headroom: Headroom reduces token use by compressing tool outputs and context, while pxpipe converts bulky context into images for vision models.
  • billion-context: billion-context incrementally compresses coding-agent conversations into text, while pxpipe replaces selected context with images sent to vision models.
ProjectLanguageLicenseStarsStatus
pxpipeTypeScriptMIT7.7kNew
headroomPythonApache-2.074.3kActive
billion-contextTypeScript–2.3kNew

Considerations

  • Image reading is not OCR: the README documents silent, plausible errors on exact strings. Accuracy differs substantially by model, so validate with your own workload and retain tool-based ways to retrieve exact values.
  • Image generation adds latency. Savings depend on the content, client behavior and how much uncached context is resent; sparse prose can lose money.
  • The project is less than six months old and changing quickly. It has recent commits and releases, but contribution is concentrated in one person. The reported median time to merge is short, while issue closure is slower.
  • Node.js 20.19 or newer is required. Windows support is community-maintained rather than a primary development target.
  • The README describes some benchmark results as directional or limited to particular models and workloads. Do not treat them as guarantees of general accuracy or improved long-task performance.

Found this useful?

Share it with someone who would like pxpipe.