gut

io.github.Kungie由 GitHub 帳號 Kungie 發布v0.8.2更新於 Oct 24, 2026

Judgment calls on small, cheap models: is this spam, which team, how urgent. YES, NO or UNSURE.

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理用小型模型對大量項目做便宜的判斷:是/否、分類與評分,並支援明確的「不確定」結果。

可以做什麼
對項目回答是/否問題,例如留言是否為垃圾訊息、任務是否完成,信心不足時給出「不確定」。把項目歸入固定類別之一,例如工單屬於哪個團隊。依有序量表為項目評分,例如急迫程度。一次對大量項目批次執行同一判斷,具備快取與並行處理。可選擇或串接後端,從 TypeSafe 的 Jev 到本機或 OpenAI 相容模型。
適用情境
適合助理需要對大量文字、檔案、提交或搜尋結果做分流或篩選,而規則太脆弱、前沿大型模型又太慢或太貴的情境。較適合簡短、定義明確的判斷問題,而非開放式生成。
執行需求
透過 stdio 在本機執行,通常以 uvx 從 gutfeel-mcp 這個 PyPI 套件啟動。需透過 GUT_BACKEND 設定後端;遠端後端需要 TYPESAFE_API_KEY 或 OPENROUTER_API_KEY,ollaya、ollama 或 openai 後端還需要 GUT_BASE_URL 與 GUT_MODEL。本機後端需要 PyTorch 附加元件。
安裝前請注意
會把被判斷的文字傳送給所設定的後端,可能是 TypeSafe 或 OpenRouter 等第三方服務;使用本機後端可避免。API 金鑰以環境變數傳入。判斷具機率性,可能出錯,高風險決策應把「不確定」結果轉交人工。遠端後端依輸入計費。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 gut,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[gut]

[PyPI] [CI] [Downloads] [Glama MCP server]

Judgment calls as one line of Python — built for Jev, and running on any small model.

Try it in your browser → The site runs gut's local model in the page: no key, no server.

Your code keeps running into questions that aren't logic: Is this comment spam? Which team owns this ticket? How urgent is it? Is the agent's task done? Until now there were three answers:

  • Regex and keyword rules — free and instant, and wrong the moment someone phrases it differently.
  • A frontier LLM — understands anything, at seconds and cents a call, with prose to parse.
  • Train a classifier — cheap to run, once you have the labelled data, the pipeline and the week.

There is a fourth: a small model made for exactly these questions. TypeSafe AI's Jev answers typed questions directly — a probability for yes, a distribution over options, a score on a scale — with nothing to generate or parse, billed on input only. gut is built around it, and makes it a line of code:

python
import gut
gut.configure(backend=gut.JevBackend())   # or just set TYPESAFE_API_KEY
if gut.likely(comment, "is spam"):    hide(comment)

No prompt, no parsing, no threshold — and no model named at the call site.

Three questions

python
gut.likely(ticket, "is a bug report")                      # yes / nogut.classify(ticket, Team)                                 # which one — an Enumgut.rate(ticket, ["can wait", "this week", "right now"])   # how much

It knows when it doesn't know

A regex never hesitates, and neither does an LLM. gut can:

python
match gut.likely(email, "the customer threatens to cancel", ask_human=True):    case gut.YES:    escalate(email)    case gut.NO:     auto_reply(email)    case gut.UNSURE: send_to_a_person(email)

Say how careful to be in words — lean="yes", stakes="high" — and gut works out the thresholds.

A thousand subjects, one line

python
spam = gut.each(comments).likely("is spam")     # one decision per comment, in orderteams = gut.each(tickets).classify(Team)

Jev gets concurrent requests, a local model batched passes, and nothing already cached is asked twice. @gut.semantic does the same for several questions about one subject.

Jev first, any model

Jev is the model gut is designed around. It is not the only one: the model is configuration, and the same line runs unchanged on any of these.

python
gut.configure(backend=gut.JevBackend())                            # TypeSafe AI's Jevgut.configure(backend=gut.JevBackend.openrouter())                 # Jev, through OpenRoutergut.configure(backend=gut.JevBackend.ollaya("winnow:e4b"))         # open decision model, Ollayagut.configure(backend=gut.ZeroShotBackend())                       # NLI model, on your CPUgut.configure(backend=gut.TransformersBackend("Qwen/Qwen3-0.6B"))  # small LLM, on your machinegut.configure(backend=gut.OpenAICompatibleBackend(                 # Ollama, vLLM, llama.cpp    "qwen2.5:1.5b", base_url="http://localhost:11434/v1"))gut.configure(backend=gut.OpenAICompatibleBackend("gpt-4.1-nano")) # OpenAIgut.configure(backend=gut.OpenAIDecisionsBackend())                # OpenAI's Decisions API

Or several at once. Cascade asks the cheapest model first and passes on only what it is unsure of:

python
gut.configure(backend=gut.Cascade(    gut.ZeroShotBackend(),   # free and local: settles the obvious    gut.JevBackend(),        # sees only what the first could not))

Every answer is a model's own probabilities, never parsed from text, and decision.model names the model that gave it. Your own model can be a backend too: here is how.

Install

bash
pip install "gutfeel[jev]"           # + JevBackend: TypeSafe, OpenRouter or Ollayapip install "gutfeel[local]"         # + ZeroShotBackend and TransformersBackend (PyTorch)pip install gutfeel                  # core: any OpenAI-compatible server; FakeBackend for testspip install gutfeel-mcp             # + the MCP server, gutfeel-mcp

The package on PyPI is gutfeel (gut was taken); the import is plain import gut. No model at hand? gut.FakeBackend(answers={"is spam": 0.97}) answers from fixtures, for tests.

From a shell, and for agents

The big model thinks; the small one decides, fast. An agent with gut judges a thousand files, commits or search results in one command instead of reading each one itself:

bash
git ls-files | gut filter "retries failed requests" --read-files --max-cost 0.50claude mcp add gut --env TYPESAFE_API_KEY=your-key -- uvx gutfeel-mcp   # MCP Registry: io.github.Kungie/gutnpx skills add Kungie/gut --skill gut     # teaches a coding agent when to reach for it

Docs

The documentation, one page per idea: Getting started · Backends · Knowing when it doesn't know · Asking everything at once · Async · Exact costs · Caching and observability · Command line · MCP server · Honest limitations. examples/ runs the same code on every backend.

Status and license

Pre-1.0, Apache-2.0. Every code block in these docs runs in the test suite · contributing

來源:README.md,提交 94bdc51

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.8.2最新Oct 13, 2026
  2. v0.8.1Oct 7, 2026
  3. v0.8.0Sep 29, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分