gitwtfhub

wtf is secondwind?

orchetron/secondwind — explained in plain English

Analysis updated 2026-05-18

9RustAudience · developerComplexity · 3/5LicenseSetup · easy

TL;DR

A proxy and library that compresses an AI agent's tool output before it reaches the model, with proof no value was lost.

Mindmap

mindmap
  root((secondwind))
    What it does
      Compress tool output
      Prove lossless
      Report tokens saved
    Tech stack
      Rust core
      Python and Node libs
      WebAssembly build
    Use cases
      Proxy for agents
      Framework adapters
      Token savings proof
    Audience
      AI agent developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Cut the tokens a coding agent's tool output sends to the model, with proof nothing was lost.

REASON 2

Add compression to an existing LangChain or LangGraph pipeline with a small hook.

REASON 3

Run any terminal AI agent through the secondwind proxy with zero code changes.

REASON 4

Verify exactly how many tokens were saved using the built-in proof and receipt system.

What's in the stack?

RustPythonNode.jsWebAssembly

How it stacks up

orchetron/secondwindarchledger/irlumecodeitlikemiley/waz
Stars999
LanguageRustRustRust
Last pushed2026-07-09
MaintenanceActive
Setup difficultyeasymoderatemoderate
Complexity3/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Install script or pip/npm package gets the CLI or library running in minutes.

Use, modify, and distribute freely, including commercially, as long as you keep the license notice and note any changes.

Wtf does this do

Secondwind is a tool that shrinks the output an AI coding agent sends back to the language model, without losing any of the actual information, and it proves that nothing was lost. When a coding agent runs a command or reads a file, that output often gets sent back to the model as is, using up a lot of the available context space. Secondwind sits between the agent and the model, rewriting large chunks of that tool output into a more compact form while checking that every value can still be recovered before it allows the rewrite through. If a rewrite cannot be proven safe, the original output passes through unchanged instead. You can use Secondwind in three ways. As a proxy, it runs as a standalone process that your agent talks to instead of talking directly to the model, requiring no code changes. As a library, you can call it directly from Python, Node, or a sandboxed WebAssembly build inside your own program. As middleware, it plugs into existing frameworks like LangChain, LangGraph, Agno, Strands, Cursor, and LiteLLM with a small amount of glue code. Getting started with the command line version involves running an install script or using pip or npm for the language libraries. Two commands are enough to wire it into Claude Code: one sets up the integration, and the other runs your agent through the proxy. After a session ends, Secondwind prints a receipt showing how many blocks it compressed and how many tokens it saved, along with confirmation that every block was verified lossless. The tool works across several API formats, including the Anthropic Messages format, OpenAI's Chat Completions and Responses formats, and AWS Bedrock's Converse format, automatically detecting which one is being used. It reports the token savings as a fact it can verify, rather than an estimate, and it is released under the Apache 2.0 license.

Yoink these prompts

Prompt 1
Help me install secondwind and wire it into my Claude Code setup.
Prompt 2
Explain how secondwind proves a compressed tool-output block is still lossless.
Prompt 3
Show me how to add the LangChain adapter to compress tool outputs.
Prompt 4
Walk me through running secondwind as a shared proxy for multiple agents.

Frequently asked questions

wtf is secondwind?

A proxy and library that compresses an AI agent's tool output before it reaches the model, with proof no value was lost.

What language is secondwind written in?

Mainly Rust. The stack also includes Rust, Python, Node.js.

What license does secondwind use?

Use, modify, and distribute freely, including commercially, as long as you keep the license notice and note any changes.

How hard is secondwind to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is secondwind for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.