{"slug": "introducing-support-for-local-ai-models-in-the-antigravity-sdk", "title": "Introducing Support for Local AI Models in the Antigravity SDK", "summary": "Google announced that its Antigravity SDK now supports local AI model workflows, with initial support for Gemma 4 26B A4B running through Google AI Edge's LiteRT runtime. The company recommends a machine with more than 24GB of VRAM or unified memory, and says the setup lets developers run agentic assistance fully offline using local GPU and RAM. Google also demonstrated an Architect-Builder pattern in which cloud model Gemini 3.8 Flash plans tasks while a local swarm of Gemma 4 26B instances executes them on-device.", "body_md": "Today, we’re announcing that the [Antigravity SDK](https://antigravity.google/product/antigravity-sdk/) supports local workflows across a wide range of local models and execution options, featuring initial support for [Gemma 4 26B A4B](https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/) using [Google AI Edge](https://developers.google.com/edge)’s [LiteRT](https://developers.google.com/edge/litert).\n\nThe Antigravity SDK enables developers to build with the same agentic capabilities that power [Google Antigravity](https://antigravity.google/). 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!\n\nLocal model execution offers several advantages for agentic experiences:\n\nHere is how you can get started: (**We recommended a machine with >24GB VRAM or unified memory).**\n\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npip install google-antigravity litert-lm\n\nlitert-lm import \\\n  --from-huggingface-repo=litert-community/gemma-4-26B-A4B-it-litert-lm \\\n  gemma-4-26B-A4B-it-gpu.litertlm \\\n  gemma4-26b\n```\n\n**In your directory, create a file** called `agy_sample.py`. Paste the following contents into it.\n\n``` python\nimport asyncio\nimport os\nfrom google.antigravity import Agent, LiteRTAgentConfig\nfrom google.antigravity.hooks import policy\n\n# UPDATE: Point to the locally downloaded model from the previous step (litert-lm import ...)\nMODEL_PATH = os.path.expanduser(\"~/.litert-lm/models/gemma4-26b/model.litertlm\")\n\nasync def main():\n   print(f\"Using local LiteRT model: {MODEL_PATH}. Please wait for local inference to complete. This could take several minutes.\")\n\n   config = LiteRTAgentConfig(model_path=MODEL_PATH).lightweight()\n   async with Agent(config) as agent:\n      response = await agent.chat(\"What files are in the current directory?\")\n      async for token in response:\n         print(token, end=\"\", flush=True)\n\nif __name__ == \"__main__\":\n   asyncio.run(main())\n```\n\nIn 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.\n\nWhen 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:\n\nCheck out the example project [here](https://goo.gle/47cKYyV) to run the built-in 3-file gauntlet or point it at your own Python modules and test suite.\n\nThe 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.\n\n`## cli_resource_monitor.py`\n\n``` python\nimport asyncio\nimport os\nfrom google.antigravity import Agent, LiteRTAgentConfig\nfrom google.antigravity.hooks import policy\n\n# UPDATE: Your prompt\nPROMPT = \"Build a command-line interface tool using the psutil and rich libraries that displays a live-updating terminal dashboard. It should show CPU usage, memory consumption, and a sorted table of the top 5 most memory-intensive processes. Save the script as 'monitor.py' and create a 'requirements.txt' file. Test that it works.\"\n\n# UPDATE: Point to the locally imported LiteRT-LM model path\nMODEL_PATH = os.path.expanduser(\"~/.litert-lm/models/gemma4-26b/model.litertlm\")\n\n# UPDATE: Give AGY-SDK a workspace to write files\nWORKING_DIR = os.path.expanduser(\"~/agy-test\")\n\nos.makedirs(WORKING_DIR, exist_ok=True)\nos.chdir(WORKING_DIR)\n\nasync def main():\n  print(f\"Using local LiteRT model: {MODEL_PATH}. Please wait for local inference to complete. This could take several minutes.\")\n\n  config = LiteRTAgentConfig(\n     model_path=MODEL_PATH,\n     workspaces=[WORKING_DIR],\n     policies=[policy.allow_all()],\n  ).lightweight()\n\n  async with Agent(config) as agent:\n     response = await agent.chat(PROMPT)\n     async for token in response:\n        print(token, end=\"\", flush=True)\n\nif __name__ == \"__main__\":\n  asyncio.run(main())\n```\n\nThe 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.\n\nGet started with local AI by checking the instructions on the [Antigravity Python SDK README](https://github.com/google-antigravity/antigravity-sdk-python#local-ai-models), and learn more about how you can run models efficiently on the edge using [LiteRT](https://developers.google.com/edge/litert-lm/overview). Please share your feedback and feature requests on the Antigravity Python SDK [GitHub Issue Tracker.](https://github.com/google-antigravity/antigravity-sdk-python/issues) We look forward to seeing what you build!\n\nAcknowledgements: Abhi Patel, Ander Dobo, Ben Miles, Cormac Brick, Ian Ballantyne, Jingxiao Zheng, Jonathan Reay, Kimish Patel, Lu Wang, Marissa Ikonomidis, Matthias Grundmann, Olivier Lacombe, Omar Sanseviero, Rishika Sinha, Rody Davis, Taylor Mullen, Tyler Mullen, Wai Hon Law, Xiaoming Hu, Xu Chen, Yu-hui Chen", "url": "https://wpnews.pro/news/introducing-support-for-local-ai-models-in-the-antigravity-sdk", "canonical_source": "https://developers.googleblog.com/introducing-support-for-local-ai-models-in-the-antigravity-sdk/", "published_at": "2026-09-23 17:30:22.904509+00:00", "updated_at": "2026-09-23 17:30:24.304740+00:00", "lang": "en", "topics": ["ai-products", "ai-tools", "large-language-models", "ai-agents", "developer-tools"], "entities": ["Google", "Antigravity SDK", "Gemma 4 26B A4B", "Google AI Edge", "LiteRT", "Gemini 3.8 Flash", "psutil", "rich"], "alternates": {"html": "https://wpnews.pro/news/introducing-support-for-local-ai-models-in-the-antigravity-sdk", "markdown": "https://wpnews.pro/news/introducing-support-for-local-ai-models-in-the-antigravity-sdk.md", "text": "https://wpnews.pro/news/introducing-support-for-local-ai-models-in-the-antigravity-sdk.txt", "jsonld": "https://wpnews.pro/news/introducing-support-for-local-ai-models-in-the-antigravity-sdk.jsonld"}}