
Gnt
io.github.gnt-ai由 GitHub 帳號 gnt-ai 發布v0.6.0更新於 Nov 2, 2026
Git-native policy layer for AI agents: check_action verdicts against rules approved via PR.
概覽
Git 原生的政策層:讓助理在執行動作前,對照團隊經 PR 核准的規則檢查,取得允許、阻擋或需人工處理的裁決。
- 可以做什麼
- 對照已核准規則檢查所描述的動作,回傳 allowed、blocked 或 needs_human 裁決,並附上引用規則與一行理由
- 以語意搜尋已核准規則,可依標籤篩選
- 依 id 取得單一已核准規則及其來源資訊(核准者、時間、引用來源)
- 列出組織已編譯的技能包版本,並取得某個技能包的清單與檔案列表
- 適用情境
- 當代理要執行退款、刪除、傳訊息給客戶等有後果的動作,且希望每次都由團隊透過合併 PR 核准的規則把關並留下可追溯紀錄時使用。
- 執行需求
- 遠端 MCP 端點 api.gntai.dev。搭配的 CLI 需 Node 22.13 以上版本,需透過 gnt login 登入並在本機儲存 API 金鑰,並連接一個 GitHub 儲存庫放置規則。可選變數 GNT_API_URL、GNT_WEB_URL、GNT_CONFIG_DIR 可變更端點與設定目錄。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gnt,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.gnt-ai%2Fgnt/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"gnt": {
"type": "http",
"url": "https://api.gntai.dev/mcp"
}
}
}README
Run the setup below once and every agent your team runs has a git-native rulebook it has to check over MCP before it acts, approved the same way your code already is: a merged pull request.
- Rules live in your repo as files and ship through normal PRs, not a dashboard click.
- Agents call
check_actionover MCP before anything risky (a refund, a delete, a message to a customer) and get back an allow/block/escalate verdict. - Every rule traces back to the git file and the PR that approved it, so "why did the agent do that" always has a paper trail.
Prefer not to run any of this yourself? The hosted version at gntai.dev does the same thing without you standing up a Postgres instance.
Get started (30 seconds)
Try it with Docker first
To see a real check_action response before installing Node or npm, clone
the repository and run the Docker-only demo:
It builds the full local stack in an isolated gnt-demo Compose project,
seeds an approved refund rule, calls check_action, and prints a curl command
you can run again. Without an Anthropic key the real fail-closed path returns
needs_human; pass GNT_DEMO_ANTHROPIC_API_KEY=sk-ant-... ./demo.sh to opt in
to the model's grounded policy verdict. The demo uses deterministic local embeddings and
throwaway localhost-only secrets, so it does not need a ZeroEntropy key.
[gnt connect's interactive picker, and what gnt prebrain's draft-PR output looks like]
Nothing for
gnt prebrainto scan yet? Rungnt initfirst — it scaffoldsrules/locally with a couple of example rule files so there's something real to look at and edit, and points you atgnt prebrain --starter-packsfor a curated pack to start from instead.
That merge lands a rule file in your connected repo, shaped like this:
Each file is plain markdown with YAML frontmatter:
See it in action
There's no captured transcript to show yet (see the gap noted at the bottom of this README).
Here's the actual response shape a check_action call returns, straight from the tool's
contract:
verdict is one of allowed, blocked, or needs_human. needs_human is the fail-closed
default: no approved rule covers the action, retrieval failed, or the check couldn't complete.
It never guesses.
What it does
One MCP endpoint, five tools:
Prerequisites
Install
gnt needs Node >=22.13. If the CLI fails to start with a version error, update Node first and confirm with
node --version.
Common commands
Config
Privacy
- No analytics or telemetry dependency in the CLI or the web app.
gnt prebrain's default extraction mode is cloud, not on-device: your source text goes straight to Anthropic's API (or Vercel AI Gateway with zero-data-retention, if you configure it), never to gnt's own servers. Fully on-device extraction needs--mode localagainst a local Ollama daemon.- The extracted rule candidates still get sent to gnt's API to open the PR. Raw source text stays off gnt's servers in cloud mode; the resulting rule text doesn't.
- Rules live in your connected GitHub repo and in gnt's own database. The MCP tools read from gnt's store, not by cloning your repo on every call.
- Self-hosting:
apps/apionly sends error data to Sentry if you setSENTRY_DSNyourself. Leave it unset and nothing goes out.
Team setup
- Who writes rules: anyone with access to your connected repo, either through
gnt prebrain(batch-extracted from real sources) orgnt review(hand-proposed). - How approval works: merging the PR is the approval. There's no separate publish step.
- What gets committed:
rules/<rule-id>.mdfiles with the frontmatter shown above and a plain markdown body. - Catching a malformed rule before it's reviewed:
gnt rules lintchecks a rule file's frontmatter locally, andgnt-ai/gnt/.github/actions/lint-rulesruns the same check as a CI step on your rules repo's own PRs, so a bad frontmatter fails the PR instead of the review.
Troubleshooting
Self-hosting:
gnt login's browser step has nowhere to land.gnt loginopens a browser to a/cli-loginpage and polls the API for the resulting key — that page is served by the hosted product's web app, which isn't part of this repo. There's no CLI-only login flow (device code or otherwise) today, and nogntcommand to set a key manually. Self-hosting this stack currently means building your own thin frontend for that one route (it just needs to complete the sign-in flow and hand the CLI a key). This is a real, open gap in the self-host path, not a config issue — closing it properly means adding a CLI-only login flow.
ValueError: refusing to start: these settings still have their .env.example placeholder value...Achange-me-...string is still sitting inapps/api/.env. The error names every offending field; generate a real value for each and retry.
storefails to start withGNT_STORE_INTERNAL_API_SECRET is not set.apps/store/.envwasn't filled in, or wasn't picked up. Confirm the file exists at that exact path, not still named.env.example.
Every store-to-api call gets rejected with 401 or 403, even though both services are up.
STORE_INTERNAL_API_SECRET/APPROVAL_SIGNING_SECRETinapps/api/.envdon't byte-for-byte matchGNT_STORE_INTERNAL_API_SECRET/GNT_APPROVAL_SIGNING_SECRETinapps/store/.env. This fails closed by design. Regenerate both pairs so the two files agree.
A rule fails to save with an embedding or rerank error.
apps/store/.envis missingZEROENTROPY_API_KEY, or it's still empty. Get a real one from zeroentropy.dev.
Full command reference
Shell completion
Learn more
- Self-hosting walkthrough, including the production-hardening path:
docs/self-hosting/README.md - Security policy:
SECURITY.md
Self-hosting is a first-class, fully supported path — Apache-2.0 from day one, run it on your own infra with your own keys, or use the hosted version at gntai.dev. The homepage FAQ and the self-hosting docs both describe this same path; there is no "not today" caveat.
License
Copyright © 2026 gnt.ai. Licensed under Apache-2.0 — see LICENSE for the terms and NOTICE for the trademark rule on forks.
Why is this free?
Self-hosting gnt costs you nothing, forever — clone it, run docker compose up, bring your own keys. What we sell is the part self-hosting doesn't give you: hosting at gntai.dev, managed OAuth connectors (GitHub, Slack, Linear, Notion, Zendesk — no app-approval process on your end), and usage-based AI features. If you'd rather run it yourself, that's a fully supported, fully free path, not a crippled trial of the real thing.
Contributing
See CONTRIBUTING.md for dev setup and how to open a PR. Every commit needs a Signed-off-by trailer (git commit -s), the Developer Certificate of Origin instead of a CLA. No separate form, just the flag.
Thanks to everyone who's sent a PR:
[gnt contributors]來源:README.md,提交 59a743d
工具
0版本歷史
1- v0.6.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分