{"slug": "show-hn-gnt-a-company-brain-ai-agents-check-before-acting", "title": "Show HN: Gnt, a company brain AI agents check before acting", "summary": "Gnt, a new tool from gntai.dev, lets companies encode AI agent guardrails as git-native rule files that agents check over MCP before acting, returning allow, block, or needs_human verdicts. The rules are approved via merged pull requests, providing a paper trail for every agent decision. Gnt offers a CLI and hosted version, with the CLI requiring Node >=22.13.", "body_md": "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**.\n\n- Rules live in your repo as files and ship through normal PRs, not a dashboard click.\n- Agents call\n`check_action`\n\nover 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.\n\nPrefer not to run any of this yourself? The hosted version at\n\n[gntai.dev]does the same thing without you standing up a Postgres instance.\n\n*gnt prebrain scanning a repo, opening a PR, and getting it merged. A real terminal session, not a mockup.*\n\n```\nnpm install -g @gnt-ai/cli\ngnt login\ngnt connect github\ngnt prebrain\n# merge the opened PR on GitHub. that merge is the approval\n```\n\nThat merge lands a rule file in your connected repo, shaped like this:\n\n```\nyour-repo/\n└── rules/\n    ├── refund-approval-threshold.md\n    └── contract-legal-cc.md\n```\n\nEach file is plain markdown with YAML frontmatter:\n\n```\n---\ntitle: Never refund over $500 without a manager\nstatus: approved\nconfidence: 0.91\nowner_id: finance-team\nsource_citations: [...]\nsource: slack\ntags: [refunds, finance]\nlast_validated_at: 2026-07-20\nversion: 1\nsuperseded_by: null\napproved_by: jane@company.com\napproved_at: 2026-07-21T14:03:00Z\ncreated_at: 2026-07-18T09:12:00Z\npr_number: 142\npr_url: https://github.com/your-org/your-repo/pull/142\n---\n\nRefunds over $500 need manager sign-off before they go out...\n```\n\nThere's no captured transcript to show yet (see the gap noted at the bottom of this README).\nHere's the actual response shape a `check_action`\n\ncall returns, straight from the tool's\ncontract:\n\n```\n{\n  \"verdict\": \"blocked\",\n  \"reason\": \"Refund exceeds the $500 threshold without manager sign-off (rules/refund-approval-threshold.md)\",\n  \"cited_rules\": [\n    { \"id\": \"refund-approval-threshold\", \"title\": \"Never refund over $500 without a manager\" }\n  ],\n  \"rules_retrieved\": 3\n}\n```\n\n`verdict`\n\nis one of `allowed`\n\n, `blocked`\n\n, or `needs_human`\n\n. `needs_human`\n\nis the fail-closed\ndefault: no approved rule covers the action, retrieval failed, or the check couldn't complete.\nIt never guesses.\n\nOne MCP endpoint, five tools:\n\n| Tool | What it does |\n|---|---|\n`check_action` |\nChecks a described action against your approved rules before an agent takes it. Returns `allowed` , `blocked` , or `needs_human` with cited rules and a one-line reason. |\n`search_rules` |\nSemantic search over your org's approved rules, optionally filtered by tag. An empty list means no approved rule covers the query. |\n`get_rule` |\nFetches one approved rule by id, with its provenance (who approved it, when, what it was cited from). |\n`list_skill_packs` |\nLists every compiled skill pack version for your org, newest first. |\n`get_skill_pack` |\nFetches a compiled skill pack's manifest and file list by id. |\n\n| Requirement | Check | Get it |\n|---|---|---|\n| Node >=22.13 | `node --version` |\n|\n\n| Method | Command |\n|---|---|\n| curl | `curl -fsSL gntai.dev/install.sh | sh` |\n| npm | `npm install -g @gnt-ai/cli` |\n\ngnt needs Node >=22.13. If the CLI fails to start with a version error, update Node first and confirm with\n\n`node --version`\n\n.\n\n```\ngnt login                # sign in, store an API key locally\ngnt connect github       # connect the repo your rules PRs open against\ngnt prebrain             # scan sources, extract candidate rules, open PRs\ngnt review               # review rules awaiting approval\ngnt status               # show brain status\ngnt pull                 # download the latest skill pack\ngnt gaps                 # list uncovered queries with no approved rule\n```\n\n| Variable | Default | What it controls |\n|---|---|---|\n`GNT_API_URL` |\n`https://api.gntai.dev` |\nAPI endpoint the CLI and MCP calls hit |\n`GNT_WEB_URL` |\n`https://gntai.dev` |\nWeb app used for `gnt login` 's browser step |\n`GNT_CONFIG_DIR` |\n`~/.gnt` |\nWhere `credentials.json` and local config live |\n\n- No analytics or telemetry dependency in the CLI or the web app.\n`gnt prebrain`\n\n'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 local`\n\nagainst 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.\n- 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.\n- Self-hosting:\n`apps/api`\n\nonly sends error data to Sentry if you set`SENTRY_DSN`\n\nyourself. Leave it unset and nothing goes out.\n\n**Who writes rules**: anyone with access to your connected repo, either through`gnt prebrain`\n\n(batch-extracted from real sources) or`gnt review`\n\n(hand-proposed).**How approval works**: merging the PR is the approval. There's no separate publish step.** What gets committed**:`rules/<rule-id>.md`\n\nfiles with the frontmatter shown above and a plain markdown body.\n\nSelf-hosting:`gnt login`\n\n's browser step has nowhere to land.`gnt login`\n\nopens a browser to a`/cli-login`\n\npage 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 no`gnt`\n\ncommand 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.\n\nA`ValueError: refusing to start: these settings still have their .env.example placeholder value...`\n\n`change-me-...`\n\nstring is still sitting in`apps/api/.env`\n\n. The error names every offending field; generate a real value for each and retry.\n\n`store`\n\nfails to start with`GNT_STORE_INTERNAL_API_SECRET is not set`\n\n.`apps/store/.env`\n\nwasn't filled in, or wasn't picked up. Confirm the file exists at that exact path, not still named`.env.example`\n\n.\n\nEvery store-to-api call gets rejected with 401 or 403, even though both services are up.`STORE_INTERNAL_API_SECRET`\n\n/`APPROVAL_SIGNING_SECRET`\n\nin`apps/api/.env`\n\ndon't byte-for-byte match`GNT_STORE_INTERNAL_API_SECRET`\n\n/`GNT_APPROVAL_SIGNING_SECRET`\n\nin`apps/store/.env`\n\n. This fails closed by design. Regenerate both pairs so the two files agree.\n\nA rule fails to save with an embedding or rerank error.`apps/store/.env`\n\nis missing`ZEROENTROPY_API_KEY`\n\n, or it's still empty. Get a real one from zeroentropy.dev.\n\n```\ngnt login\ngnt logout\ngnt connect <app>        github, slack, notion-mcp, monday-mcp, linear-mcp, jira-mcp,\n                          sentry-mcp, granola-mcp, zoom-mcp, figma, datadog,\n                          gitlab-threads, hubspot, airtable, openclaw, hermes\ngnt disconnect <app>\ngnt status\ngnt billing\ngnt review\ngnt pull\ngnt gaps\ngnt prebrain              scan local sources, extract candidate rules, open batched draft\n                           PRs (~60 flags for source paths and extraction mode, see\n                           `gnt prebrain --help`; --mode cloud|local, cloud is the default)\ngnt stale\ngnt keys list|create|revoke|rotate\ngnt webhook list|create|revoke\ngnt org show|rename|invite|remove\n```\n\n- Self-hosting walkthrough, including the production-hardening path:\n`docs/self-hosting/README.md`\n\n- Security policy:\n`SECURITY.md`\n\nCopyright © 2026 gnt.ai. Licensed under Apache-2.0 — see [ LICENSE](/gnt-ai/gnt/blob/main/LICENSE) for the terms and\n\n[for the trademark rule on forks.](/gnt-ai/gnt/blob/main/NOTICE)\n\n`NOTICE`\n\nSelf-hosting gnt costs you nothing, forever — clone it, run `docker compose up`\n\n, bring your own keys. What we sell is the part self-hosting doesn't give you: hosting at [gntai.dev](https://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.\n\nSee [ CONTRIBUTING.md](/gnt-ai/gnt/blob/main/CONTRIBUTING.md) for dev setup and how to open a PR. Every commit needs a\n\n`Signed-off-by`\n\ntrailer (`git commit -s`\n\n), the [Developer Certificate of Origin](https://developercertificate.org/)instead of a CLA. No separate form, just the flag.", "url": "https://wpnews.pro/news/show-hn-gnt-a-company-brain-ai-agents-check-before-acting", "canonical_source": "https://github.com/gnt-ai/gnt", "published_at": "2026-08-03 01:35:11+00:00", "updated_at": "2026-08-03 01:52:39.986730+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "developer-tools"], "entities": ["Gnt", "gntai.dev", "MCP", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/show-hn-gnt-a-company-brain-ai-agents-check-before-acting", "markdown": "https://wpnews.pro/news/show-hn-gnt-a-company-brain-ai-agents-check-before-acting.md", "text": "https://wpnews.pro/news/show-hn-gnt-a-company-brain-ai-agents-check-before-acting.txt", "jsonld": "https://wpnews.pro/news/show-hn-gnt-a-company-brain-ai-agents-check-before-acting.jsonld"}}