◉ANTIGRAVITY LABJP
Articles/Agents & Manager
◈ Agents & Manager/2026-06-15Advanced

Receiving Managed Agent Async Jobs Through a Propose, Verify, Adopt Pipeline

The Managed Antigravity Agent, now in public preview via the Gemini API, autonomously plans, executes, and verifies inside a sandbox. Here is a design for catching its async deliverables through three stages — propose, verify, adopt — before they reach production, with implementation code and operational pitfalls.

Managed AgentGemini API7Async ProcessingAntigravity421

✦ Premium Article

The Managed Antigravity Agent reached public preview on the Gemini API, handling everything from planning to execution autonomously inside a sandbox.

The convenience makes your pulse quicken at first. But operate it a little and another worry arrives. Running autonomously means deliverables come out without anyone's review. Should you really flow those straight to production?

As I started handing multi-app operations to this mechanism, I paused right here. What I want to share is a design for catching an autonomous agent's async deliverables through three stages: propose, verify, and adopt.

Don't "adopt on the spot"

The crux of the problem is that an autonomous agent returns "plausible but wrong" deliverables with full confidence.

It edits files, browses the web, and runs code. Each individual action may work correctly, yet the final judgment can be off. Adopt that into production unverified and the error reaches your users intact.

So I always treat autonomous output as a "proposal." A proposal is not yet an adoption. Insert a verification stage in between, and only let what passes proceed to adoption. Splitting into three stages alone sharply lowers the chance that a runaway autonomy reaches production.

Stage one: Propose

In the first stage, you submit an async job to the Managed Agent and receive the result. This output never touches production; it sits in an isolated place.

import time
from google import genai
 
client = genai.Client()
 
def propose(task: str, poll_interval: float = 3.0, timeout: float = 300.0):
    """Submit an async job to the Managed Agent and receive its deliverable as a proposal."""
    job = client.agents.create_run(
        agent="antigravity-preview-05-2026",
        input=task,
    )
    deadline = time.monotonic() + timeout
    while True:
        status = client.agents.get_run(job.id)
        if status.state in ("succeeded", "failed"):
            break
        if time.monotonic() > deadline:
            client.agents.cancel_run(job.id)   # never leave it running
            raise TimeoutError(f"job {job.id} timed out")
        time.sleep(poll_interval)
 
    if status.state == "failed":
        raise RuntimeError(f"job {job.id} failed: {status.error}")
    return {"job_id": job.id, "artifact": status.output}

The key is to always call cancel_run on timeout.

Fire an async job and forget it, and it keeps running on the sandbox side, racking up charges. I once went pale the next morning seeing the cost of a job that ran all night. I strongly recommend preparing a path that always stops what you start.

✦

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
✦An implementation of a three-stage gate so autonomous deliverables are never adopted unverified
✦Where to draw the line between what the verify phase checks mechanically and what it escalates to a human
✦The pitfalls of polling async jobs, and how to handle them in production
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 $10 for lifetime access
View Membership →

Related Articles

◈ Agents & Manager2026-11-19
Before an Agent Reads Your Issues: Splitting GitHub Actions Into a Reader Job and a Writer Job
Anyone can write an issue body. When an agent reads it inside GitHub Actions, split the workflow into a reader job with no write access and a writer job that never runs the agent, keep the body out of the shell, and check the agent's proposal with a small Python script. Working code included.
◈ Agents & Manager2026-11-14
The Agent PR I Approved Was Rewritten a Week Later: Counting Which Lines Survive 14 Days with git blame
Agent PRs often sail through review, yet the same lines get rewritten soon after merge. Here is a small script that uses git blame to count how many of a commit's added lines are still there 14 days later, the date-ordering trap that skewed my numbers, and how I decide where to look next.
◈ Agents & Manager2026-11-09
Hunting for a stopped antigravity-preview-05-2026 outside your source code
antigravity-preview-05-2026 stopped on October 5. Replacing it in source is not the whole job: .env files, CI, cron and runbooks can still carry the old name. A one-grep inventory, with an exit code you can wire into CI.