Semble Code Search

Fast, snippet-level code retrieval for coding agents with far less context consumption.

Source repo
MinishLab/semble
Stars
★ 6.5k
Last updated
4d ago v0.8.0
FARS reviewed
Nov 07, 2026 +3 new
License
MIT
Primary language
Python

At a glance

How it runs
CLIMCP serverLibrary / SDK
Works with
Universal · cross-platformCodex · Claude Code
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
uvPython package sembleHugging Face model download on first useShell / CLINetwork accessLocal filesystemMCP Server
Typical use
A developer using Codex, Claude Code, Cursor, or another MCP client wants an agent to answer implementation questions without repeatedly grepping and opening whole files.
Not a fit if
  • Teams that must install fully offline without pre-downloading the model
  • Users who need tests, examples, or .d.ts files ranked highly
  • Teams needing independent validation of the speed and token-savings claims
Maintenance
Commits in the last 30 dayslast commit 2026-11-28latest release v0.8.0 (2026-11-28)+3.0 ★/day over 7 days
Source review
71/100 · Some gaps

What does this agent do, and when should you use it?

Semble is a local code-search library for coding agents, delivered through a CLI, Python API, MCP server, and installable search sub-agent. It reads a local directory or clones a remote Git repository on demand, uses tree-sitter to create code-aware chunks, and retrieves them with Model2Vec embeddings, BM25, and Reciprocal Rank Fusion. Natural-language or code queries produce focused snippets with file paths and line ranges instead of entire files. Indexing and search run on CPU without API keys, a GPU, or an external inference service, although the default embedding model must be downloaded from Hugging Face on first use unless a compatible local model is supplied. The project's benchmark of roughly 1,250 queries across 63 repositories and 19 languages reports an NDCG@10 of 0.854 and about 99% lower token use than grep+read.

SembleIndex.from_path() reads a local repository, while SembleIndex.from_git() obtains a remote Git repository; content selection can cover code, docs, config, or combinations of them. Semble chunks files with tree-sitter, measures semantic similarity with static Model2Vec embeddings from potion-code-16M-v2, and runs BM25 to match identifiers and API names. It combines both rankings through Reciprocal Rank Fusion, then applies adaptive query weighting, definition boosts, identifier-stem matching, file-coherence boosts, and penalties for tests, compatibility or legacy shims, examples, and .d.ts declarations. search returns chunks exposing file_path, start_line, end_line, and content; find_related retrieves code similar to a specified file and line. Indexes are persisted after the first search and incrementally refreshed from file modification times, while the savings command estimates tokens avoided relative to reading the complete files containing returned chunks.

  1. A developer using Codex, Claude Code, Cursor, or another MCP client wants an agent to answer implementation questions without repeatedly grepping and opening whole files.
  2. An engineer onboarding to a large or unfamiliar repository needs concise, path-and-line-referenced results for concepts such as authentication flow or model persistence.
  3. A team writing development automation needs standalone repository search through semble search where no MCP session is available.
  4. A Python tooling author wants to embed code, documentation, and configuration retrieval through SembleIndex and follow a result with similarity search.
  5. A team that cannot use hosted inference APIs can prepare a compatible Model2Vec model locally and perform indexing and querying on CPU.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • uv tool install semble

How do you install or deploy this agent?

A shell and uv are required. Install the package and launch the interactive integration setup:

uv tool install semble
semble install

The installer detects coding agents including Codex, Claude Code, and OpenCode, then offers MCP, CLI instructions in AGENTS.md/CLAUDE.md, and a semble-search sub-agent. An unattended Codex example is:

semble install --agent codex --type mcp subagent --yes

The default setup needs network access on first use to download and cache the embedding model from Hugging Face. For offline runtime, set SEMBLE_MODEL_NAME to a local path containing a Model2Vec-compatible model. Remove installed integrations with semble uninstall.

How do you use this agent?

Search a local repository:

semble search "authentication flow" ./my-project

Search a remote repository:

semble search "save model to disk" https://github.com/MinishLab/model2vec

Limit results or select a different content class:

semble search "save model to disk" ./my-project --top-k 10
semble search "deployment guide" ./my-project --content docs
semble search "authentication flow" ./my-project --max-snippet-lines 10

