Portway

Compress a coding agent’s growing conversation on its way to the API.

portway.told.me Source on GitHub brew install rath/tap/portway
The Portway browser console: 47 requests, 204.6 MB of upload saved, the upstreams in use, and a per-turn request size chart.
The browser console during a Claude Code and Codex session: 96 percent of the upload saved.

Send what changed

Coding agents upload the conversation again with each turn, including earlier tool results. Portway uses the previous request as a compression dictionary. A Portway receiver reconstructs the full request and forwards it to the model. Both ends participate in compression. A direct connection to a provider still gives you routing and request logs.

Forty turns on the wire

In the project’s reproducible benchmark, a conversation starts at 256 KiB and grows by 4 KiB per turn. Across forty turns the agent submits 13.2 MiB, of which 99 KiB crosses the network with Portway. The browser console and terminal dashboard let you compare those two sizes for each request in your own session.

Features

  • Dictionary-compressed Zstandard frames following RFC 9842. The sender can fall back to plain zstd or the original body when the receiver declines a compression format.
  • Routing by model across upstreams, with no provider, endpoint, credential, or price built in.
  • Token and cost records per model and tier, including long-context rates, with reports from the CLI.
  • A terminal dashboard and a browser console with the same themes: Catppuccin, Tokyo Night, Nord, Dracula, and Gruvbox.
  • An embeddable Rust library, portway-core, and a setup plugin for Codex and Claude Code.

Screenshots

The Portway terminal dashboard: turns of 10.9 MB sent as a few kilobytes each, beside the upstreams and a socket throughput chart.
The terminal dashboard showing the same session.