The official Antigravity Agent page was last updated 2026-09-23. This piece is dated 2026-09-24. Against antigravity-preview-09-2026 and the IDE 2.13 changelog, it turns file, code, and search tool args into JSON you can accept. There is no Structured Output. Why the contract layer is still an object: Why AI likes JSON. How a custom function matches an id: Live Function Calling tutorial.
The user says “write this search hit into notes.json.” When the model reaches, you do not get prose. You get a function_call in steps: a name, an args object, an id. A remote sandbox runs filesystem tools itself. Custom functions need your function_result. Drop call_id, or treat StartLine as a full-file rewrite, and the side effect is already on disk. Same as a hosted text Agent: the loop can be fast; the contract must refuse. See After the Agents API, why JSON matters more.
What September actually shipped
As of 2026-09-24 the Gemini API docs write the agent string as antigravity-preview-09-2026. Omit agent_config and the default model is gemini-3.8-flash. Each call can provision a Linux sandbox, then plan, act, and observe until the task ends. Context compaction kicks in around 135k tokens.
Pin the edges that matter here:
- Default tools:
code_execution,google_search,url_context. Setenvironmentand filesystem tools turn on. - Custom functions / remote MCP:
type: functionandmcp_server. MCP is Streamable HTTP only;namemust be lowercase alphanumeric. - Structured outputs: not supported.
temperature/top_p/max_output_tokensreturn 400. - Not available yet:
file_search,computer_use,google_maps. Input is text and image only. - Function Calling: stateful only. Continue with
previous_interaction_id.
The IDE shipped checkable changes the same month. 2.13.0 (2026-09-09) adds a virtualized viewer and inline comments for SQL / JSONL, and the input box can attach .json / .md / .csv. 2.11.0 already discovers skills.json, agents.json, and rules.json in project subdirectories; view_file can take page ranges. Workflows retire on 2026-11-01 in favor of SKILL.md bundles. Skill boundary: Why coding agents need Skills.
Some SDK samples still say antigravity-preview-05-2026. Trust the main docs and REST samples. Do not copy a stale string. A remote sandbox that only reads output_text usually just needs the agent name. If you parse function_call, the fields have already moved.
One line. September did not make the Agent “talk better.” It changed the JSON shape of file, code, and search tools.
The tool loop is still function_call
Official custom-function flow is short: the session enters requires_action; find function_call steps with no matching function_result; run locally; return with the same call_id. Filesystem tools also appear as function_call, but environment runs them. Do not treat both reaches as “you must execute.”
Pin the custom-function return envelope first:
{
"agent": "antigravity-preview-09-2026",
"previous_interaction_id": "INTERACTION_ID",
"environment": "ENVIRONMENT_ID",
"input": [
{
"type": "function_result",
"name": "get_weather",
"call_id": "call_weather_01",
"result": {
"temperature": 23,
"unit": "celsius"
}
}
]
}
Same shape as a text Agent’s required_actions → tool_result. The shell is Interactions steps. MCP is still one connection inside tools; see Agents API vs MCP.
Files: line ranges, not full rewrites
The official Hooks page writes filesystem args in PascalCase. Create and edit are not the same operation:
write_to_file: create.TargetFile,CodeContent,Overwrite,Description.replace_file_content: one contiguous block.TargetFile,StartLine,EndLine,TargetContent,ReplacementContent.view_file: read.AbsolutePath, optionalStartLine/EndLine.list_dir: list.DirectoryPath.
An edit call you can accept locally:
{
"type": "function_call",
"name": "replace_file_content",
"id": "call_edit_01",
"arguments": {
"TargetFile": "notes.json",
"StartLine": 4,
"EndLine": 6,
"TargetContent": " \"status\": \"draft\"",
"ReplacementContent": " \"status\": \"reviewed\"",
"Description": "Mark the note as reviewed"
}
}
The contract pins path and line numbers. Missing StartLine, or stuffing a whole file into ReplacementContent, should fail:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": ["TargetFile", "StartLine", "EndLine", "TargetContent", "ReplacementContent"],
"properties": {
"TargetFile": { "type": "string", "minLength": 1 },
"StartLine": { "type": "integer", "minimum": 1 },
"EndLine": { "type": "integer", "minimum": 1 },
"TargetContent": { "type": "string" },
"ReplacementContent": { "type": "string" },
"Description": { "type": "string" }
}
}
Pin the shapes that must fail: a leftover file_path snake_case key; content with no line numbers; StartLine as the string "4". If the executor still treats replace_file_content as a full overwrite, an eight-line patch wipes notes.json. How coding agents patch JSON: How agents read and edit JSON config.
Code: code_execution in and out
code_execution runs Bash / Python / Node and captures stdout / stderr. A remote sandbox runs it by default. If you intercept with Hooks, the args are still an object. Do not mix a command string with a file patch.
{
"type": "function_call",
"name": "code_execution",
"id": "call_code_01",
"arguments": {
"language": "python",
"code": "print(open('notes.json').read())"
},
"function_result": {
"call_id": "call_code_01",
"name": "code_execution",
"result": {
"stdout": "{\n \"status\": \"reviewed\"\n}\n",
"stderr": "",
"exit_code": 0
}
}
}
The result object must parse. Treat the raw terminal dump as the final contract and the next “write JSON back” step will break escapes. Format first on the workbench. A too-wide shell and a malicious MCP are the same class of risk; see Limit tool permission with Schema.
Search: grep_search / find_by_name / the web
September pulled “find it in the repo” out of ad-hoc shell into built-in tools. Hooks-page args:
grep_search:SearchPath,Query, optionalIsRegex,CaseInsensitive,Includes.find_by_name:SearchDirectory,Pattern, optionalMaxDepth,Extensions.- Web:
google_search/url_contextstay default. Hooks names:search_web,read_url_content.
{
"type": "function_call",
"name": "grep_search",
"id": "call_grep_01",
"arguments": {
"SearchPath": "src",
"Query": "status",
"IsRegex": false,
"Includes": ["*.json"]
},
"result": {
"matches": [
{
"path": "src/notes.json",
"line": 4,
"text": " \"status\": \"draft\""
}
]
}
}
Search results are objects too: path, line, text. If the next step edits that line, emit replace_file_content. Do not open another unbounded shell. IDE 2.13 putting JSONL in a viewer does not change this contract — the viewer is for humans; the executor still eats fields.
No Structured Output — why Schema matters more
The model card and Limitations say the Antigravity Agent does not support Structured outputs. The closing line “written into notes.json” is not an object you can pin with responseSchema. Easy mistake: “then there is no JSON contract.” Wrong layer:
- Structured Output constrains the final reply.
- Function Calling / filesystem tools constrain each reach.
September made the second layer more brittle. Keys moved from snake_case to PascalCase. Edits moved from whole files to line ranges. A local executor still reading file_path silently gets empty, not an immediate error. There is no reply Schema to catch it. The check before execute is the only hard gate. Definition: What Structured Output is.
Custom functions still follow the Schema you declare. The official weather sample uses location, not Location. Built-in file tools use TargetFile. Do not smash both into one “generic args” object.
How to accept it in JSON Toolbox
- Paste the
replace_file_contentandgrep_searchobjects above into JSON format. Confirm they parse and the keys are PascalCase. - Use JSON → Schema for a core contract, then add
required,minimum, andadditionalProperties. - Run the same fields through Function Calling. If another host will reuse them, wrap MCP Tool.
- Drop failing shapes (
file_path,StartLine: "4", whole-filecontentwith no lines) into Schema validator and confirm they fail. When you need a reply shape, use Structured Output — remember the Antigravity Agent does not consume that reply contract.
Everything stays in the browser. Nothing is uploaded. First have an object that refuses old keys and line-less overwrites, then change the agent string to antigravity-preview-09-2026.
FAQ
Does the Antigravity Agent support Structured Output?
Docs say no. What you can pin is the function-parameter Schema and the filesystem tool args.
Do I execute write_to_file locally in a remote sandbox?
No. The environment runs it. You run custom functions. Copy name and call_id on return.
Why are filesystem tool fields PascalCase?
That is how the official Hooks page lists them. Custom functions still follow your Schema. Do not mix the two key sets.
What if I still call antigravity-preview-05-2026?
The main docs already say 09-2026. Final-text-only clients just change the string. Parsers of function_call must update fields and line-range patches.
Can Function Calling replay history in stateless mode?
No. Continue with previous_interaction_id.
Summary
The September Antigravity update folds the default agent into antigravity-preview-09-2026, model default Gemini 3.8 Flash. Files become line-range JSON. Search becomes grep_search / find_by_name. Code execution still emits a stdout object. There is no Structured Output, and custom-function execution is still yours. What you hold is Schema on function_call.arguments before the executor: PascalCase, line numbers, and function_result.call_id. The next step is not more repo tools. It is refusing file_path and a whole-file overwrite with no lines.