Quickstart
Add brin to your coding agent or your own agent stack in under 5 minutes. Hooks for Cursor, Claude Code, Codex, Gemini CLI. Wrappers for AI SDK, Mastra, LangChain. Free API and CLI.
agents trust external context by default — packages, web pages, MCP servers, repositories. brin scores that context before the agent acts on it. pick your setup below.
##add brin to your coding agent
your coding agent installs packages and browses the web without checking anything. add a hook and brin blocks bad packages before they install. each integration takes under 5 minutes.
| Agent | How it works |
|---|---|
| Cursor | beforeShellExecution hook intercepts install commands |
| Claude Code | PreToolUse hook blocks installs before they run |
| Codex CLI | Rules block direct installs, wrapper checks brin first |
| Gemini CLI | BeforeTool hook checks brin before shell commands |
| OpenCode | PreToolUse hook gates shell tools |
##add brin to your own agents
if you're building agents with a framework or your own stack, put brin in the tool path. check every artifact before your agent acts on it — packages, web pages, repos, MCP servers, skills.
###frameworks
wrap your tools so brin runs before any external action executes. one shared helper, every tool inherits the same policy.
| Framework | What it does |
|---|---|
| AI SDK | wrap execute functions with a brin check |
| Mastra | check artifacts inside createTool() |
| LangChain | guard DynamicStructuredTool callbacks |
###email pipelines
| Integration | What it does |
|---|---|
| AgentMail | scan incoming agent emails for phishing |
| Resend | scan inbound emails before your app processes them |
###API
under the hood, every integration does the same thing — a single header check against the brin API. no auth, no signup.
if the verdict is suspicious or dangerous, block the action. if brin is unreachable, your agent keeps working as normal. the full response returns a score, verdict, and threats:
works for any context type:
see the API reference for all endpoints, parameters, and response shapes.
###CLI
see the CLI reference for all flags and options.
On this page