news.volyx.in

Show HN: Semble – Code search for agents that uses 98% fewer tokens than grep (github.com)

445 points by Bibabomas · 104 days ago · 151 comments on HN

Article summary

Semble is a code search library built for agents, allowing them to search codebases efficiently and accurately. It uses a combination of tree-sitter, Model2Vec embeddings, and BM25 to return relevant code snippets, using 98% fewer tokens than grep+read. Semble can be used as a CLI tool, an MCP server, or a Python library, and it supports multiple coding agents. The library is designed to be fast, accurate, and token-efficient, making it suitable for use in various development workflows.

Main themes

  • code search efficiency
  • agent trust and token savings
  • benchmarking and methodology
  • non-coding document support
  • LSP and ripgrep alternatives
  • RTK issues and limitations
  • proxy-based solutions
  • human use cases for semantic code search

What commenters say

  • Some commenters question the effectiveness of Semble in saving tokens, citing issues with the benchmarking methodology and the potential for agents to retry or reread commands, negating the token savings.
  • Others express interest in using Semble with non-coding documents, such as API docs or AI memory files, and the developers are actively investigating this use case.
  • There is a discussion about the challenges of getting agents to trust the results of Semble and stop searching, with some suggesting that measuring the full agent loop is more important than just the search output.
  • A few commenters mention that they have had success using other tools, such as LSP or ripgrep, to improve the efficiency of their agents, and that Semble may not be the best solution for everyone.
  • Some users report issues with RTK, a related tool, such as getting stuck in loops or experiencing decreased performance, and are skeptical about the benefits of using Semble.
  • Others suggest that using a proxy to intercept grep calls and return results from a more efficient search tool could be a viable solution to improve token savings and agent trust.
  • The importance of token savings is emphasized, but it is also noted that agent trust and stopping the search loop are crucial factors to consider.
  • There is a mention that semantic code search can be useful not only for agents but also for humans, and that Semble can be used to quickly index and search large monorepos.