Find code related to a known location:

semble find-related src/auth.py 42 ./my-project

For library use, create an index with SembleIndex.from_path("./my-project") and call index.search("save model to disk", top_k=3); each result exposes its path, start and end lines, and snippet content. MCP clients can invoke search or find_related with repo set to a local path or an HTTPS Git URL.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • The same retrieval engine is available through a CLI, Python API, MCP server, and dedicated sub-agent, covering several coding-agent workflows.
  • Its hybrid Model2Vec and BM25 retrieval, followed by definition boosts and code-aware noise penalties, addresses both conceptual questions and exact symbol searches.
  • Indexing and querying execute locally on CPU without API credentials, a GPU, or a hosted inference service.
  • Cached indexes refresh incrementally as files change, avoiding a complete rebuild during ordinary local MCP sessions.
  • The published benchmark reports roughly 500 ms indexing for an average repository, approximately 1 ms queries, and about 99% fewer tokens than grep+read.
Limitations
  • The default configuration requires a first-use download from Hugging Face; a fully offline installation must supply a compatible Model2Vec model through SEMBLE_MODEL_NAME.
  • Installation depends on uv, and the selected MCP, instruction-file, or sub-agent integration must be configured for each coding client.
  • Retrieval reflects Semble's chunking and ranking policy; tests, examples, legacy or compat paths, and .d.ts files may rank lower even when they matter to a particular investigation.
  • The speed, quality, and token-efficiency claims come from the project's own benchmark and estimation method, with no independent production validation supplied.
  • Saved indexes, usage statistics, and the Hugging Face model consume local storage; remote-repository search also requires network access and clones repositories on demand.

How does this agent compare with similar options?

Against grep+read, Semble returns selected snippets rather than reading complete matching files. Its benchmark reports about 99% fewer tokens on average and 97% recall at roughly 2,000 tokens, versus 85% recall for grep+read with a 100,000-token context. Against the 137M-parameter CodeRankEmbed model, the project reports comparable retrieval quality while indexing about 220 times faster and querying about 17 times faster. These figures are all from the project's described benchmark.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Semble Code Search This agent 71 · Some gaps CLIFree ★ 6.5k 4d ago Python Codex · Claude Code
XERJ 65 · Some gaps CLIFree ★ 23k 4d ago Rust Claude Code
GraphMind Code Graph 55 · Major gaps Desktop appFreemium ★ 219 2d ago Rust Claude Code · Claude.ai
Graft Code Context Layer 52 · Major gaps CLIFree + model costs ★ 12k 14d ago TypeScript Codex · Claude Code · OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
71/ 100 5-point scale 3.6 / 5
This review covers the source as of Nov 07, 2026. The project has shipped 3 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 18/29
Reliability 9/14
Adaptability 15/18
Convention 14/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust18 / 29 · 3.1/5

The CLI/MCP searches the specified local repository by default and returns file paths and code snippets. The docs explain indexing, caching, ignore rules, model downloads, and cleanup, making the data flow fairly clear. Remote Git URLs are cloned on demand and first use downloads a model from Hugging Face; the sample shows no dedicated sensitive-data handling guidance, so that criterion loses points. The installer supports interactive confirmation and a --yes bypass, and uninstall is documented, but the supplied files do not show the configuration write and recovery implementation. Dependencies have version bounds, but no vulnerability audit evidence is provided. License and author details are clear, while publisher identity is unverified, so attribution is not fully established.

Reliability9 / 14 · 3.2/5

The README, CLI, and installation guide are broadly consistent about search, caching, and MCP use. Dependency ranges are bounded, MCP is an optional extra, and the CLI reports when MCP dependencies are missing. It gives explicit errors for missing paths and unresolved code locations and warns when cache saving fails. The supplied files do not cover every failure case, so these criteria retain deductions.

Adaptability15 / 18 · 4.2/5

