Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Semble is a code search tool designed for agents that reduces token usage by approximately 98% compared to traditional grep-based methods. It offers rapid, accurate code retrieval on CPU without external dependencies. This development could significantly improve code search efficiency for AI agents and developers.

Semble, a new code search library optimized for agent environments, has been introduced, promising to cut token usage by around 98% compared to traditional grep methods while maintaining high retrieval accuracy. This innovation allows agents to access code snippets faster and more efficiently, with potential impacts on AI development and developer workflows.

Before you orderOffer from Amazon

Get the latest gadgets delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

Semble is designed to enable agents like Claude, Codex, Cursor, and OpenCode to search codebases instantly without relying on external APIs, GPUs, or cloud services. It indexes repositories in approximately 250 milliseconds and responds to queries in about 1.5 milliseconds, all on CPU hardware.

The library achieves this by returning only the relevant code segments, significantly reducing token usage—about 98% fewer tokens than traditional grep-based searches that read entire files. Benchmarks indicate Semble’s retrieval quality is comparable to code-specialized transformer models, with an NDCG@10 score of 0.854.

Semble can be integrated as a local server via MCP (Meta Code Protocol), allowing seamless use with popular agents and tools. It supports searching local repositories or remote git URLs, with automatic re-indexing on file changes. Installation requires only the Python package ‘semble’ or the ‘uv’ tool, with no need for API keys or GPU resources.

Why It Matters

This development matters because it addresses a key bottleneck in AI-assisted coding: efficient, accurate code retrieval at low token costs. By drastically reducing token consumption, Semble enables faster, more cost-effective code searches, which can improve developer productivity and the performance of AI agents relying on code context. It also opens the door for more scalable and accessible code search solutions, especially for large codebases or resource-constrained environments.

Products Worth Considering

Bose QuietComfort Headphones - Wireless Bluetooth Over-Ear Noise Cancelling Headphones, Petal Pink Limited Edition

Bose QuietComfort Headphones – Wireless Bluetooth Over-Ear Noise Cancelling Headphones, Petal Pink Limited Edition

Bose TV Speaker (2nd Gen) Compact Soundbar with Bluetooth and HDMI-ARC, Black

Bose TV Speaker (2nd Gen) Compact Soundbar with Bluetooth and HDMI-ARC, Black

As an affiliate, we earn on qualifying purchases.

Background

Traditional code search methods, such as grep, read entire files, leading to high token usage and latency. Recent advances in transformer-based models have improved accuracy but at significant computational and token costs. Semble builds on the need for a lightweight, fast, and accurate code search tool that can operate locally without external dependencies. Its release follows ongoing efforts to optimize AI tooling for developer workflows and codebase management.

“Semble returns only the relevant chunks, using ~98% fewer tokens than grep+read, while maintaining high retrieval accuracy.”

— Semble team

“It’s impressive how fast and token-efficient Semble is, especially since it runs entirely on CPU without external services.”

— Hacker News user

What Remains Unclear

It is not yet clear how Semble performs on extremely large or complex codebases beyond benchmark tests, or how it compares in real-world developer workflows over extended periods. Further user testing and adoption data are pending.

What’s Next

Next steps include wider adoption and testing of Semble across various codebases and agent integrations. Developers and organizations will likely evaluate its performance in real-world scenarios, potentially leading to updates or enhancements. Monitoring user feedback and benchmarking results will be key to assessing its long-term impact.

Key Questions

How does Semble achieve such a high reduction in token usage?

Semble returns only the relevant code chunks needed for a query, avoiding reading entire files, which drastically reduces token count—about 98% fewer tokens than grep+read.

Can Semble replace traditional code search tools?

While Semble is optimized for agent use and token efficiency, it can complement or replace grep in many scenarios, especially where speed and token economy are priorities.

Is Semble easy to integrate with existing AI agents?

Yes, Semble supports integration via MCP or CLI, and instructions are provided for popular agents like Claude Code, Codex, Cursor, and OpenCode.

Does Semble require external services or GPUs?

No, it runs entirely on CPU, with no API keys or external dependencies needed, making it easy to deploy locally.

What are the limitations or open questions about Semble?

Its performance on very large or complex codebases and long-term reliability in diverse workflows remain to be fully tested and validated.

You May Also Like

The 3‑2‑1 Backup Rule Explained (So You Actually Do It)

Learn how the 3-2-1 Backup Rule can safeguard your data effectively and discover practical tips to implement it confidently.

Your 2027 Shortlist: 6 Best AI Writing Assistant Software Options

A 2027 shortlist compares six AI writing assistants by stated workflow fit—and flags features, privacy details and performance buyers still need to verify.

The Best AI-Powered Note Apps For 2026 Efficiency

Explore the best AI note-taking apps of 2026, featuring top options for transcription, summaries, and seamless device integration to boost efficiency.

Calculate Battery Backup Runtime in 60 Seconds

Power up your knowledge instantly—learn how to calculate your battery backup runtime in 60 seconds and maximize your device’s efficiency.