MinishLab/semble

Fast and Accurate Code Search for Agents. Uses 99% fewer tokens than grep+read

What it solves

Semble solves the problem of "token bloat" and inefficiency when AI coding agents search through large codebases. Traditional methods like grep followed by reading entire files consume massive amounts of context window tokens and are slow. Semble provides a way for agents to instantly retrieve only the exact, relevant code snippets needed to answer a query, significantly reducing token usage and latency.

How it works

Semble uses a hybrid retrieval approach that runs entirely on the CPU without requiring GPUs or API keys:

  1. Chunking: It uses tree-sitter to split files into code-aware chunks.
  2. Hybrid Search: It combines semantic similarity (using static Model2Vec embeddings via the potion-code-16M-v2 model) with lexical matching (BM25) for identifiers and API names.
  3. Fusion and Reranking: Results are merged using Reciprocal Rank Fusion (RRF) and then reranked based on code-specific signals, such as boosting function definitions over references and penalizing noise like test files or legacy shims.
  4. Caching: Indexes are cached locally and updated incrementally as files change.

Who it’s for

It is designed for developers of AI coding agents (like Claude Code, Cursor, or Codex) and users of these agents who want to give their tools faster, more accurate, and more token-efficient access to local or remote repositories.

Highlights

  • Extreme Efficiency: Uses approximately 99% fewer tokens than the grep+read approach.
  • High Performance: Indexes average repositories in ~500ms and returns queries in ~1ms on CPU.
  • Zero Setup: No API keys, GPUs, or external services required.
  • MCP Integration: Works as a Model Context Protocol (MCP) server, allowing agents to call search as a native tool.
  • Flexible Search: Supports searching local paths, remote git URLs, and multiple repositories simultaneously.

Related

  • Dispatch
  • Project
  • Project
  • Project