Google Antigravity SDK 支持本地 AI 模型,首发适配 Gemma 4 26B A4B
Introducing Support for Local AI Models in the Antigravity SDK - Google Developers Blog
Google 宣布 Antigravity SDK 支持本地模型与多种执行方式,首发通过 Google AI Edge 的 LiteRT 支持 Gemma 4 26B A4B,可完全离线运行智能体。官方给出的混合示例中,云端 Gemini 3.8 Flash 负责规划,本地 Gemma 4 26B 实例执行审计与修复,97.2% 的 token(3,322 个)在本地离线完成,云端仅消耗 95 个 token 且不上传源码。该 SDK 还通过 LocalOpenAIAgentConfig 支持 Ollama、LM Studio、vLLM 等 OpenAI 兼容服务。
推荐理由
精选AI 评分 70
官方给出本地模型跑智能体的接入方式与混合架构示例,可据此判断离线与隐私场景的落地路径。
主题
正文
当前显示原文,中文全文译文尚未就绪。
Facebook; Twitter; LinkedIn; Mail
Today, we’re announcing that the Antigravity SDK supports local workflows across a wide range of local models and execution options, featuring initial support for Gemma 4 26B A4B using Google AI Edge’s LiteRT.
The Antigravity SDK enables developers to build with the same agentic capabilities that power Google Antigravity. With this new support you can enable agentic assistance via local models completely offline. We’ve optimized this workflow for LiteRT and Gemma 4 26B, efficiently using the local GPU and RAM in order to further amplify what your local machine is capable of delivering!
Why run agents locally?
Local model execution offers several advantages for agentic experiences:
Cost efficiency: Execute local agentic workflows without API costs or rate limits; Privacy: Keep your code and requests entirely on your local machine, ideal for developers navigating strict data privacy requirements or compliance-restricted corporate environments; Offline resiliency: Execute your agentic workflows seamlessly, even in environments where a consistent or stable internet connection is unavailable; Hybrid workflows: Combine token-efficient local processes with cloud-based ones to maximize efficiency while retaining access to larger, more powerful models when needed
Create a virtual environment:
In your directory, create a file called agy_sample.py. Paste the following contents into it.
In many cases we see that an Architect-Builder pattern is a great way of combining cloud model scale with local model advantages. In the hybrid demo video below, built with the updated Antigravity SDK, a cloud architect (Gemini 3.8 Flash) acts as the planner and conductor, while a local swarm of Gemma 4 26B instances handles the heavy lifting entirely on-device.
When tasked with auditing and patching three vulnerable modules (auth.py, billing.py, and database.py), the workflow maintains strict data privacy and allows us to make the most of our token utilization:
No code uploaded: Gemini 3.8 Flash plans the strategy and decomposes the work based purely on filenames and task descriptions - spending just 95 cloud tokens without any source code ever leaving the machine; Autonomous local gauntlet: Local Gemma 4 26B models take over on the local GPU to execute an adversarial audit loop: reproducing security vulnerabilities, authoring candidate fixes, critiquing patches, and validating against regression test suites; Massive cost and privacy wins: In this recorded run, 97.2% of all tokens (3,322 tokens) run locally and offline without calling a cloud API, delivering fully verified, green patches while keeping proprietary code completely secure on-device
Check out the example project here to run the built-in 3-file gauntlet or point it at your own Python modules and test suite.
Sorry, your browser doesn't support playback for this video
The Antigravity SDK with Gemma 4 26B A4B excels at building practical system utilities. In this example, the agent built a live-updating resource monitor that runs in the terminal. Given a single prompt, the agent autonomously writes a Python script that uses the psutil and rich libraries to track CPU and memory usage, generates the necessary requirements.txt file, and even tests the resulting code to ensure it works - all running entirely on your local machine and using Gemma 4 26B.
Sorry, your browser doesn't support playback for this video
## cli_resource_monitor.py
The Antigravity SDK also offers seamless, plug-and-play support for any OpenAI-compatible server such as Ollama, LM Studio, or vLLM via LocalOpenAIAgentConfig. This gives you the flexibility to experiment with different local inference backends while keeping your agent orchestration, tools, and workflows completely unchanged.
AI; Announcements; Explore
Optimizing a 200,000-line Python codebase overnight with Gemini 4 Argon
Gemini 4 Argon for Robotics