TryBrake for JavaScript / TypeScript
Your tools, with a brake on the risky ones.
Wrap a tool with guard("stripe.refund", fn) and it only runs if your rules say yes. It works with the Vercel AI SDK, LangChain.js or any Node code.
The same connector exists for Python.
How it works
Set up in three steps.
- 1
Get the connector
In TryBrake, create an agent for JavaScript. You get a single file to drop into your project, or an install text to paste into your AI coding assistant.
- 2
Wrap the risky tools
const refund = guard("stripe.refund", async ({ orderId, amount }) => { … }). Rules then see the real arguments.
- 3
Set your key
Put AGENTGUARD_KEY in the environment or your .env file, never in the code. Optionally group a run's steps with run("ticket-48211", …) for the replay.
What it stops
The mistakes you can't undo.
Money going out
Refunds, payouts and charges above your limit wait for an OK, or are capped per hour.
Human approval
A held call waits for a decision, up to five minutes by default, from the dashboard, Slack, Teams, Webex, Telegram or email.
Blocked calls
A refused call throws AgentGuardBlocked and the function never runs.
Replay
See every step of a run, with the agent's reasoning and what was allowed, blocked or approved.
Questions
Good to know.
Do I need to install a package?
No. The connector is one file that uses only what Node already includes.
What if TryBrake is unreachable?
The call throws and the function doesn't run. Every connector fails closed.
What does TryBrake see?
The arguments of the guarded call and, if you add it, the agent's reasoning. Your agent keeps its own keys.
Works with more than JavaScript / TypeScript.
One TryBrake account protects every agent you run, wherever it's built.
- n8nProtect workflows and AI Agent tools
- MakeGuard modules in your scenarios
- Claude CodeBlock risky commands and edits
- ChatGPT & OpenAICodex CLI and agents built on OpenAI
- ZapierOne webhook step before the action
- CursorTerminal commands and MCP tool calls
- Gemini CLICommands and file edits
- PythonLangChain, CrewAI, OpenAI Agents SDK…
- Anything elseOne HTTP call before each action

