ANTIGRAVITY LABJP
ARTICLES

All Articles

All (951) Antigravity Basics (143) Editor View (62) Agents & Manager (248) Integrations (125) App Development (216) AI Tools (63) Tips & Best Practices (94)
App Development/2026-06-19Advanced

Designing Safe Background Tasks with the Managed Agents API

Antigravity 2.0's Managed Agents API launches an agent in an isolated Linux environment with a single API call, handling reasoning, tool use, and code execution. Convenient, but left unattended it invites runaways and cost overruns. Here is a design for running it safely as a background task.

App Development/2026-06-19Advanced

I Started the Ad SDK Before Asking for ATT — the Init-Order Bug That Quietly Lowered First-Session eCPM

When I rolled AdMob mediation out to four iOS apps, only the very first session showed weaker ad revenue. The cause was the order between the ATT prompt and MobileAds initialization. Here is why the order matters, plus how I had Antigravity audit the init sequence across all four apps.

App Development/2026-06-18Advanced

Vetting AI Studio's Native Android Code Before It Reaches Your Live App

AI Studio's native Android vibe coding produces working screens at startling speed. But before it goes into a live app, it needs its own vetting. Here is a pre-merge review design for generated Kotlin.

App Development/2026-06-17Advanced

Stop Dialogs From Stacking: One Gate for Paywalls, Review Prompts, and Rewarded Ads

A field record of curing the bug where a paywall, a review prompt, and a rewarded ad all surface at once, fixed with a single priority-based modal gate. I let an Antigravity agent sweep up the scattered show() calls, but kept the display policy in my own hands.

App Development/2026-06-15Advanced

Before Gemini CLI Shuts Down (June 18): Audit Every Hidden Dependency Before Moving to Antigravity CLI

When Gemini CLI shuts down on June 18, the things that actually break are not in your terminal—they're the gemini calls buried in CI, git hooks, and cron. Here's how to surface every reference, validate with a dry run, and design a rollback before you cut over.

App Development/2026-06-15Advanced

Stop Adding a Ternary Every Time a New iPhone Ships: A Table-Driven Resolution Design

Every time a new resolution arrived—iPhone Air, 17 Pro—I was bolting another screen-size ternary onto a 29-branch pile. Here is how I reshaped that into a table-driven design where adding the next device is a one-line data change, with the actual Swift from my wallpaper apps.

App Development/2026-06-14Intermediate

How Far Can On-Device Inference Stay Free? Measuring the Line Between Foundation Models and Gemini

WWDC 2026 widened Apple Foundation Models' free tier, making on-device inference easier to reach for. But 'free, so everything on-device' hits cases where quality falls short. Here is how to decide the range you hold on-device and the range you pass to cloud Gemini by measurement, not guesswork.

App Development/2026-06-14Advanced

When the Edge Cache Pinned Next.js Error Pages: A cache-worker Guard Design

Users reported intermittent 'failed to load' errors I could never reproduce. The cause: SSR exceptions shipped as HTTP 200 and pinned by the edge cache. Here is how I narrowed it down with an Antigravity agent and added a cache-worker guard to stop it.

App Development/2026-06-13Intermediate

What Letting a Browser Subagent Operate My Own Site Taught Me About Agent-Friendly Frontends

When I let Antigravity's Browser Subagent operate my own site, it kept failing at tasks any human finds trivial. With Chrome's I/O 26 agentic web push in mind, here is a practical checklist for building web UIs that agents can actually use.

App Development/2026-06-13Advanced

Keeping TanStack Query v5 Cache Consistency Intact — Invalidation Boundaries, Optimistic Updates, and SSR Traps, Worked Through with Antigravity

A like that snaps back a moment after you tap it; a stale value that lingers when you return from another tab. This walks through the three places TanStack Query v5 cache consistency breaks, with working code for invalidation boundaries, onMutate rollback, and per-request QueryClient isolation.

App Development/2026-06-13Intermediate

Delegate to the OS AI or Own It: Drawing the iOS 27 Feature Boundary

WWDC 2026 put AI into the OS core. Which app features should you hand to the OS AI, and which should you own? A boundary you will not regret, for indie developers.

App Development/2026-06-13Advanced

Making Apple Foundation Models and Gemini Interchangeable: A Three-Tier Abstraction for In-App AI

After WWDC26 opened Apple Foundation Models to qualifying developers and announced server-side Gemini integration, I redesigned my apps around a three-tier abstraction — on-device, Private Cloud Compute, and third-party APIs — behind a single Swift protocol.