The README, skill, and installation guide identify coding agents as the audience and show natural-language, symbol, code, documentation, configuration, and multi-repository searches. Capability boundaries are visible from the CLI/MCP tools and content types, but the skill broadly recommends using Semble before Grep/Glob/find for code location; although it reserves grep for finding every literal occurrence, the trigger boundary could be more precise. The project declares support for several agents and Python 3.10–3.13, and describes CPU-local operation; the README also explains remote model downloads and configurable caching.

Convention14 / 18 · 3.9/5

The README organizes quickstart, CLI, MCP, installation, benchmarks, implementation, and licensing. The installation guide covers automated and manual setup for many agents, upgrades, uninstall, and extensive examples. Naming is consistent across the CLI, MCP, and skill, and the MIT license file is complete. setuptools_scm manages versions dynamically, and installed configurations pin the current version with upgrade instructions. The sample has no clear changelog and does not establish maintenance responsibility or support commitments, so those criteria lose points.

Effectiveness10 / 13 · 3.8/5

The CLI defaults to JSON, offers text output, and supports result-count and snippet-length controls; the skill and README provide usable search and related-code examples. The hybrid semantic and lexical retrieval design and token, speed, and quality claims are accompanied by benchmark documentation, but the sample contains only a summary and chart references, not enough underlying material to verify the results. First-use model download, indexing, and caching also have startup and storage costs, so value and cost-benefit do not receive full marks.

Verifiability5 / 8 · 3.1/5

The README gives concrete feature, installation, storage, and algorithm descriptions; the CLI source supports some error-handling and output claims, while pyproject.toml, the license, and CI configuration corroborate package metadata, licensing, and project declarations. Benchmark methodology points to a separate document that is not included in the sample, and this review did not execute the product. Documentation and source corroboration is therefore incomplete, so these criteria do not receive full marks.

Risks and how to mitigate them
  • First use requires a network download of the Hugging Face model; searches using remote Git URLs also clone repositories on demand. Check that the target repository and local cache location fit your data-handling requirements.
  • The skill recommends Semble first for locating code; for every occurrence of a literal string, the skill itself recommends using grep.
Evidence confidence: Low Reviewed Nov 07, 2026 Reviewed revision bb746c9c7992 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/semble.svg)](https://followagents.com/en/agents/semble)
<a href="https://followagents.com/en/agents/semble"><img src="https://followagents.com/badge/semble.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.8.0
    Release notes excerpt
    What's Changed * fix: honor .git/info/exclude at the search root by @nitayk in https://github.com/MinishLab/semble/pull/330 * chore: Release 0.8.0 by @Pringled in https://github.com/MinishLab/semble/pull/335 New Contributors * @nitayk made their first contribution in https://github.com/MinishLab/semble/pull/330 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.4...v0.8.0
    View on GitHub ↗
  2. v0.7.4
    Release notes excerpt
    What's Changed * feat: update model to blink-code-16m by @stephantul in https://github.com/MinishLab/semble/pull/332 * feat: update blink to int8 by @stephantul in https://github.com/MinishLab/semble/pull/333 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.3...v0.7.4
    View on GitHub ↗
  3. v0.7.3
    Release notes excerpt
    What's Changed * fix: Fall back to in-process chunking when worker pool fails by @Pringled in https://github.com/MinishLab/semble/pull/326 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.2...v0.7.3
    View on GitHub ↗

FAQ

Does Semble require an API key or paid model provider?
No. Indexing and search run locally on CPU without an inference API, although the default model requires a one-time download from Hugging Face.
Which files does it search?
It searches code by default and can target docs, config, or all supported content. It combines .gitignore and .sembleignore rules and always skips common non-source directories such as node_modules, .venv, dist, build, and __pycache__.
Must the index be rebuilt manually after code changes?
Normally no. Semble incrementally reindexes added, removed, or modified files using modification times. A full rebuild occurs when indexing settings such as the model, chunking, or cache format change.
Can it run in an isolated network environment?
Yes, if a Model2Vec-compatible model is prepared locally and selected with SEMBLE_MODEL_NAME. Searching remote Git URLs still requires network access.
What data is stored locally?
Semble keeps indexes and token-savings statistics in the operating system's cache directory, while its model uses the Hugging Face cache. SEMBLE_CACHE_LOCATION changes the Semble cache path, and semble clear subcommands remove cached data.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts