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

TL;DR

Semble is a code search tool designed for AI agents that drastically reduces token usage—by about 98%—while maintaining high accuracy. It indexes repos quickly and enables instant code retrieval without external services. This could significantly improve agent performance and cost-efficiency.

Semble, a new code search library tailored for AI agents, claims to reduce token consumption by approximately 98% compared to traditional grep+read methods, enabling faster and more efficient code retrieval without external dependencies.

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.

Developed to serve agents such as Claude, Codex, and Cursor, Semble indexes entire codebases in around 250 milliseconds and answers queries in approximately 1.5 milliseconds, all on CPU without requiring API keys, GPUs, or external services. It achieves these speeds while maintaining a retrieval quality comparable to specialized transformer models, with a benchmark NDCG@10 score of 0.854.

Semble can be integrated as an MCP server or used via command-line interfaces, supporting local paths or remote git repositories. It offers features like semantic code search, related code discovery, and automatic re-indexing on file changes. The tool emphasizes token efficiency, returning only relevant code chunks, which significantly reduces token counts during searches.

Why It Matters

This development matters because it addresses key challenges in AI code understanding: reducing token usage lowers costs and improves speed, enabling more scalable and responsive code search within AI agents. Its independence from external services and GPU reliance makes it accessible for local deployment, broadening its potential use cases.

By maintaining high accuracy with minimal token consumption, Semble could enhance the performance of AI-powered development tools, improve developer workflows, and reduce operational costs in environments where token limits and latency are critical.

Products Worth Considering

Apple Watch Series 10 GPS 46mm with Silver Aluminum Case and Blue Cloud Sport Loop

Apple Watch Series 10 GPS 46mm with Silver Aluminum Case and Blue Cloud Sport Loop

Bose QuietComfort Headphones (2nd Gen), Wireless Over-Ear Noise-Cancelling Headphones, Black

Bose QuietComfort Headphones (2nd Gen), Wireless Over-Ear Noise-Cancelling Headphones, Black

LG UltraGear 27-Inch QHD OLED Gaming Monitor, 240Hz, 0.03ms, G-SYNC Compatible, FreeSync Premium Pro, HDMI 2.1, Black

LG UltraGear 27-Inch QHD OLED Gaming Monitor, 240Hz, 0.03ms, G-SYNC Compatible, FreeSync Premium Pro, HDMI 2.1, Black

As an affiliate, we earn on qualifying purchases.

Background

Traditional code search methods like grep are simple but can be inefficient and token-heavy when integrated into AI workflows. Recent advances have focused on transformer-based models for code retrieval, but these often require significant computational resources. Semble emerges as a lightweight alternative, leveraging efficient indexing and retrieval techniques. Its announcement follows ongoing efforts to optimize AI tooling for code comprehension and search, especially for agent-based applications.

“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 development team

“Semble achieves a NDCG@10 score of 0.854, on par with code-specialized transformer models.”

— Benchmark source (unspecified)

What Remains Unclear

It is not yet clear how Semble performs across diverse codebases or in real-world agent deployments, and whether there are limitations in certain programming languages or project sizes.

What’s Next

Next steps include broader testing of Semble in various environments, integration with more agents, and potential open-source adoption. Further benchmarks and user feedback will clarify its effectiveness and limitations.

Key Questions

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

Semble returns only the relevant code chunks needed for a query, using approximately 98% fewer tokens than traditional grep+read methods, by leveraging efficient indexing and semantic retrieval techniques.

Can Semble be used with any codebase or programming language?

Semble supports local directories and git repositories, but its performance across different languages and project types remains to be fully tested. It is designed to be language-agnostic, relying on indexing and semantic search.

Does Semble require external services or GPUs?

No. Semble runs entirely on CPU, with no API keys, GPUs, or external dependencies needed, making it accessible for local deployment.

How does Semble compare to transformer-based code search models?

According to benchmarks, Semble offers similar retrieval quality (NDCG@10 of 0.854) but at a fraction of the size and computational cost, with much faster indexing and querying times.

What are the next steps for developers interested in using Semble?

Developers can install Semble via pip or uv, integrate it into their agents or scripts, and monitor token savings and performance improvements as they adopt the tool.

You May Also Like

Training an LLM in Swift, Part 1: Taking matrix mult from Gflop/s to Tflop/s

A developer demonstrates how to optimize matrix multiplication in Swift, moving from Gflop/s to Tflop/s, for faster training of large language models on Apple Silicon.

Where Are the Vibecoded Photoshops?

Despite widespread claims, no verified vibecoded complex artifacts like Photoshops or software tools have emerged, raising questions about the technology’s actual capabilities.

10 Best AI Image Generators For Your Creative Workflow In 2027

A source-based comparison of 10 AI image generators, their stated strengths, and what creators should verify before choosing one in 2027.

Google Declaring War on the Web

Google shifts focus from traditional links to AI-generated responses, risking a monopolized, controlled web environment. What this means for users and creators.