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 optimized for agents, reducing token usage by 98% compared to grep+read. It indexes repos quickly and integrates with various agents without external dependencies. Its efficiency could significantly improve code search workflows.

Semble, a new code search library built specifically for agents, has been introduced, claiming to use 98% fewer tokens than traditional grep+read methods while providing instant, accurate code snippets.

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 Code, Codex, and others to perform fast and precise code searches without relying on external services or GPU resources. It indexes repositories in approximately 250 milliseconds and responds to queries in about 1.5 milliseconds, all on CPU. Benchmarks indicate its retrieval quality is comparable to specialized transformer models, with an NDCG@10 score of 0.854.

It can be deployed as an MCP server or used via command-line interface, supporting local paths and git URLs. The library emphasizes token efficiency, returning only relevant code chunks, which results in around 98% fewer tokens used compared to traditional grep+read searches. This efficiency aims to reduce costs and improve performance, especially in large codebases.

Why It Matters

This development matters because it offers a faster, more cost-effective way for AI agents and developers to perform code searches. Reducing token usage can lower computational costs and improve response times, making code search more scalable and accessible for large projects or frequent queries.

Its compatibility with existing agent frameworks and local setup without external dependencies means it can be readily integrated into current workflows, potentially transforming how AI agents access and understand codebases.

Products Worth Considering

LG UltraGear 27-inch 4K UHD IPS Gaming Monitor, Dual Mode 180Hz/360Hz, 1ms, G-SYNC Compatible

LG UltraGear 27-inch 4K UHD IPS Gaming Monitor, Dual Mode 180Hz/360Hz, 1ms, G-SYNC Compatible

Apple MacBook Air 15.3-inch Laptop with M5 chip, 16GB Unified Memory, 512GB SSD, 12MP Center Stage Camera, Touch ID, Wi‑Fi 7 – Sky Blue with

Apple MacBook Air 15.3-inch Laptop with M5 chip, 16GB Unified Memory, 512GB SSD, 12MP Center Stage Camera, Touch ID, Wi‑Fi 7 – Sky Blue with

As an affiliate, we earn on qualifying purchases.

Background

Traditional code search methods like grep are limited in speed and context-awareness, while transformer-based models, though accurate, are resource-intensive. Semble aims to bridge this gap by combining speed, accuracy, and efficiency. It follows recent trends toward token-efficient retrieval, with benchmarks indicating performance on par with specialized models but at a fraction of the size and cost.

Prior to this, most code search tools either relied on external APIs, GPU resources, or were slow for large repositories. Semble’s approach to local CPU-based indexing and querying marks a notable shift toward lightweight, scalable solutions.

“Semble indexes an average repo in ~250 ms and answers queries in ~1.5 ms, all on CPU, with 98% fewer tokens than grep+read.”

— Semble team

“Our benchmarks show an NDCG@10 of 0.854, comparable to code-specialized transformer models.”

— Benchmarks conducted by Semble team

What Remains Unclear

Details about long-term stability, scalability across extremely large codebases, and performance in diverse programming languages are still emerging. It is also unclear how Semble performs in real-world, noisy code repositories or under heavy concurrent usage.

What’s Next

Next steps include broader adoption, integration into more agent frameworks, and performance benchmarking in varied environments. The Semble team may release updates to improve features, scalability, and user experience based on early feedback.

Key Questions

How does Semble compare to traditional grep?

Semble uses approximately 98% fewer tokens and provides faster, more precise code snippets than grep, especially for complex queries or large codebases.

Can Semble search remote repositories?

Yes, Semble can clone and index remote git repositories on demand, enabling searches across multiple remote sources.

Does Semble require external services or GPUs?

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

Which agents or tools can integrate with Semble?

It supports integration with Claude Code, Codex, Cursor, OpenCode, and any MCP-compatible agent, via MCP server or command-line interface.

What are the limitations or uncertainties now?

Performance in very large or complex repositories, long-term stability, and handling of noisy code data are still being evaluated. Further testing is needed for broader adoption.

You May Also Like

How to Choose Portable Laptop Desks

Learn how to select, assemble, and optimize your portable laptop desk for comfort and efficiency with this practical guide.

Plex Storage Planning: Bitrate Math for Your Library

I’m here to help you understand how bitrate affects your Plex storage needs and optimize your media library effectively.

Why Laptop Battery Health Drops So Fast (And How to Slow It Down)

When your laptop battery health drops quickly, understanding the causes and solutions can help you extend its lifespan effectively.

I Bypassed Adobe and Microsoft to Build a Git-Tracked Book Production Pipeline

A software developer has built a custom, Git-based book production pipeline, avoiding Adobe InDesign and Microsoft Word, to streamline formatting and publishing.