---
title: "How Synter's Fail-Closed Safety Gates Protect Ad Spend"
description: "Every Synter AI agent runs through a fail-closed allowlist before touching an ad account. How UNKNOWN_TOOL blocks, geo policy gates, spend cap enforcement, and customer approval requirements keep agents from going rogue."
date: "2026-06-09"
draft: false
category: "engineering"
tags:
  - "Engineering"
  - "Architecture"
  - "Safety"
---

## The Problem With AI Agents in Live Ad Accounts

An AI agent operating a live ad account has real consequences. A
wrong targeting configuration sends budget to the wrong country. A
misplaced bid modifier depletes spend in hours instead of days. A
creative that violates platform policy gets an account flagged. The
agent does not feel any of these outcomes. The advertiser does.

The failure mode is not the agent trying to do something malicious.
It is the agent trying to be helpful, calling a tool it is not
supposed to call, or calling a legitimate tool with parameters that
are technically valid but operationally wrong. The agent does not
know the difference between a geo target that costs $500 and one
that costs $50,000. The ad platform API does not care. It will
accept both.

This is why Synter built its safety architecture around a core
principle: fail closed. When something is ambiguous, uncertain, or
outside the explicit allowlist, the default state is blocked, not
permitted.


An agent that fails open in a live ad account can spend thousands of
dollars before anyone notices. The cost of a false negative (an
agent that should have been allowed to act but was blocked) is an
extra confirmation prompt. The cost of a false positive (an agent
that should have been blocked but was allowed) is real money.

## The UNKNOWN_TOOL Gate: Nothing Runs Unless It's Registered

The first and most fundamental safety layer is the tool registry.
Every Synter script that can touch an ad account is registered in a
central allowlist. The registration includes the script name,
parameters, expected credit cost, timeout configuration, and a
classification of the operation type (read, write, destructive).

When an AI agent calls a tool, the request goes to the dispatcher.
The dispatcher looks up the script name in the registry. If the
script is found, execution proceeds. If it is not found, the
dispatcher throws UNKNOWN_TOOL immediately. No
fallback. No retry. No partial execution. The call is blocked.

This means a creative AI agent cannot discover novel ways to call ad
platform APIs. It cannot combine partial tool names to construct an
unregistered operation. It cannot call a tool that was valid last
week but was removed from the registry. The allowlist is the
complete set of permitted operations, and it is checked on every
single call.




The UNKNOWN_TOOL error is specific and actionable. It tells the
agent exactly which tool was attempted and that it is not
registered. The agent surfaces this to the user. The user knows what
happened. No silent failures, no partial operations, no ambiguous
state.


How This Compares to Generic MCPs

A generic ad platform MCP wrapper passes tool calls through to the
raw API. If the API accepts the call, the call goes through. There
is no allowlist check. There is no registry. The set of permitted
operations is the set of operations the API supports. That is an
unbounded surface, and it grows every time the platform adds API
endpoints.

The difference matters in production. You want AI agents operating
in a bounded, explicit, auditable set of operations, not an
unbounded raw API surface where the only gate is whether the
platform accepts the call.

## Geo Policy Enforcement: We Learned This the Hard Way

Geo policy enforcement runs before any location mutation. Before any
targeting change that adds, modifies, or extends geographic
coverage, the geo policy gate checks the proposed target list
against a set of restricted regions.

This gate exists because of a real incident. An agent, attempting to
expand campaign reach as instructed, added a broad geographic target
that included countries the customer had explicitly not authorized.
The platform accepted the mutation. The campaign ran. The customer
noticed the next day when the spend report showed geographic
distribution they had not approved.

We fixed it permanently. Now geo policy enforcement works as
follows:

- Synter maintains a list of restricted regions that require
explicit customer opt-in. This list is configurable per account.
- When an agent attempts a location mutation, the proposed target
list is checked against the restricted set before any API call is
made.
- If restricted regions appear in the target list without a recorded
opt-in, the write is blocked. The error specifies which regions
triggered the block.
- The customer can provide explicit opt-in for specific regions,
which is recorded and checked on subsequent calls. The opt-in does
not expire silently.


Geo policy enforcement runs at the Synter layer, before the API
call. It does not rely on platform-side geo restrictions, which vary
by platform and are not consistent across Google Ads, Meta, TikTok,
LinkedIn, and the rest. The check runs the same way on every
platform.

## Spend Cap Enforcement: Every Write Checks the Balance First

Spend cap enforcement is a two-layer system. The first layer is
credit balance checking. The second layer is campaign-level spend
limits.


Layer 1: Credit Balance Checking

Every Synter script carries an explicit credit cost. Read operations
cost 2 credits. Write operations cost 5 credits. A full campaign
launch including creative upload, audience build, and ad group
configuration costs significantly more. The costs reflect actual API
load, compute per operation, and the relative risk of each action
class.

Before every execution, Synter checks the current credit balance
against the operation cost. If the balance is insufficient, the call
fails before making any API calls to the ad platform. The customer
sees a specific error: insufficient credits for this operation, with
the cost and current balance both reported. No partial operations,
no calls that start and cannot complete.


Layer 2: Campaign Spend Limits

