
townsendmerino/ken
Database managementこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
エージェントの高速ハイブリッドコード検索。 ピュア・ゴー、MCP対応のMCP対応のコンビネーション.
概要
Pure Go、単一静的なバイナリ、MinishLab/sembleとMCP互換のドロップイン - 同じツールスキーマ、同じ出力フォーマット、Goバイナリに交換された手順をインストールします。 ken は BM25 lexical + Model2Vec の semantic embeddings + RRF の融合 + コード-aware reranker の港で、 semble の search.py + rankings/*.py から移植された retrieval アルゴリズム。 - — アセンブリの 1,251 クエリのベンチマーク、および grep の ~99.9% 対 — エージェントを grep + Read (4,120 対 189,773 の NL クエリ上のメディアトークン — 同じデフォルトハイブリッドモードで測定)。 「これに答えるチャンクを見つける」ために、1〜2のオーダー・オブ・マグニチュード・トークンは、近距離リコールで勝ちます。 (Reproduce: docs/BENCH.md.) - ピュア・ゴー、cgo、風邪の開始のPythonのインタープリター無し、索引付けのGIL無し。 Linux/macOS/Windows (amd64/arm64) へのクロスコンパイルは無料で使用できます。 - 同じ検索/find 関連の MCP ツールスキーマと同じマークダウン文字列のワイヤ形式 - コマンドを交換します: パスと既存のエージェントは変更されません.
概要(AI 翻訳)
エージェントのハイブリッドコード検索。 Pure Go、単一静的なバイナリ、MinishLab/sembleとMCP互換のドロップイン - 同じツールスキーマ、同じ出力フォーマット、Goバイナリに交換された手順をインストールします。
ken は BM25 lexical + Model2Vec の semantic embeddings + RRF の融合 + コード-aware のリランサーの港で、連鎖の [search.py + ranking/*.py から verbatim を移植しました。
なぜ ken
- デフォルト(hybrid)モードで** — 0.967 NL / 0.995 シンボル の semble の 1,251 クエリのベンチマーク、および grep の ~99.9% の対、エージェント**~46× 少数のトークン** よりも [[T2] (4,120 対 189,773 は NL のクエリのトークンは、同じデフォルトハイブリッドモードで測定)。 「これに答えるチャンクを見つける」ために、1〜2のオーダー・オブ・マグニチュード・トークンは、近距離リコールで勝ちます。 (Reproduce: [
docs/BENCH.md]]).) - 単一静的なバイナリ。 ピュア・ゴー、cgo なし、Python のインタープリターはコールド・スタートなし、GIL はインデックス化しません。 Linux/macOS/Windows (amd64/arm64) へのクロスコンパイルは無料で可能です。
- 組み立て用のドロップイン。 同じ[
search/[find_related]]] MCPツールスキーマと同じマークダウン文字列のワイヤ形式 - [command:]]パスと既存のエージェントは変更されません.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
ken
ken is code search built for coding agents: a pure-Go, single-binary engine that runs a 16M-parameter Model2Vec model in-process, with no cgo, Python, vector database, or API key. On ContextBench (53 SWE-bench Pro tasks, 8k-token budget), its default hybrid mode covered 52% of the relevant files versus 29% for BM25 alone, and on tasks where a gold line was retrieved reached the first gold line in about 40% fewer tokens. Warm queries take a millisecond or two, and with KEN_ANN=flat-i8 the watched dense vector store uses about 80% less memory.
Fast hybrid code search for agents. Pure Go, single static binary, drop-in MCP-compatible with MinishLab/semble — same tool schemas, same output format, install steps swapped to a Go binary.
ken is a Go port of semble: BM25 lexical + Model2Vec semantic embeddings + RRF fusion + a code-aware reranker, with the retrieval algorithm ported verbatim from semble’s search.py + ranking/*.py.
Why ken
- ~97% recall@10 in the default (hybrid) mode — 0.967 NL / 0.995 symbol on semble’s 1,251-query benchmark, vs grep’s ~99.9% — while costing an agent ~46× fewer tokens than
grep + Read(4,120 vs 189,773 median tokens on NL queries — measured in the same default hybrid mode). For “find the chunk that answers this,” that’s a 1–2 order-of-magnitude token win at near-parity recall. (Reproduce:docs/BENCH.md.) - Single static binary. Pure Go, no cgo, no Python interpreter on cold start, no GIL on indexing. Cross-compiles to Linux / macOS / Windows (amd64/arm64) for free.
- Drop-in for semble. Same
search/find_relatedMCP tool schemas and the same markdown-string wire format — swap thecommand:path and existing agents work unchanged. - Local, CPU-only. Embedding inference, BM25, and fusion all run on the CPU. No API keys, no GPU, no vector DB, air-gapped friendly.
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
// ~/.cursor/mcp.json (or .cursor/mcp.json) — also .vscode/mcp.json with "servers"
{ "mcpServers": { "ken": { "command": "/absolute/path/to/ken-mcp" } } }