Google Antigravity
Agents in Google Antigravity ask a named person, or your policy, in Deliverd before they act: from the App, the CLI, the IDE extensions or the SDK.
Google Antigravity is Google's agent platform for software work: a desktop App, the agy CLI, extensions for six editors and a Python SDK, running Gemini models and others. With Gemini 4 Carbon it can run a `/swarm`: a coordinator, parallel workers in their own worktrees and verifier agents that test each other's diffs. Antigravity's own approvals ask whoever is at the keyboard. Deliverd makes the consequential calls go to the person who owns them, from email, Slack or Teams, with a record of who decided and why.
There are three ways in, and they work together: the agent asks for itself through the MCP server, a hook checks the agent's shell commands and MCP tool calls before they run, and an agent you build with the SDK can have a person decide its tool calls.
Let the agent ask: the MCP server
Install the Deliverd plugin, which brings the MCP server and the approval, tasks, policy and checkpoint skills, so the agent knows when to ask:
agy plugin install https://github.com/deliverd-dev/deliverd-skills
Or add only the server, to ~/.gemini/config/mcp_config.json for every project or .agents/mcp_config.json for one. Antigravity spells the address serverUrl, and needs nothing else: it signs in with OAuth, so no key is pasted.
{
"mcpServers": {
"deliverd": {
"serverUrl": "https://deliverd.dev/api/mcp"
}
}
}- 1
Sign in
In the App, open Customizations → Installed → MCP Servers and choose Authenticate on
deliverd. A browser opens on Deliverd; pick the organisation and approve. In the CLI,/mcpshows the server's status. - 2
Ask
The agent can now call
request_approvalbefore it acts and wait for the answer,check_gateto ask your policy, andrequest_revieworrequest_informationfor a review or an answer. Ask it to get Finance's approval before a refund, and it will. - 3
Optional: one click, not two
Antigravity asks before any MCP tool it has no rule for. Asking a person is the point of these tools, so you may add
mcp(deliverd/*)to theallowlist of your permissions (in the CLI,~/.gemini/antigravity-cli/settings.json).
Check the agent's own calls: the hook
An agent that is not asked to ask may not. The hook is the check that does not depend on the model: Antigravity runs it before every tool call, and it asks your policy in Deliverd before a run_command or an MCP tool your rules name: a publish, a deploy, terraform apply, a force push, a refund through a payments server, a merge. Your policy allows the call, refuses it, or asks a person.
- 1
Copy the hook pack
Copy
integrations/agent-hooks/deliverd/from the Deliverd repository into your project as.deliverd/. It needs Node and nothing else. - 2
Register the actions
With an owner's or administrator's key, run
node .deliverd/register.mjs, then say under Agents → Rules → Publishing & request rules what each action needs: allowed, refused, or a person decides. - 3
Wire up Antigravity
Save the file below as
.agents/hooks.jsonin the workspace, or merge it into~/.gemini/config/hooks.jsonfor every workspace. It works in the App, the CLI and the IDE extensions;/hooksin the CLI shows it loaded. Give the agent its key asDELIVERD_API_KEY.
.agents/hooks.json
{
"deliverd": {
"PreToolUse": [
{
"matcher": "*",
"hooks": [{ "type": "command", "command": "node .deliverd/gate.mjs antigravity pre", "timeout": 30 }]
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [{ "type": "command", "command": "node .deliverd/gate.mjs antigravity post", "timeout": 30 }]
}
]
}
}- A refusal is final; anything else is Antigravity's to decide. On a refusal the hook answers
"decision": "deny"with the reason, which the agent reads. Otherwise it answers"allow", which hands the call on to Antigravity's own permission rules, so its prompts still apply. It never answersauto_approve. - It answers quickly. Antigravity gives a hook 30 seconds. A decision still pending is a refusal with the link to the approval; once the person approves, the same call goes ahead. To wait for the person instead, set
DELIVERD_HOOK_WAIT_SECONDSand raise the hook'stimeoutabove it. - It fails closed. No key, no network, or an action nobody registered means the call does not go ahead.
- Calls no rule names run as before, with no call to Deliverd. Antigravity's own tools (reading and editing files, search, subagents) are never checked.
With /swarm
A swarm's verifiers are agents: they run the tests and challenge the diffs, which is valuable, and it is not a person signing off. A swarm's workers can each have their own copy of the repository, so for a swarm put the hook in ~/.gemini/config/hooks.json, or commit .agents/hooks.json and .deliverd/ so every copy carries them. Then the person who owns a release or a production change is asked, whichever agent in the swarm reached for it, and the decision is recorded with that agent's request.
Agents you build: the SDK
An agent built with the Antigravity SDK (pip install google-antigravity) runs each tool call through its hooks. deliverd_hook from the Python SDK (pip install deliverd, 0.27.0 or later) is a pre-tool-call hook that asks a named person about the calls you pick:
Python
from google.antigravity import Agent, LocalAgentConfig
from google.antigravity.hooks import policy
from deliverd.aio import AsyncDeliverd
from deliverd.adapters.antigravity import deliverd_hook
config = LocalAgentConfig(
# The SDK's default policy refuses run_command outright; let the hook decide.
policies=[policy.allow_all()],
hooks=[deliverd_hook(
AsyncDeliverd(), # reads DELIVERD_API_KEY: use an agent key
approvers=["platform-leads"],
when=lambda tool, args: tool == "run_command",
)],
)
async with Agent(config) as agent:
await agent.chat("Apply the Terraform plan in infra/prod")- An approved call runs unchanged. A declined one is stopped with the person's reason as the hook's message, which the agent reads. A call approved only with changes is stopped too, with the approved values, so the agent can call again with them.
- Each call is one request, keyed by Antigravity's call id, so asking again finds the same request. A wait that runs out (
timeout) stops the call and leaves the request open. actions={"run_command": "infra.apply"}lets your policy decide first through a gate.approval_handleris the same question as apolicy.ask_user(tool, handler=...)handler, for a policy list you already have; a handler answers only yes or no, so the agent is not told why.
Options
| Option | What it does |
|---|---|
approvers | Who decides: people, teams or groups. Your organisation's admins when omitted. |
when | Which calls go to a person: when(tool, args). Every call by default. |
describe | What the approver reads. Built from the tool, its MCP server and its arguments when omitted. |
actions | Maps a tool to a gate action, so your policy can allow or deny it before a person is asked. |
timeout, expires_in | How long the hook waits on a person (as long as the request is open when omitted), and how long the request stays open (one hour). |
flow_id, metadata | Put each ask on a flow's timeline, or tag it for your own records. |
More on the hook pack and its rules is in its README, beside the files you copy. Antigravity's own pages: MCP, lifecycle hooks, permissions and SDK policies.
Try it on your own agent.
Free to start, no card. Sign up with Google, Microsoft or GitHub, and the first page after hands you an API key.