跪拜 Guibai
← Back to the summary

Gemini 4 Neon + Antigravity: The Harness That Finally Makes Multi-Agent Coding Practical

Hi everyone, I'm Erge (二哥).\n\nAfter deeply testing the combination of Gemini 4 Neon and Antigravity (call it Anti-gravity, or agy), I've found that another top-tier app and model are no longer my favorite.\n\n(One reason is that I can't use it with peace of mind; the other is that even a $500 quota isn't enough, and the video quality is worse than Gemini 4 Neon.)\n\nUnless you're really used to that other option and don't want to switch to another harness, you'll find that Google has truly turned things around this time.\n\nAnd I strongly suggest you get yourself a setup right away.\n\nSuddenly, Gemini has become intelligent. What's the reason behind this? Perhaps this screenshot explains everything.\n\nscreenshot\n\nLet me translate it for you.\n\n> In short, we believe DeepMind is no longer a frontier lab. We expressed this view to Tokenomics customers months ago, due to significant departures from its reinforcement learning team and poor compute allocation. Google will continue to wander aimlessly and release models, but the possibility of them reaching state-of-the-art again has dropped to zero.\n\nIn other words, Google's R&D team learned from their shame and rose to the challenge. Previously, some experts harshly commented that it was impossible for them to create frontier models, with a possibility of 0. Now, Google has won this turnaround with Gemini 4 Neon.\n\nSo even technology can achieve enlightenment through hardship. It's like a sudden awakening.\n\nNext, I'll share a series of ways to use agy + Gemini 4 Neon. Save this and practice it seriously. Your productivity will greatly increase.\n\n## 01, Swarm\n\nMany of you have felt this: as the context grows longer, the Agent tends to forget earlier constraints. This is especially serious with that other option; it often becomes useless after one round of compression.\n\nThe /swarm slash command in agy is designed to solve this.\n\nswarm command\n\nWhen you type /swarm and describe a task, your current session automatically becomes a coordinator. It first splits the task, then spins up a team of agents with clear roles that work simultaneously.\n\nThe coordinator doesn't write code itself, nor does it handle debugging or testing. It only assigns work, accepts results, and makes decisions. This way, the main session can respond to your new instructions at any time.\n\nIt's very different from just opening multiple tabs. There's rigorous engineering design behind it.\n\nFirst, consider the bulletin board. All members' task-taking actions, change summaries, and test results are posted in order on a shared bulletin board and are always retained. Even if a member undergoes context compression, they can resume by reading from a specified sequence number, recovering their previous state. When members hand off work, they only reference message sequence numbers (for example, asking the verifier to check #4 and #6), without copying entire reports into the next message, which would repeatedly consume quota.\n\nbulletin board\n\nThen there's waking and channels. When you @ a member on the bulletin board, it wakes up. Members without current tasks are in a waiting state and consume no tokens. They only wake when mentioned. So when members hand off, they only @ the next member who needs to act, not use @all to wake everyone. If the team exceeds eight members or spans multiple independent modules, the coordinator creates separate channels. The public main channel only keeps cross-module decisions, while within-module communication uses @#channel to wake only the members in that channel.\n\nchannels\n\nNext is acceptance. When you have 2-4 working members, the coordinator assigns a @verifier to run tests and experience the app as a real user. If issues are found, the verifier points out the problems and asks the original author to rework. The verifier does not change code themselves, which structurally prevents two members from editing the same file at the same time. In the background, a @monitor stays on duty, checking the status of all members every three minutes. It stays silent normally, but if all members are stuck in waiting while the task is incomplete, or if someone missed a message, it sends a numbered reminder. After the task ends, it automatically removes its scheduled job and goes to sleep. Additionally, there's a non-speaking narrator that watches the bulletin board and organizes progress into structured data, rendering a real-time overview in the Swarm UI.\n\nverifier and monitor\n\nThen there's workspace isolation. Read-only analysis and acceptance members share the main workspace (inherit) by default. Members that need to edit code or run builds are given separate working copies via workspace:"share" (similar to git worktree) or use branch to create an independent clone. They commit changes separately and then merge back to the main branch. When destroying a member, kill also removes the corresponding workspace, so changes must be merged before destruction. New members start with a cold start and don't see the main conversation's history. But if an investigation needs to be split into two deep lines, the coordinator can use fork to copy a specific member's already-read files and reasoning history, saving the time of starting from scratch.\n\nFinally, models and quotas. By default, all members use Gemini 4 Neon like the main session. You can also specify in the prompt that the verifier use a different model for cross-checking, or even allow members to spin up helpers for subtasks. If a member's quota runs out mid-task, you don't need to destroy and restart. Wait until it's in waiting state, then have the coordinator switch it to a model with remaining quota, and it will continue with full context.\n\nSwarm coordinator, shared bulletin board, members and independent verifier\n\nWhen Google released Gemini 4 Neon on November 18, they also showed a cool demo: using /swarm with Neon to build a two-player level game that runs in the built-in browser.\n\ngame demo\n\nIf you want to try this multi-agent collaboration yourself, create a new empty directory, select Gemini 4 Neon (the default high tier is enough), and copy the following instruction into agy's input box and run it.\n\ntext\n/swarm Develop a two-player neon pinball battle game that runs in the browser from scratch in the current empty directory. It must include 3 levels of increasing difficulty, glowing trailing visuals, synthetic collision sound effects, and a mode where a player vs AI opponent plays in real time. Assign the rendering, physics collision and AI opponent logic, and automated testing to different members for parallel development, then assign an independent verifier to confirm there are no errors and collision detection works correctly before delivery.\n\n\nAfter the coordinator spins up the team, remember to click "Open the Swarm UI" in the reply and check the Board and Graph tabs to see how members @ each other on the bulletin board for handoffs.\n\n## 02, SSH\n\nCompilation of large projects, Docker containers, GPU training environments, and production logs usually live on remote Linux servers.\n\nAfter upgrading the agy app to v2.33.0 or higher, you no longer need sync scripts or switching back and forth between terminals. Click "Create New Project" next to Projects in the left sidebar, select SSH Host..., or press Cmd + Shift + P (Windows and Linux: Ctrl + Shift + P) and search for "Connect to SSH Host...". This opens a separate window for the remote server.\n\nSSH setup\n\nOnce connected, agy uses local OpenSSH to deploy a remote service to the host's ~/.antigravity-hub-server/ directory. Agent data is stored in ~/.gemini/. Project files, Git worktrees, terminal processes, and all agent calls run directly on the remote host. The local desktop app only renders the interactive interface.\n\nSSH architecture\n\nMany people confuse the three remote capabilities in Antigravity. The core difference is where execution happens.\n\nConnect over SSH runs in your own remote Linux host, with the entry point being the local agy app (or the agy CLI in the host's terminal). It's suited for borrowing remote compute machines, GPU servers, or test servers for development and troubleshooting.\n\nRemote Control also runs in your local computer or server, but the entry point is a browser on any device (visit antigravity.google.com). It operates on local directories and uncommitted Git worktrees, ideal for remotely checking progress and approving plans when you're away from your desk.\n\nRemote Agents run in Google-managed cloud isolated environments. You can mount a GitHub repository or upload files to run long-running tasks. Even if your local computer sleeps or you switch to your phone, the task continues.\n\nThere are a few rules to check before using Connect over SSH.\n\nThe remote host must be 64-bit Linux (x86_64 or arm64). Common Ubuntu, Debian, and RHEL work. Minimal distributions like Alpine, macOS, and Windows aren't supported. Both the target machine and any jump host (ProxyJump) must have SSH services that allow port forwarding. The host must have HTTPS access, and the current user's $HOME directory needs read, write, and execute permissions.\n\nSSH requirements\n\nOnce connected to a test or spare production machine, you can run a read-only inspection command first. It both verifies remote terminal permissions and lets Neon check the server's health.\n\ntext\nPlease check the current server's disk usage, memory usage, and running Docker container status. Troubleshoot the top resource-heavy services or abnormal restart logs in the last 24 hours. Output a summary with specific commands as evidence. Do not modify any production configuration.\n\n\nSSH inspection\n\n## 03, Dynamic Workflows\n\nagy introduced a slash command called /run-workflow (dynamic workflows) in v2.32.0.\n\nrun-workflow\n\nWhen you have tasks that need to scan files one by one or aggregate results in stages, writing prompts only in natural language makes it hard to avoid missing projects or getting the format wrong.\n\nType /run-workflow and describe the task. Gemini 4 Neon first writes a Python orchestration script that supports top-level await. The script uses code to fix the execution order, concurrency strategy, and data format. Then it hands the script to the harness to run in an isolated python3 process.\n\nrun-workflow script\n\nThe following script shows the four commonly used orchestration directives in /run-workflow (phase, agent, parallel, and stateful multi-turn calls):\n\npython\nphase("Review")\nreviewer = agent("Review the specified source code for concurrency and resource leak issues.", role="Reviewer")\nbugs = await reviewer(\n "List high-risk bugs in the core directory. Only return a list of issues.",\n schema={"type": "array", "items": {"type": "string"}},\n)\n\nphase("Fix and Verify")\nfixes = await parallel(\n bugs,\n lambda b: agent(f"Fix the issue: {b}", schema={"type": "string"}, model="flash"),\n)\npassed = await reviewer(f"Fixes completed: {fixes}. Please verify each one is resolved.", schema={"type": "boolean"})\ndel reviewer\n\n\nFirst, results must conform to a JSON Schema. Each agent that the script spins up runs in an isolated session and must call the built-in finish tool to submit results. The harness validates against the agreed JSON Schema. If the format is wrong or finish isn't called, it errors and aborts. The script receives already-parsed arrays, booleans, or dictionaries, so you don't need brittle regex to extract results from natural language.\n\nSecond, you can reuse stateful agents and stop quickly on failure. Using await agent(...) creates a one-shot session. If you assign the reviewer to a reviewer variable and call it in rounds, the same reviewer retains context across rounds: first round lists problems, middle round fixes concurrently, and final round reviews each one. Independent tasks go to parallel() for concurrent execution, while dependent tasks go to pipeline() for sequential flow. parallel() uses fast-fail: if one branch fails, the other running branches are immediately cancelled, so no quota is wasted.\n\nThird, you can control costs hierarchically and call tools directly from the script. For high-frequency scans in loops, set the model parameter to flash or flash_lite. Complex aggregation goes to the main model. When doing parallel code changes, you can also use workspace="share" or branch for isolation. If a step only needs to read files or run deterministic commands, the script can use call_tool() to call tools directly without consuming model reasoning turns. When permission is denied, it throws an exception marked with .denied, which the script can skip as needed.\n\nFourth, you can review historical steps and save scripts for reuse. The built-in trajectory() reads the current session's history before starting the workflow. For example, extract a previous failed run_command error and hand it to a troubleshooting agent without rerunning the heavy build. You can also save a well-written orchestration script with workflow.json, validate parameters via Args, and reuse it repeatedly.\n\nDynamic workflow features\n\nAt this point, the boundary between /run-workflow and /swarm is clear. Tasks with a defined execution path, where you need to batch distribute by file list and strictly validate aggregated structures, go to /run-workflow. Engineering tasks where the boundaries aren't settled, you need multiple roles to define interfaces while coding, and you iterate with constant rework and acceptance, go to /swarm.\n\nrun-workflow vs swarm\n\nPick a code repository you're currently maintaining and copy the following instruction into agy to run it.\n\ntext\n/run-workflow First find the source files in the core business directory of the current repository. Then use the flash model to review each file in parallel for unreleased resources, swallowed exceptions, or hidden null-pointer risks. Each file should return a risk level and one-sentence conclusion in a fixed structure. Finally, aggregate into a checklist from high to low risk, and save this workflow script for future reuse.\n\n\n## 04, btw\n\nWhen a long-running task is halfway through, if you casually add a question to the main conversation asking how a certain config is written or where a function is called, it brings two side effects: it interrupts the main task's execution cadence, and it permanently writes a one-off investigation into the main conversation's history. That increases the input token count for every subsequent turn and distracts the model.\n\nThe /btw command in agy is a bypass mechanism designed specifically to solve context pollution. Like Claude Code's /btw, after typing the command, the main task continues as normal, and a separate "Side Question" tab appears in the right sidebar.\n\nbtw sidebar\n\nThe side conversation automatically includes a snapshot of the main conversation's context up to that point and opens read-only tool permissions. It can read files, search code, and run read-only commands to verify answers. By default, it doesn't modify any workspace files. It also supports specifying a separate model for the side question.\n\nIf you select any text in the main conversation and click the "Ask /btw" popup, you can bring the selected content into the side line for further questions.\n\nbtw ask\n\nAfter checking, there are three ways to handle the result. If the conclusion is useful for the main task, click "Insert into main conversation" to insert only the refined result back into the main line. The investigation process stays in the side line and doesn't come back. If a separate new requirement emerges while investigating, click "Promote to Conversation" to upgrade it to a full conversation. If it's just a temporary confirmation and not needed, close it directly. The main session's context is unaffected.\n\n## 05, grill-me\n\nComplex requirements often lead to rework because the prompt misses some implicit assumptions.\n\nThe /grill-me command in agy reverses the usual sequence of "you write a long prompt describing the requirements". Instead, Gemini 4 Neon plays the role of a rigorous technical reviewer and asks questions back to you.\n\ngrill-me\n\nIts work is divided into two phases.\n\nAfter typing /grill-me, Neon first goes through your codebase. It checks which framework the project uses, where the config is, how routes are organized. Any fact that can be determined from the code, it doesn't ask you.\n\nAfter understanding the current state, it presents the key disagreements that can't be resolved by looking at code alone. It asks one question at a time and offers recommended options. For example: for cache breakdown, use a mutex lock or logical expiration; if Redis goes down, use a local fallback or allow direct access; or how to roll back if data migration fails. After this round of questions, all ambiguous design decisions are settled before the first line of code is written.\n\ngrill-me questions\n\nI personally prefer to use /plan and /grill-me together.\n\nplan grill-me\n\nOnce all key disagreements are settled, Neon combines your chosen answers and produces a complete implementation plan. After reviewing it, click "Proceed" before letting it actually modify the code.\n\nplan review\n\nOpen any project you're working on and send the following instruction to Neon to feel the pressure of being questioned by an AI.\n\ntext\n/plan /grill-me Add a hot cache layer with degradation and fallback for the current project's Redis, to prevent cache breakdown and avalanche, and add concurrency stress testing.\n\n\n## 06, generative_ui\n\nPlain text and static Mermaid diagrams often struggle to explain state transitions, cache eviction, or concurrent scheduling clearly. Typing /generative_ui in agy gives you a different experience.\n\ngenerative_ui\n\nGemini 4 Neon generates a single-file, self-contained HTML interactive component that runs in a restricted sandbox iframe. A Content Security Policy (CSP) intercepts external CDN scripts (only allowing built-in whitelisted styles and scripts) so the component doesn't fail because external resources are unavailable. The host container automatically injects a set of semantic theme CSS variables and listens for theme switch events. When you toggle light/dark mode, the component's colors automatically stay consistent with agy's current interface.\n\nThere are clear rules for placement.\n\nFlowcharts and state diagrams up to 450px in height are embedded directly in the conversation bubble. More complex dashboards, multi-tab panels, and interactive prototypes taller than that expand full-screen in the right sidebar, so the conversation bubble doesn't get a scrollbar. All buttons, toggles, and sliders run via inline JavaScript inside the sandbox. No matter how you click them, they don't send new messages to the model and don't consume extra tokens. When you're satisfied, click "Export Artifact" in the top-right menu to export it as a standalone HTML file. It's handy for technical documentation or shareable slides.\n\ngenerative_ui example\n\nTry it with the context caching mechanism. Copy the following instruction into agy.\n\ntext\n/generative_ui Create an interactive demonstration of KV Cache and Prefix Caching hit principles as a single-page interactive component. On the left, simulate appending messages in a multi-turn conversation, modifying an earlier message, or manually triggering cache expiry. On the right, highlight in real time which prefixes hit the cache, where the break starts that requires recalculation, and simultaneously calculate how many input tokens and cost are saved per request.\n\n\n## 07, Putting These Commands to Use\n\nThe six features above are useful individually, but when you chain them together by engineering phase, and add /boost and /learn, Antigravity's harness really shines.\n\nWhen requirements aren't settled yet, first use /plan /grill-me to have Neon understand the codebase, settle all architecture disagreements one by one, and get an approved implementation plan before writing the first line of code.\n\nIn the execution phase, pick commands according to the task's characteristics. Multi-module parallel development with independent acceptance goes to /swarm. Tasks with fixed steps, batch distribution by file list, and validated return structures go to /run-workflow. Tasks that need remote Linux compute machines, Docker clusters, or production logs run through the native SSH window on the host. If you hit deep concurrency races, complex algorithm optimization, or stubborn bugs that are hard to locate, you can add /boost on paid tiers to start multi-perspective deep reasoning and cross-validation.\n\nDuring task progress, if you need to check configs or call relationships temporarily, use /btw to verify in a read-only side line. Only insert useful conclusions back into the main line to keep the main session's context clean. When state transitions, cache hits, or stress test data need visual confirmation, use /generative_ui to generate a sandbox interactive panel.\n\ncombined workflow\n\nAfter a complex environment configuration runs smoothly, or you just corrected an agent's coding habit, remember to type /learn to save those project constraints and personal preferences. Next time you open a new session, the agent automatically follows them without you restarting from scratch.\n\n## Ending\n\nThey say Google's harness is hard to use. I think the main reason is that their model itself wasn't top-tier.\n\nWith the arrival of Gemini 4 Neon, combined with this set of engineering capabilities covering planning, orchestration, isolation, and acceptance, this situation is improving.\n\nI strongly recommend everyone have one ready. There's no need to use that other option.\n\nSee you next time.

Comments

Top 2 from juejin.cn, machine-translated. The original thread is authoritative.

用户368345607470

/swarm is suited for tasks with undefined boundaries and multi-role rework; /run-workflow is suited for tasks with fixed paths and checklist-based batch validation. This division of labor is more useful than just talking about features. Two follow-up details: in swarm, when the reviewer switches to a different model for cross-checking, how are the quotas for Neon and Carbon split? For SSH connecting to a production backup machine for inspection, how are permissions and audit trails handled?

圆头耗子锄大地

Kimi Code's swarm and tower?