Safety & Guardrails
The hard rules that prevent the optimizer, content generator, and refresh workflows from doing harm.
Every automated decision in Layers is gated by safety guardrails. These are non-overrideable unless explicitly stated.
Optimizer guardrails
Applied to every pause / budget / bid decision the optimizer proposes:
- Min age 3 days - no action on an entity younger than 3 days.
- Min 100 impressions - budget/bid changes require at least 100 impressions of data.
- Min $5 spend (content-refresh disable step) - ads with under $5 spend are not disabled.
- Never disable
TOP_PERFORMERorHEALTHYads. - Never empty an adset/adgroup - if pausing would leave zero active ads, the optimizer holds.
- Max 50% change and $100 absolute per budget move.
- Action caps per cycle: no more than 40 total actions or 20 pauses in a single optimizer cycle.
- Cooldowns between repeat actions on the same entity: 48h structural, 48h budget, 24h bid.
- Min confidence 0.5 - proposals below this confidence score are rejected.
Creative generation guardrails
Applied to generation workflows:
- Ad eligibility / safety review - content whose upstream safety check
fails (
safety.pass = falseormetadata.adEligibility.eligible = false) is markedsafetyFailed = trueand forced toorganic_score = 0, permanently excluding it from ad selection. - Approval policy - projects with
metadata.approval_policy.requiresApproval = trueblock scheduling of any content whoseapproval_statusisn'tapprovedornot_required. - Credit gate - generation commands check available org credits before queuing. If the org is out of credits the request fails with HTTP 402.
Distribution guardrails
Applied to social posts:
- Posts-per-day cap - Social Distribution limits posts per platform
per day based on the selected provider (e.g. 2 for
ds, 4 otherwise). - Account health - if a social account's OAuth token is invalid or the account has been flagged, distribution activities error out for that account.
- Approval gate - if the project's approval policy requires human approval, scheduled posts wait until a human approves before publishing.
Spending guardrails
- Generation credit cap - enforced per request against the org's credit balance. Overages are billed automatically at the end of the billing period via Stripe.
How to override
- Manual pauses / resumes on ads, adsets, campaigns - done in the app or via API; the optimizer's cooldowns apply equally to manual changes within the project window.
- Creative overrides - use
project_ads_content.override = 'include'/'exclude'to force a creative in or out of ad selection.
What to do when a guardrail fires
Check the workflow run in the layer's Runs tab. Every proposal the optimizer rejects records a reason (e.g., "Entity too young (2d < 3d minimum)", "Change exceeds 50% cap"). Fix the underlying condition (age up, spend up, manual approval) or wait for the next cycle.