◉ANTIGRAVITY LABJP
Articles/Integrations
⬡ Integrations/2026-05-23Advanced

Apple Search Ads × Antigravity Agent: Autonomous Keyword Bid Tuning Notes from an Indie iOS Studio

How I delegated Apple Search Ads keyword bidding to Antigravity sub-agents for an indie wallpaper app portfolio. JWT auth, ROAS / CPI bid policy, and a Crashlytics-driven safety net.

Antigravity377Apple Search AdsiOS27AdMob12ROASindie developer12

✦ Premium Article

Run enough iOS apps as a one-person studio and Apple Search Ads (ASA) operations quietly turn into a 30-minute morning ritual: staring at keyword spend, pausing things, raising bids by feel. I spent about three weeks moving that ritual into an Antigravity sub-agent, and these are the field notes.

The short version: ASA Campaign Management API is surprisingly approachable, and roughly 80% of the daily decisions can be handed off to a script-style sub-agent invoked from the Antigravity Agent View. The trouble is that "autonomous" and "out of control" sit close together. Until I wired a Crashlytics-driven kill switch into the bidding loop, I would not have put this in production.

Why I stopped touching ASA by hand

I turned ASA on for the first time in 2019, when there was no API to speak of. As my app count climbed and I started reconciling AdMob eCPM against ASA CPI manually each week, the lag between observation and action became expensive. Every Friday review meant five days of stale bids on keywords that should have been paused on Monday.

The API had been around for a while, but the token plumbing was annoying enough that I leaned on community tools. After writing earlier pieces about the Antigravity Browser Agent and Background Agent, I started wondering whether an agent could simply read the reports and recommend bid changes. Two rules I gave myself before writing a line of code: a human inspects everything in the morning, and the agent must be able to pause faster than the human can. For an indie developer running an ad-funded app business alone, designing the "stop" button is more important than designing the "go" button.

Three prerequisites before delegating to Antigravity

Three things have to be tidy before the agent earns its keep.

  1. Group keywords into themed campaigns. Mixing unrelated keywords inside one campaign makes the agent's decision surface noisy. I split mine into "wallpaper", "calming / healing", and "manifestation / law-of-attraction" themes — the three columns my AdMob revenue actually breaks down along.
  2. Define conversions beyond installs. ASA measures installs, but the real signal is a blend of Day1 / Day7 retention, AdMob revenue per user, and subscription rate. I attach a asa_install event in Firebase Analytics and join it back to AdMob revenue via a small BigQuery view.
  3. Keep the API key out of the agent's context. The token-minting process runs as a separate short-lived child process; the private key itself lives in macOS Keychain (or 1Password CLI on the laptop I travel with). Never paste the key into agent context windows.

Skipping any of these tends to manifest as the agent recommending bid hikes for keywords with low Day7 retention. That happened to me in week two — more on that below.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Concrete implementation of ASA Campaign Management API JWT auth and token caching driven by an Antigravity sub-agent
✦Deterministic bid policy that adjusts spend based on ROAS and CPI, with explicit thresholds for pausing, decreasing, and increasing bids
✦Crashlytics-integrated safety valve that halts bid increases when crash-free percentage drops, plus a runnable daily operating cadence for solo developers
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $15 for lifetime access
View Membership →

Related Articles

⬡ Integrations2026-05-28
Five Weeks Letting Antigravity's Background Agent Refresh App Store Screenshots Across Four Apps
An operations log from running Antigravity Background Agent for five weeks to keep App Store screenshots for four wallpaper apps in sync across eight locales — including the caption-width validation step that cut manual fixes from 18 to 2.
⬡ Integrations2026-09-20
antigravity-preview-05-2026 shuts down October 5: which setups need more than a string swap
The shutdown date for antigravity-preview-05-2026 is set for October 5, and the official page gives you the date and the successor name, nothing more. If you only read output_text, swapping the string is the whole migration. If you read steps, it is not.
⬡ Integrations2026-09-18
When a session starts with MCP tools missing, where do you stop?
When MCP initialization fails at startup, the agent quietly falls back to other means and keeps going. Here is a small script that asks your servers directly which tools they expose, plus the three branches I decided on in advance for when something is missing.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links