Menu

leantext: up to 99% fewer tokens when your coding agent reads the web
📰

leantext: up to 99% fewer tokens when your coding agent reads the web

DEV Community: python·Shouvik Palit·24 days ago
#cBaKjv2y
#devtopython#devto#dev#leantext#code
Reading 0:00
15s threshold

Your coding agent opens a docs page to answer one question. It gets the navigation bar, the sidebar, the footer, hidden menus, scripts and markup. Somewhere in there is the answer, and you pay for all of it, in tokens, in context window and in latency.

On PyPI's NumPy page, the project description is about 2,000 tokens. The whole page, converted to Markdown the usual way, is 92,348. Most of it is a hidden list of every file in every release, with hashes, that you never see in a browser.

leantext removes that noise before it reaches your agent, checks that nothing important went with it, and tells you what it saved.

https://github.com/shouvik12/leantext

What it does

Point it at a URL or a file.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.