Semble open source release: AI programming agent code search tool, saving 98% tokens than grep
Semble is an open source code search library specially built for AI programming agents. Through indexing and natural language retrieval, agents such as Claude Code and Codex can find the required code segments within ~250ms. Each query only consumes 2% of the tokens of the traditional grep+read method. Obtained 1359 GitHub Stars and supports MCP protocol.
Core conclusion
On May 17, 2026, the MinishLab team open sourced Semble — a code search library designed for AI programming agents on Hacker News. With 1,359 Stars and 208 HN points, Semble has solved a core pain point faced by all AI programming tools: Agent is too expensive to find code.
In the traditional process, the AI Agent first uses grep or ripgrep to find keywords, and then reads the files one by one to understand the context. Semble's approach is to replace brute-force search with semantic embedded indexes. Each query only returns exact matching code fragments. Token consumption is reduced by 98%, and latency is reduced from seconds to milliseconds.
Key Points
- Published: 2026-05-17 (Hacker News Show HN)
- Target Users: Developers who use AI programming agents such as Claude Code, Codex, Cursor, OpenCode, etc.
- Core Capability: Natural language code search ("How to achieve authentication?"), CPU running, no GPU/API Key required
- Integration methods: MCP Server, bash tool, Python API three methods
Background: Token dilemma of AI programming agent
The code search capabilities of an AI programming agent directly determines the quality and cost of its work. There is a fundamental contradiction in the current mainstream solutions:
- grep/ripgrep is accurate but shallow: After finding the keyword, the Agent must read the entire file to understand the context, and a single search may consume thousands of Tokens.
- Code-specific model is accurate but expensive: Code-specific Transformer requires GPU, API Key, and slow indexing
The developers of Semble found that the Agent's usual code search patterns are: "Find where this logic is" and "How is this function called?" - not exact keyword matching, but semantic understanding.
Semble adopts a two-stage strategy:
| Dimensions | Traditional grep+read | Semble |
|---|---|---|
| Search method | Keyword regular matching | Natural language semantic search |
| Index Speed | No indexing (file-by-file scan) | ~250ms to build embedded index |
| Query Latency | ~seconds (depending on the number of files) | ~1.5ms (CPU running) |
| Token consumption | N files × number of Tokens per file | Return only exact matching fragments |
| Hardware Requirements | Any | CPU is enough, no GPU dependency |
| External Services | None | No API Key required |
| Search quality | Keyword hits are accurate | NDCG@10=0.854 (comparable to the code-specific model) |
Why this is important to the AI programming ecosystem
Semble solves the efficiency bottleneck of AI programming Agents - not that the model capabilities cannot keep up, but that the way the Agent obtains context is too expensive.
Specifically, when an Agent needs to understand a code base, the traditional approach is:
- grep finds all files containing keywords → consumes a small amount of Tokens
- Read content file by file → hundreds to thousands of Tokens per file
- Use context window to splice understanding → When the window is full, the Agent forgets the previous
Semble's index + semantic matching solution turns "read the entire file" in step 2 into "read matching fragments". In benchmark tests, Semble indexed 200 times faster** and queried 10x faster than the code-specific Transformer, maintaining 99% retrieval quality.
Three integration methods
The biggest highlight of Semble is that it has extremely low integration costs - almost zero changes to the existing AI Agent workflow.
MCP Server (recommended for Claude Code users)
claude mcp add semble -s user -- uvx --from "semble[mcp]" semble,Claude Code Semble,。
bash / AGENTS.md( Codex、OpenCode )
pip install sembleAGENTS.md CLAUDE.md snippet,Agent Semble , grep。
Python API()
from semble import Semble
engine = Semble()
engine.index_directory("./my_project") # ~250ms
results = engine.search("authentication flow") # ~1.5msSemble AI Claude Code、Codex For users who use CLI、Cursor、OpenCode 。 MCP (Model Context Protocol) , MCP 。
n8n、LangGraph and other tools to build automated workflows, Semble can be used as an embedded module to integrate into larger automation links - allowing the AI Agent to be accurate and efficient when it needs to read code.
Reference material
Next action
The emergence of Semble marks that the tool chain of AI programming agents is moving from "usable" to "efficient". If you are already using Claude Code or Codex to handle projects, you might as well try integrating Semble into your workflow:
Topic hub
AI Agent Tutorials & Workflow Guides
Evergreen how-tos for coding agents, content pipelines, and n8n automation—linked to news context and real earn cases.
Explore AI Agent Tutorials & Workflow Guides →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services