AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Semble is a code search tool designed for agents that significantly reduces token consumption—by approximately 98%—while maintaining high accuracy. It enables instant code retrieval, runs entirely on CPU, and integrates easily with various agents, promising faster and more efficient code searches.

Semble, a new code search library built for AI agents, claims to reduce token usage by approximately 98% compared to traditional grep+read methods, while providing instant, accurate code retrieval on CPU without external dependencies.

Developed to serve as a drop-in tool for agents like Claude Code, Codex, and OpenCode, Semble indexes repositories in under a second and answers queries in about 1.5 milliseconds, all on CPU. It achieves this by returning only relevant code snippets, significantly reducing token consumption and increasing search speed.

According to the developer, Semble offers comparable retrieval quality to code-specialized transformer models, with a benchmark NDCG@10 score of 0.854. It supports local and remote repositories, and can run as an MCP server or be called directly from the shell, making it versatile for various workflows.

Why It Matters

This development matters because it addresses key limitations in code search efficiency and resource consumption. By drastically reducing token usage and enabling fast, local indexing and querying without external services or GPUs, Semble could improve productivity for developers and AI agents working with large codebases.

Its ability to integrate seamlessly with popular agents and run entirely on CPU makes it accessible and scalable, potentially transforming how code search is performed in AI-assisted development environments.

Amazon

code search tools for developers

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Traditional code search methods rely heavily on tools like grep, which read entire files and can be resource-intensive. Recent advances have included transformer-based models for more semantic searches, but these often require GPUs and are costly. Semble emerges as a lightweight, token-efficient alternative designed specifically for agent workflows, with benchmarks indicating high accuracy and speed.

It is part of ongoing efforts to improve AI agent capabilities in software development, with previous solutions often limited by resource demands or latency issues. Semble’s introduction marks a step toward more efficient, scalable code search tools tailored for AI integration.

“Semble returns only the relevant chunks, using ~98% fewer tokens than grep+read, and indexes a repo in under a second.”

— Semble developer

“Semble achieves a NDCG@10 score of 0.854, on par with specialized transformer models, at a fraction of the size and cost.”

— Benchmarks report

Amazon

AI code search library

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

Details about long-term stability, scalability across very large codebases, and compatibility with all agent types remain to be fully tested. It is also unclear how Semble performs in extremely complex or highly dynamic repositories, or how it compares in real-world, large-scale deployments.

Amazon

CPU-based code search software

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include broader adoption testing, integration with more agent workflows, and potential enhancements to support larger repositories or additional programming languages. Developers are expected to release updates based on early user feedback and real-world use cases.

Amazon

developer productivity tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does Semble reduce token usage by 98%?

Semble returns only the relevant code snippets needed for a query, avoiding reading entire files and thus drastically cutting down the number of tokens processed and transmitted.

Can Semble replace traditional grep or code search tools?

Yes, especially in AI agent workflows where token efficiency and speed are critical, though for exhaustive literal searches, grep may still be used.

Does Semble require external services or GPUs?

No, it runs entirely on CPU and requires no external API keys or GPU resources, making it accessible and easy to deploy locally.

What agents or environments does Semble support?

It supports integration with Claude Code, Codex, Cursor, OpenCode, and other MCP-compatible agents, via command-line or configuration setup.

What are the limitations or future improvements planned?

Long-term stability, support for larger repositories, and performance in complex codebases are still being evaluated, with future updates expected to address these areas.

You May Also Like

Blockchain Security: How Consensus Works

Discover how consensus mechanisms safeguard blockchain security and why understanding their inner workings is essential to appreciating blockchain’s resilience.

Show HN: Gaussian Splat of a Strawberry

A new visualization technique called Gaussian Splat has been used to create a detailed 3D rendering of a strawberry from 90 perspectives, showcasing advances in image processing.

How AI Is Transforming Everyday Life

Discover how AI is transforming everyday life and the surprising ways it’s making your daily routines smarter and more convenient.

Show HN: OneCLI – OSS Credential Gateway That Keeps Secrets Out Of AI Agents

OneCLI, an open source credentials management tool, debuts on Show HN, offering a secure way to keep secrets out of AI agents.