hn.today

An LSP layer for 70%+ token reduction in multi-turn agents

github.com3 points0 comments
Screenshot of An LSP layer for 70%+ token reduction in multi-turn agents

A specification and compiled Rust CLI describe an in-container LSP daemon that intercepts stdio JSON-RPC streams from IDE/agent loops to perform structural AST pruning and local execution for non-cognitive tasks. The design uses a Tree-sitter AST engine, a Cognitive Dependency Index (CDI) to decide what requires cloud inference, and zero-knowledge SHA-256 symbol masking so proprietary code never leaves the workspace. By filtering import/header/comment noise and routing low-cognitive work to a local execution grid, the system claims SOC2-ready privacy, zero host installation in containers or devboxes, and deterministic local parse latency guarantees (sub-50ms, often <10ms on common files).

Benchmarks presented simulate a 25-step refactoring loop on a 150-file TypeScript/Python codebase and report input token spend reduced from 1,450,000 to 280,000 (75.2% reduction), per-step latency falling from 1,240ms to 115ms (10.7x faster), and estimated cost per 1,000 runs dropping from $21.75 to $4.20 (≈80.6% margin expansion). Token reduction varies by file density (15-88% range). The repo includes an unlimited-bench binary to reproduce parsing and caching behavior, plus notes on distributed in-VPC AST state caching to eliminate redundant parsing and edge egress; commercial licensing and contact info for the author are provided.

Read on github.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.