← All resources Article

How the action layer works

From a synced account to an applied change: the eight analysis passes, the fixed action vocabulary, the snapshot taken before every change, and how rollback actually undoes it.

The action layer is the part of memosight that turns analysis into changes on a live ad account. It is also the part where a mistake costs real money. So most of its design is about constraint:

This article walks through one cycle, from a data sync to an applied and reversible change.

1. A sync starts the cycle

Each workspace runs on a schedule, daily or every four hours. The worker pulls the latest campaign, ad group, keyword, search term, ad and audience data from the ad platform, lands it, and runs anomaly detection. Recommendation generation starts once the data is fresh, so actions are never built on yesterday's numbers when today's are available.

2. Eight passes, each with its own context

Instead of one large prompt asking "what should we change?", the worker runs eight category-specific passes. Each one gets only the data relevant to its question:

CategoryLooks atCan propose
Campaign healthStatus, spend, conversions, open anomaliesPause or enable campaigns and ad groups
Budget optimizationPacing, days near budget cap, plan targetsBudgets, target CPA, target ROAS, bidding strategy
Keyword analysisKeyword performance and statusAdd, remove, pause or enable keywords
Quality scoreKeywords with the lowest quality scoreKeyword bid adjustments
Search query miningSearch terms that spend without convertingCampaign and ad group negatives
Ad creativeAds ranked by CTRPause or enable ads
Audience intelligenceAudience, device and location segmentsBid modifiers
Time optimizationPerformance by hour and dayAd schedule bid modifiers

Narrow context produces better recommendations. A pass about wasted search terms does not need auction insights, and leaving them out keeps the model on the question.

3. Root cause first, then a fixed vocabulary

The model is instructed to reason like a paid media strategist accountable to a media plan: find the underlying cause before recommending anything. Poor CPA might come from audience inefficiency, bid structure, creative drag or low-intent traffic, and each of those calls for a different change.

What it can recommend is fixed. There are 25 action types, from set_budget and add_negative_kw to set_device_bid_modifier, and each category is limited to its own subset. Anything outside that list is discarded. Every recommendation must carry four things: the current value, the proposed value, the reasoning and the expected impact. The executor needs the current value to find the resource and to build the rollback.

When a media plan is uploaded, gaps between committed targets and actuals become the first priority. A campaign that is under-pacing against its plan is treated differently from one that is simply cheap.

4. Filters before anyone sees it

Model output goes through checks in code before it reaches the actions queue:

The result is a short queue of changes that are new, possible and different from what the team has already rejected.

5. Approval and the snapshot

When someone approves an action, the executor does four things in order:

  1. Loads the action and the ad account's credentials, which are kept in a secrets manager and never in the application database.
  2. Reads the current state of the resource from the ad platform and saves it as a rollback snapshot.
  3. Applies the change through the platform's API.
  4. Marks the action as applied and stores the snapshot with it.

The snapshot is taken from the live account at the moment of change, not from the last sync. If someone edited the campaign by hand an hour ago, the snapshot reflects that.

6. Rollback restores the exact earlier state

Rolling back re-applies the snapshot through the same API. For changes that create something, such as a new keyword or negative, the executor stores the resource name the platform returned and deletes exactly that resource on rollback. For removals, the snapshot holds enough to re-create what was removed.

Values are also checked against platform limits on the way in and on the way back. Bid modifiers, for example, are clamped to the range the platform accepts. A stray proposal or an unset value in a snapshot cannot produce an invalid write.

What is live today

The executor runs against Google Ads today. The recommendation model and guardrails are platform-agnostic, and connectors for other channels are on the roadmap. For the autonomy modes and guardrails that decide how far an agent may act on its own, see From answers to actions

See it on your own warehouse.

We will map your models to definitions and show where the gaps are.

Book a demo

Keep reading

Article8 min read

How anomaly detection works

Rules you control catch the known failure modes. An AI pass looks for what thresholds miss. Code does the arithmetic, and the model only does the judgment.

Read article
Blog6 min read

From answers to actions

How recommendations turn into budget and bid changes, the two autonomy modes, and the guardrails that decide how far an agent can go.

Read post