In mabl, agents can change your workspace: they can edit and delete tests, merge branches, and run plans that spend credits. With guardrails, your team can choose which of those changes agents can make on their own, which ones need a person's approval, and which ones they can't make at all. Anyone in the workspace can view the rules on the Agents > Guardrails page, but only workspace owners can change them.
This article explains how guardrails work and how to choose rules for your workspace.
What guardrails cover
The Guardrails page groups the actions you can set rules for into sections:
| Section | Actions |
|---|---|
| Branch management | Delete a branch, Merge a branch |
| Running tests and plans | Run tests or plans, Create a deployment event |
| Editing tests and data | Change a test, Change a test's objective, Save a test that may not meet its objective, Delete a test, Restore a test version, Create a reusable flow, Change a reusable flow, Delete a reusable flow, Change a plan, Delete a plan, Change a DataTable, Delete a DataTable, Create or change credentials, Delete credentials |
| Authoring sessions | Start an authoring session |
| By resource category | Rules that cover one kind of action across a category of resources, such as Delete: Test configuration |
Guardrails apply only to agents: the mabl agent, connected AI tools that use the mabl MCP server, and agents that call the mabl API. They don't limit what people do directly in the mabl app, or local test authoring from the mabl CLI, which runs with your own sign-in.
Default rules
Every workspace starts with two rules, and they apply from the start. Agents ask a person before they:
- Delete test configuration, such as tests, flows, plans, DataTables, and credentials.
- Edit or remove a test's objective. An agent can still give a test its first objective without asking.
A workspace owner can change or remove these defaults, or add rules. Once an owner saves the workspace's rules for the first time, the workspace keeps its own list, and later changes to mabl's defaults don't apply to it.
Decisions: Allow, Ask first, and Block
Each rule covers one kind of action and has one of three decisions:
| Decision | What the agent does |
|---|---|
| Allow | Takes the action on its own. |
| Ask first | Pauses and sends an approval request. It continues only after a person approves. |
| Block | Can't take the action, and is told that a guardrail blocked it. |
Work with your team to choose guardrails that fit how you use agents. For example:
- A small team that works closely with the mabl agent might allow most edits and runs, and keep the defaults for deletes and objectives.
- A team where many people share branches might set merges to ask first, since a merge can overwrite a teammate's work.
- If coding agents run unattended in CI, use allow or block for them. An agent set to ask first waits until someone approves, so the pipeline stalls if no one is watching.
- For actions that should never come from an agent, such as connected AI tools deleting credentials or branches, use block.
Guardrails don't add permissions
An agent can only do what its own permissions allow. An agent working for a person has that person's workspace role, and an agent started with an API key has that key's permissions. Guardrails only add limits, so setting Allow or approving an Ask first request never gives an agent more access.
The mabl agent and connected AI tools
Each rule has a separate setting for two kinds of agents:
- mabl agent: mabl's own agents, such as the agent you chat with and the agent that builds and edits tests.
- Connected AI tools: AI tools, such as coding agents, that act in your workspace through the mabl MCP server or the mabl API.
If generative AI features are turned off in your workspace, mabl's agents can't run, so the Guardrails page shows only the Connected AI tools column.
Because the settings are separate, you can treat the two kinds of agents differently. For example, you might let the mabl agent run tests on its own, but have connected AI tools ask first, so a coding agent doesn't spend credits without anyone knowing.
Check coding agents' edits against test objectives
If your tests have objectives, set Save a test that may not meet its objective to ask first for connected AI tools. The mabl agent checks its own edits against a test's objective, but a coding agent's edits are checked only when this rule is set.
Who approves requests
When an action is set to Ask first, mabl sends an approval request:
- If the agent is working on behalf of a person, such as the mabl agent in the app, only that person can approve or decline the request.
- If the agent started with an API key, any workspace owner or editor can approve or decline the request.
Agents and API keys can't approve requests, including their own. To learn how to review a request, see Review agent approval requests.
When rules conflict
Guardrails can be set for a specific action or for a whole category of things, listed under By resource category on the guardrails page. If rules overlap and have different decisions, the stricter one always wins.
For example, Delete: Test configuration covers deleting tests, flows, plans, and other test assets. If it's set to ask first, the agent asks before deleting a test, even if the specific Delete a test rule is set to allow.
Try rules before you enforce them
The Enforce these rules toggle controls whether your rules take effect. While it's off, agents aren't stopped or asked to wait, and mabl only logs what the rules would have done. When you're ready, turn the toggle on and click Save rules.