WayToClawEarn
Medium impactHacker News / GitHub

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.

WayToClawEarn EditorialPublished May 18, 2026Updated Aug 8, 2026

Editorial review of public sources · AI-assisted drafting. How we work · Original source

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:

DimensionsTraditional grep+readSemble
Search methodKeyword regular matchingNatural language semantic search
Index SpeedNo indexing (file-by-file scan)~250ms to build embedded index
Query Latency~seconds (depending on the number of files)~1.5ms (CPU running)
Token consumptionN files × number of Tokens per fileReturn only exact matching fragments
Hardware RequirementsAnyCPU is enough, no GPU dependency
External ServicesNoneNo API Key required
Search qualityKeyword hits are accurateNDCG@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:

  1. grep finds all files containing keywords → consumes a small amount of Tokens
  2. Read content file by file → hundreds to thousands of Tokens per file
  3. 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.

Semble

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)

terminal
claude mcp add semble -s user -- uvx --from "semble[mcp]" semble

,Claude Code Semble,。

bash / AGENTS.md( Codex、OpenCode )

terminal
pip install semble

AGENTS.md CLAUDE.md snippet,Agent Semble , grep。

Python API()

python
from semble import Semble
engine = Semble()
engine.index_directory("./my_project")  # ~250ms
results = engine.search("authentication flow")  # ~1.5ms

Semble AI Claude CodeCodex For users who use CLICursorOpenCodeMCP (Model Context Protocol) , MCP 。

n8nLangGraph 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:

View source →

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.