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

Stop Hard-Coding Your Agent Concurrency: Let It Tune Itself From What It Observes

When you run several Antigravity 2.0 agents in parallel, a single fixed concurrency number is wrong twice: it stalls at 429s during the day and idles capacity at night. Here is an adaptive design borrowed from TCP congestion control — additive increase, multiplicative decrease — that moves your concurrency from observed signals, with working Python and field notes.

Antigravity414AI agents24parallel execution3adaptive controlproduction operations5

✦ Premium Article

The parallel agents you run quietly overnight start spitting 429 Too Many Requests the moment your own morning work overlaps with them. If you picked one fixed number for concurrency, this is the path you almost always walk.

A fixed number is wrong in both directions. Set it low and your agents queue up and idle at 3am when nobody else is around. Set it high and they fight you for quota at midday while you are in a conversation on the same account, and the downstream API jams. Whichever way you lean, you are wrong during the other half of the day.

This article is about a design that does not hold a concurrency limit but moves it — observing, then adjusting. The setting is Antigravity 2.0 parallel agents and the Managed Agents API, but the idea ports to any agent execution layer unchanged.

A Fixed Concurrency Number Is Usually Wrong

Let me put the failure structure down concretely. Suppose you pin concurrency at 6 for some workload.

TimeDownstream headroomResult at concurrency 6
Late night (you are away)LargeWastes capacity. 10 or 12 would have cleared fine
Evening (you are also active)SmallShares quota with you and cascades into 429s
Right after a major updateUnknownLatency climbs; even 6 can jam

Whichever row you optimize the constant for, it misses on the others. And the "correct" concurrency shifts by the minute, driven by things you do not control: whether you are at your desk, how much quota remains, how busy the model side is. Trying to pin a constant onto a moving target is the design error itself.

Why the Right Concurrency Never Holds Still

Antigravity 2.0 runs planning, code generation, and live browser testing across several agents, centered on Gemini 3.5 Flash. The faster Flash gets, the higher the density of requests you fire downstream per unit time. In other words, the smarter and faster your agents become, the tighter your concurrency ceiling has to be.

The Managed Agents API makes this sharper. A single call spins up an agent in an isolated environment. Because launching is so cheap, it is easy to raise your parallelism without noticing and bump your head on a shared quota ceiling.

Here is where an idea from networking, in use for decades, earns its keep. TCP does not know the link bandwidth in advance. It nudges its send rate up little by little, and the instant it sees a "congestion signal" — a lost packet — it cuts back hard. Repeat, and it tracks the real bandwidth continuously. Agent concurrency can be treated the same way: as a quantity you follow by observation, not one you declare.

✦

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
✦Drop a working asyncio controller into your agent calls that stops storing concurrency as a constant and instead raises or lowers it automatically from observed congestion signals like 429s and quota warnings
✦Translate AIMD — additive increase, multiplicative decrease, proven for decades in TCP — onto Managed Agents API and parallel agent calls, including how to pick real numbers that avoid both over-throttling and idling
✦See exactly how this differs from a fixed-ceiling backpressure design, how to layer the two, and field notes from running several automated pipelines side by side where the right concurrency never stopped moving
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-04-27
Antigravity Agent Product Blueprint — A 90-Day Plan Built on Gates and an Exit Line
A 90-day plan for turning an AgentKit 2.0 build into a product an indie developer can sell, organized around go/no-go gates instead of task lists. Includes an SDK-agnostic run wrapper, a D1 daily quota guard, a signature-verified Stripe webhook, and a break-even formula.
◈ Agents & Manager2026-04-27
Five Paths to Sell AI Agents Built on AgentKit 2.0 — How Indie Developers Should Pick a Distribution Channel
Where should a solo developer sell an agent built on Antigravity? Five channels — marketplace, own site, SaaS embed, consulting-to-product, subscription — compared by take-home share, customer distance and time to first revenue, with Stripe checkout code and a usage-cap check.
◈ 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.