[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114570":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},114570,"SparseReading","Liuzedooong\u002FSparseReading","Liuzedooong","Saving your tokens 🔥! SparseRead enables AI agents to selectively read what matters across diverse information sources.","https:\u002F\u002Fsparseread.pages.dev\u002F",null,"Python",95,9,66,1,0,8,22,3,51.2,"MIT License",false,"main",true,[],"2026-11-17 13:09:35","2026-11-23 06:01:13","# SparseRead\n\n\u003Cdiv align=\"center\">\n\n**Token-efficient reading for AI agents**\n\nSparseRead is a training-free reading layer for Claude Code, OpenCode, Codex,\nNanoBot, OpenClaw, and Pi. Agents can pull just the evidence they need from\nlong files, PDFs, logs, and spreadsheets, with source references and access\nto the original text when needed.\n\n[![CI](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Factions\u002Fworkflows\u002Fci.yml)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](LICENSE)\n[Install](#install) · [Supported versions](#supported-versions) · [Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2608.22237) · [Site](https:\u002F\u002Fsparseread.pages.dev\u002F) · [中文](README.zh-CN.md)\n\n\u003C\u002Fdiv>\n\n## 🔥 News\n\n- **2026-11-14 · [v0.1.4](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Ftag\u002Fv0.1.4) update** — Validated the latest versions of four hosts on macOS arm64: OpenCode **2.3.0**, Claude Code **2.1.325**, Codex CLI **0.169.0**, and NanoBot **0.4.1**. OpenCode V2 adds per-user installation with advisory mode first and a one-time auto-mode suggestion once 48 hours have elapsed since the first successful evidence read.\n- **2026-09-28:** [v0.1.3](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Ftag\u002Fv0.1.3) fixes a large-workspace timeout when switching to full-fidelity native reading in Codex\u002FPi.\n- **2026-09-28:** Added Codex and Pi support in [v0.1.2](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Ftag\u002Fv0.1.2).\n- **2026-09-14:** Support for Claude Code, OpenCode, OpenClaw, and NanoBot.\n\n## Supported versions\n\n| Framework | Verified host versions | Setup |\n|---|---|---|\n| OpenCode | **2.3.0** · V1 1.19.5 and 1.17.14 | [Project or per-user installation](docs\u002Finstallation.md#global-opencode-v2-install) |\n| Claude Code | **2.1.325** | [MCP and hooks](integrations\u002Fclaude\u002FREADME.md) |\n| Codex CLI | **0.169.0** | [Project plugin and MCP](docs\u002Finstallation.md#install-an-adapter) |\n| NanoBot | **0.4.1** | [Python adapter and AgentLoop](integrations\u002Fnanobot\u002Fpython\u002FREADME.md) |\n| OpenClaw | 2026.7.1-2 | [Profile plugin](integrations\u002Fopenclaw\u002FREADME.md) |\n| Pi | 0.87.1 | [Project extension](docs\u002Finstallation.md#install-an-adapter) |\n\nThese are the exact versions exercised on macOS arm64. OpenClaw and Pi are\nfixed-version regression checks. The [host validation matrix](docs\u002Fframework_upgrade_20261114\u002Fvalidation-summary.md)\ncovers permissions, model workflows, and platform scope.\n\n## Install\n\nYou need Python 3.11+, [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F), and your agent CLI.\nOpenCode, OpenClaw, Codex, and Pi also require Node.js 22 or newer.\nThe download check below uses the macOS checksum tool.\n\nStart in a fresh directory. [Download the updated v0.1.4 installer ZIP](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Fdownload\u002Fv0.1.4\u002Fsparseread-source-installer-v0.1.4-20261114.zip).\n\n```bash\ncurl -fLO https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Fdownload\u002Fv0.1.4\u002Fsparseread-source-installer-v0.1.4-20261114.zip &&\ncurl -fLO https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Freleases\u002Fdownload\u002Fv0.1.4\u002FSHA256SUMS-20261114 &&\ngrep '  sparseread-source-installer-v0.1.4-20261114.zip$' SHA256SUMS-20261114 | shasum -a 256 -c - &&\nunzip -q sparseread-source-installer-v0.1.4-20261114.zip &&\ncd sparseread-v0.1.4\n```\n\n### OpenCode V2, all local projects\n\nFrom the extracted directory, install once for your user account:\n\n```bash\nuv run --no-project --python 3.12 python scripts\u002Finstall_sparseread.py \\\n  --platform opencode --global --doctor\n```\n\nRestart OpenCode and ask, “Use SparseRead to find the root cause in this report\nand cite the relevant passages.” Fresh global installs use `advisory` mode,\nso native reads still work as usual. Once 48 hours have elapsed since the first\nsuccessful evidence read, the next such read shows a one-time terminal\nsuggestion. To use `auto`, rerun the installer with `--sparseread-mode auto`\nand restart. A reinstall without a mode flag keeps your choice.\n\nSee the [installation guide](docs\u002Finstallation.md#install-an-adapter) for\nOpenCode project installs and commands for Claude Code, Codex, NanoBot, OpenClaw, and Pi.\n\n### Quick test\n\nA full git checkout includes a small long-document fixture; the source installer archive does not:\n\n```bash\nopencode run \"Use SparseRead to inspect tests\u002Ffixtures\u002Fquick_test\u002Fincident-report.md and report ROOT_CAUSE, MITIGATION_OWNER, and FINAL_DEADLINE.\"\n```\n\nOther adapters can expose the same request; see the validation matrix for\nwhat has been exercised in v0.1.4.\n\n## Results\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Flaunch\u002Fsparseread-demo-wide.gif\" alt=\"SparseRead replay: full read vs sparse evidence, then the cost-quality frontier\" width=\"100%\">\n\u003C\u002Fp>\n\nThe current paper evaluation covers 125 tasks, five workload scenarios, and six\nfrontier models: Claude Opus 5, Qwen3.6-Plus, DeepSeek-V4-Flash,\nDeepSeek-V4-Pro, GLM-5.1, and Kimi-K2.5.\n\n| Headline | Reported result |\n|---|---:|\n| Maximum token reduction | **92.9%** |\n| Maximum wall-time reduction | **89.0%** |\n| Model–scenario cells with lower tokens and lower time | **30 \u002F 30** |\n| Cells preserving or improving task score | **26 \u002F 30** |\n| Sparse-fit cells preserving or improving task score | **22 \u002F 24** |\n\nThe gain is not tied to one model: the evaluation includes strong reasoning\nmodels as well as general-purpose frontier models, and the paper reports\nbenefits for all six models across the full matrix. See the\n[paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2608.22237) for definitions, baselines, and the\ncomplete results.\n\n### Cross-framework paper results\n\n| Framework | Median token reduction | Median time saving |\n|---|---:|---:|\n| NanoBot | **69.0%** | **64.4%** |\n| OpenCode | **71.8%** | **64.9%** |\n| OpenClaw | **28.7%** | **28.2%** |\n\n## How it works\n\n- **Read Gate** — selects `auto`, `native`, or `advisory` behavior from artifact\n  shape and task economics. Low-benefit computation and small-file work stays\n  on native tools.\n- **Reader Backends** — provide typed, bounded views for text\u002FPDF, structured\n  data, and multi-file collections.\n- **EvidencePack** — returns compact evidence with source anchors, unresolved\n  requirements, and a suggested next action.\n- **Stateful protocol** — supports preview, targeted reading, refinement,\n  verification, explicit raw fallback, and stopping.\n\nThe public production entrypoints are framework-facing tools; users normally\ndo not need to invoke them directly:\n\n```text\nsro_preview(path) -> bounded preview + FileCard\nsro_read(target, mode, hint) -> EvidencePack\nsro_raw(raw_ref) -> explicit raw fallback\n```\n\n## Repository layout\n\n```text\npackages\u002Fsparseread-core\u002F       framework-neutral core and tests\nintegrations\u002F\u003Cframework>\u002F       NanoBot, OpenCode, OpenClaw, Claude Code adapters\nscripts\u002Finstall_sparseread.py   source installer and doctor\ntests\u002F                          release, bridge, gate, and installer tests\nbenchmarks\u002F                     reproducibility runners and selected fixtures\ndocs\u002F                           installation, architecture, and design notes\n```\n\nThe core and adapters are intentionally separate. A framework adapter owns only\nthe host-specific bridge, lifecycle hooks, and installation surface; it does\nnot fork the reading protocol.\n\n## Development\n\nThe following test commands require a full git checkout; installer archives omit tests and benchmarks.\n\nRun the core suite independently:\n\n```bash\nuv run --project packages\u002Fsparseread-core --with pytest --with pytest-asyncio \\\n  pytest packages\u002Fsparseread-core\u002Ftests -q\n```\n\nRun the full release suite:\n\n```bash\nPYTHONPATH=\"packages\u002Fsparseread-core\u002Fsrc:integrations\u002Fnanobot\u002Fpython\u002Fsrc:integrations\u002Fopencode\u002Fpython\u002Fsrc:integrations\u002Fopenclaw\u002Fpython\u002Fsrc:integrations\u002Fclaude\u002Fpython\u002Fsrc\" \\\n  uv run --project . --extra test --with 'nanobot-ai==0.4.1' pytest -q\n```\n\nBuild the Python distributions and JavaScript plugins through the same CI path:\n\n```bash\nnpm --prefix integrations\u002Fopencode\u002Fplugin ci\nnpm --prefix integrations\u002Fopencode\u002Fplugin run build\nnpm --prefix integrations\u002Fopenclaw\u002Fplugin ci\nnpm --prefix integrations\u002Fopenclaw\u002Fplugin run build\n```\n\nBenchmark runners and historical result files are kept for reproducibility;\nthey are not imported by any release package. See the\n[release architecture](docs\u002Frelease_architecture.md) before adding a new\nintegration.\n\n## Release scope and limitations\n\n- PyPI project registration is pending; npm and official framework-marketplace publishing are not currently distribution paths.\n- Claude Code uses MCP and per-event hooks; its Windows and PowerShell\n  paths have not been independently qualified in this batch.\n- SparseRead is selective by design. Native access remains the right choice for\n  small files, exact full-table computation, and other low-sparsity tasks.\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https:\u002F\u002Fgithub.com\u002FLiuzedooong\u002FSparseReading\u002Fblob\u002Fmain\u002FCONTRIBUTING.md) before opening a pull request.\nBug reports and focused integration feedback are welcome.\n\n## Citation\n\n```bibtex\n@article{liu2026readless,\n  title   = {Read Less, Solve More: Token-Efficient Sparse Reading for AI Agents},\n  author  = {Liu, Zedong and Wu, Jiaan and Ma, Xinyang and Xu, Le and Wang, Kai and Hu, Yuanchao and Tao, Dingwen and Tan, Guangming},\n  journal = {arXiv preprint arXiv:2608.22237},\n  year    = {2026}\n}\n```\n\n## License\n\nSparseRead is released under the [MIT License](LICENSE).\n\n\n## Repository migration\n\nThis is an independent continuation of the original source repository. It preserves Git commit history, branches and tags, but does not inherit the GitHub Fork relation, stars, issues, pull requests or release attachments.\n","SparseRead 是一个无需训练的轻量级阅读层，专为AI智能体设计，用于在长文档中高效定位并提取关键信息。它支持从PDF、日志、电子表格等多源异构文本中进行稀疏化阅读，仅加载必要片段，显著节省token消耗；同时保留原文上下文与来源引用，支持按需回溯完整内容。目前已适配Claude Code、OpenCode、Codex、NanoBot、OpenClaw和Pi等主流AI代理框架，兼容macOS arm64环境。适用于需要处理大量本地文档、注重推理成本控制与可追溯性的AI自动化任务，如代码辅助分析、日志诊断、技术文档问答等场景。",2,"2026-11-24 04:49:03","CREATED_QUERY"]