TryBrake for Python
One decorator between your agent and the refund.
Your agent keeps its tools. Wrap the risky ones with @guard("stripe.refund") and the function only runs if your rules say yes. It works with LangChain, CrewAI, the OpenAI Agents SDK or plain Python.
The same connector exists for JavaScript and TypeScript.
How it works
Set up in three steps.
- 1
Get the connector
In TryBrake, create an agent for Python. 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 functions
Put @guard("stripe.refund") above the function. Rules then see its real arguments, like the amount of a refund.
- 3
Set your key
Put AGENTGUARD_KEY in the environment, never in the code. Optionally group a run's steps with agentguard.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 raises agentguard.Blocked and the function body 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 an SDK?
No. The connector is one file that uses only Python's standard library.
What if TryBrake is unreachable?
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 Python.
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
- JavaScript / TypeScriptVercel AI SDK, LangChain.js, Node
- Anything elseOne HTTP call before each action