Beyond credit balance, customers can set explicit per-campaign and
per-platform spend limits. When an agent attempts to modify a
campaign budget, create a new campaign, or otherwise affect spend,
the agent checks these limits before execution.

A budget increase request that would exceed the customer&apos;s
configured limit is blocked. The agent reports the limit and the
proposed amount. The customer can approve the exception explicitly,
which is recorded before the operation retries. No silent budget
overrides.

| Operation | Credit Cost | Pre-Execution Check |
| --- | --- | --- |
| Read campaign stats | 2 credits | Balance check |
| Update bid | 5 credits | Balance check + spend limit |
| Create ad group | 5 credits | Balance check + spend limit |
| Launch full campaign | 200 credits | Balance + spend limit + approval |
| Upload creative | 10 credits | Balance check |
| Modify geo targets | 5 credits | Balance + geo policy gate |

## Customer Approval Requirements: Some Operations Need a Human in the Loop

Not every operation can be fully autonomous. Synter identifies a
class of high-impact operations where the cost of an error is high
enough that explicit customer approval is required before execution.
The approval is recorded and checked at execution time.

Operations that require customer approval include:

- Campaign deletions. Deletion is irreversible. An agent can pause a
campaign autonomously, but deleting it requires explicit approval.
- Budget increases above a configured threshold. The default
threshold is 50% of current budget. Any proposed increase above
that percentage requires approval before the write goes through.
- Adding new ad platforms to an account. Connecting a new platform
or expanding to a platform not previously active for the customer.
- Audience operations involving uploaded first-party data. Creating
customer match audiences, uploading email lists, or creating
lookalikes from first-party data.

The approval flow works within the conversational interface. The
agent presents the proposed operation, explains what it will do, and
requests explicit confirmation. The customer types approval. The
agent records it and proceeds. No out-of-band emails, no separate
confirmation UI. The approval lives in the conversation thread.


The approval requirement is not security theater. The agent
genuinely cannot proceed without the recorded confirmation. The
execution path checks for the approval record before making any API
calls. An agent trying to bypass the approval step will get a
blocked execution, not a warning.

## The Complete Safety Stack

Every write operation touching an ad account runs through all four
gates in sequence. Each gate is independent. Passing one does not
waive the others.


**UNKNOWN_TOOL Gate**

First check. Script must be in the registered allowlist. If not
registered, execution is blocked immediately regardless of any
other conditions.

**Geo Policy Gate**

Runs before any location mutation. Proposed target list checked
against restricted regions. Requires explicit opt-in for
restricted countries. Runs at the Synter layer, before any
platform API call.

**Spend Cap Gate**

Credit balance checked against operation cost. Campaign spend
limits checked for budget modifications. Both checks run before
any API call. Insufficient balance returns a specific,
actionable error.

**Approval Gate**

High-impact operations check for a recorded customer approval.
No approval record means blocked execution, not a warning.
Approval is captured in the conversational interface and checked
at execution time.



The result is an AI agent that can operate autonomously on routine
operations (bid adjustments, status changes, performance queries,
creative variations) while being gated on operations where the cost
of an error is high (geo expansion, budget increases, deletions,
first-party data operations).

This is not a configuration option. It is not a feature flag. These
gates are baked into every execution path. An agent running on
Synter cannot route around the safety layer any more than it can
route around the credit billing layer. They are the same system.


Synter operates AI agents across TikTok, Meta, Google Ads, LinkedIn,
Reddit, and more with full safety enforcement on every operation.

Start Growing

or

book a demo

to see the full agent architecture.

## Frequently Asked Questions

### What is a fail-closed safety gate in advertising AI?

A fail-closed safety gate blocks execution by default when a condition is not explicitly met. In Synter, every write operation requires the calling script to be on a registered allowlist. If the script is not registered, the call throws UNKNOWN_TOOL and stops. Nothing executes. The default state is blocked, not permitted.

### How does Synter's UNKNOWN_TOOL gate work?

Every Synter script is registered in a central allowlist with its name, parameters, credit cost, and timeout. When an AI agent calls a tool, the dispatcher looks up the script name. If it finds it, execution proceeds. If it does not find it, it throws UNKNOWN_TOOL immediately. There is no fallback, no retry, no partial execution. The call is blocked.

### What is geo policy enforcement in Synter?

Geo policy enforcement runs before any location mutation. Synter maintains a list of restricted regions that require explicit customer opt-in before any targeting can reach them. When an agent attempts to add locations to a campaign, the geo policy gate checks the target list against the restricted set. If restricted countries appear without customer opt-in, the write is blocked and returns a specific error.

### How does Synter enforce spend caps?

Spend cap enforcement happens at two levels. First, Synter checks credit balance before every write operation. If balance is insufficient for the operation's credit cost, the call fails. Second, customers set explicit spend limits per platform and per campaign. The agent checks these limits before modifying budgets or creating new spend. No write goes through without a balance check.

### What operations require customer approval in Synter?

Destructive or high-impact operations require explicit customer approval before execution. These include campaign deletions, significant budget increases above a threshold, adding new ad platforms to an account, and certain audience operations that touch first-party data. The approval is recorded and required before the operation can run.
