{"type":"post","id":"computer-use-with-gemini-and-cua-driver-26787d","slug":"computer-use-with-gemini-and-cua-driver-26787d","title":"Computer use with Gemini and Cua Driver","description":"Google AI Studio published a Cua AI partner guide dated November 2, 2026, showing how to connect Cua Driver to Antigravity as a local MCP server without writing application code.","retrieval_nugget":"Google AI Studio published a Cua AI partner guide dated November 2, 2026, showing how to connect Cua Driver to Antigravity as a local MCP server without writing application code. The setup lets the agent send clicks and keystrokes in the background while you retain control of the keyboard, pointer, and focus. (aistudio.google.com)","published_at":"2026-12-03","updated_at":"2026-12-03","record_date":"2026-12-03","date_kind":"published_at","topics":["gemini","google","mcp"],"entities":["Google AI Studio","Gemini","Cua Driver","Antigravity"],"related_patterns":["agent-protocols-become-interoperability-layer","harness-architecture-outlives-model-choice"],"novelty_label":"new_fact","what_changed":"Google AI Studio published a guide for connecting Gemini to Cua Driver through Antigravity MCP or the Interactions API, enabling background control of desktop apps.","prior_refs":[],"source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","source_urls":["https://aistudio.google.com/learn/partner-cua-computer-use-gemini"],"production":{"schema":"newruntime-production-v1","desk":"newsroom","first_seen_at":"2026-12-03T14:00:34.076Z","independent_sources":1,"notes_synthesized":null,"writer_model":"gpt-6-luna","critic":null,"checks":["primary_source_verified","source_fresh","one_story","copy_contract"],"novelty":{"label":"new_fact","confidence":"high"},"editorial_value":"high","human_review":"selective"},"citations":[{"claim":"","quotes":["Add Cua Driver as a local MCP server and let the Antigravity agent drive desktop apps with no application code.","This guide shows you how … pointer, and focus stay yours."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Add%20Cua%20Driver%20as%20a%20local%20MCP%20server%20and%20let%20the%20Antigravity%20agent%20drive%20desktop%20apps%20with%20no%20application%20code.&text=This%20guide%20shows%20you%20how,pointer%2C%20and%20focus%20stay%20yours.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"The Antigravity desktop app, IDE, and CLI share one MCP configuration, so the same server setup can serve each.","quotes":["This guide shows you how … pointer, and focus stay yours.","The same approach works for any app with an accessibility tree: native apps, Electron apps, and browsers on macOS, Windows, and Linux."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=This%20guide%20shows%20you%20how,pointer%2C%20and%20focus%20stay%20yours.&text=The%20same%20approach%20works%20for%20any%20app%20with%20an%20accessibility%20tree%3A%20native%20apps%2C%20Electron%20apps%2C%20and%20browsers%20on%20macOS%2C%20Windows%2C%20and%20Linux.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["Antigravity runs Gemini agents with local MCP servers, and the desktop app, IDE, and CLI share one MCP configuration."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Antigravity%20runs%20Gemini%20agents%20with%20local%20MCP%20servers%2C%20and%20the%20desktop%20app%2C%20IDE%2C%20and%20CLI%20share%20one%20MCP%20configuration.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"The loop returns tool results to Gemini as function results containing text, structured JSON, and image parts.","quotes":["Use the google-genai SDK and Cua Driver's typed tools with the Interactions API in about 100 lines of code."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Use%20the%20google%2Dgenai%20SDK%20and%20Cua%20Driver%27s%20typed%20tools%20with%20the%20Interactions%20API%20in%20about%20100%20lines%20of%20code.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"Its example calls for a fresh window snapshot after changes because earlier element tokens become stale; target apps must already be open unless you add the launchapp tool.","quotes":["Results: Each result goes back to Gemini as a function_result with text, structured JSON, and image parts so the model has fresh element tokens for its next call."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Results%3A%20Each%20result%20goes%20back%20to%20Gemini%20as%20a%20function_result%20with%20text%2C%20structured%20JSON%2C%20and%20image%20parts%20so%20the%20model%20has%20fresh%20element%20tokens%20for%20its%20next%20call.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["// This example expects its apps to be open; add \"launch_app\" to let the agent open apps."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=%2F%2F%20This%20example%20expects%20its%20apps%20to%20be%20open%3B%20add%20%22launch_app%22%20to%20let%20the%20agent%20open%20apps.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"The custom-loop examples support Python 3.10+ or TypeScript with Node.js 20+.","quotes":["Create an API key in Google AI Studio and set GEMINI_API_KEY in the terminal session you plan to use. This walkthrough uses macOS 14 or later (for Windows and Linux commands, see Next steps below).","Run the installer script to install Cua Driver 0.35.2 or later.","Install agy 1.1.16 or later (agy mcp requires 1.1.16+, and modelProvider requires 1.1.13+)."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Create%20an%20API%20key%20in%20Google%20AI%20Studio%20and%20set%20GEMINI_API_KEY%20in%20the%20terminal%20session%20you%20plan%20to%20use.%20This%20walkthrough%20uses%20macOS%2014%20or%20later%20%28for%20Windows%20and%20Linux%20commands%2C%20see%20Next%20steps%20below%29.&text=Run%20the%20installer%20script%20to%20install%20Cua%20Driver%200.35.2%20or%20later.&text=Install%20agy%201.1.16%20or%20later%20%28agy%20mcp%20requires%201.1.16%2B%2C%20and%20modelProvider%20requires%201.1.13%2B%29.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["To control the prompt, tool set, and execution loop yourself, pair Gemini's Interactions API with Cua Driver's typed Python (3.10+) or TypeScript (Node.js 20+) SDK. On macOS, also enable Accessibility and Screen Recording for your terminal app in System Settings."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=To%20control%20the%20prompt%2C%20tool%20set%2C%20and%20execution%20loop%20yourself%2C%20pair%20Gemini%27s%20Interactions%20API%20with%20Cua%20Driver%27s%20typed%20Python%20%283.10%2B%29%20or%20TypeScript%20%28Node.js%2020%2B%29%20SDK.%20On%20macOS%2C%20also%20enable%20Accessibility%20and%20Screen%20Recording%20for%20your%20terminal%20app%20in%20System%20Settings.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"Its hands-on walkthrough is specifically for macOS 14 or later, even though the guide describes support for accessible apps on Windows and Linux as well.","quotes":["The same approach works for any app with an accessibility tree: native apps, Electron apps, and browsers on macOS, Windows, and Linux."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=The%20same%20approach%20works%20for%20any%20app%20with%20an%20accessibility%20tree%3A%20native%20apps%2C%20Electron%20apps%2C%20and%20browsers%20on%20macOS%2C%20Windows%2C%20and%20Linux.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["Create an API key in Google AI Studio and set GEMINI_API_KEY in the terminal session you plan to use. This walkthrough uses macOS 14 or later (for Windows and Linux commands, see Next steps below).","The same approach works for any app with an accessibility tree: native apps, Electron apps, and browsers on macOS, Windows, and Linux."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Create%20an%20API%20key%20in%20Google%20AI%20Studio%20and%20set%20GEMINI_API_KEY%20in%20the%20terminal%20session%20you%20plan%20to%20use.%20This%20walkthrough%20uses%20macOS%2014%20or%20later%20%28for%20Windows%20and%20Linux%20commands%2C%20see%20Next%20steps%20below%29.&text=The%20same%20approach%20works%20for%20any%20app%20with%20an%20accessibility%20tree%3A%20native%20apps%2C%20Electron%20apps%2C%20and%20browsers%20on%20macOS%2C%20Windows%2C%20and%20Linux.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"Install Cua Driver with /bin/bash -c \"$(curl -fsSL https://cua.ai/driver/install.sh)\".","quotes":["Create an API key in Google AI Studio and set GEMINI_API_KEY in the terminal session you plan to use. This walkthrough uses macOS 14 or later (for Windows and Linux commands, see Next steps below)."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Create%20an%20API%20key%20in%20Google%20AI%20Studio%20and%20set%20GEMINI_API_KEY%20in%20the%20terminal%20session%20you%20plan%20to%20use.%20This%20walkthrough%20uses%20macOS%2014%20or%20later%20%28for%20Windows%20and%20Linux%20commands%2C%20see%20Next%20steps%20below%29.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"On macOS, grant CuaDriver Accessibility and Screen & System Audio Recording permissions; on macOS 26, allow direct screen access if prompted.","quotes":["/bin/bash -c \"$(curl -fsSL https://cua.ai/driver/install.sh)\""],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=%2Fbin%2Fbash%20%2Dc%20%22%24%28curl%20%2DfsSL%20https%3A%2F%2Fcua.ai%2Fdriver%2Finstall.sh%29%22","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["When macOS prompts you, choose Open System Settings and turn on CuaDriver under Accessibility and Screen & System Audio Recording."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=When%20macOS%20prompts%20you%2C%20choose%20Open%20System%20Settings%20and%20turn%20on%20CuaDriver%20under%20Accessibility%20and%20Screen%20%26%20System%20Audio%20Recording.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"To use a Gemini API key rather than signing in with a Google account, set \"modelProvider\": \"gemini\".","quotes":["Write the server entry to ~/.gemini/config/mcp_config.json and confirm it shows as enabled. If you prefer to edit that file manually, run cua-driver mcp-config --client antigravity to print the JSON block."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Write%20the%20server%20entry%20to%20%7E%2F.gemini%2Fconfig%2Fmcp_config.json%20and%20confirm%20it%20shows%20as%20enabled.%20If%20you%20prefer%20to%20edit%20that%20file%20manually%2C%20run%20cua%2Ddriver%20mcp%2Dconfig%20%2D%2Dclient%20antigravity%20to%20print%20the%20JSON%20block.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"For a small first test, run agy --model gemini-4-argon-low -p \"Use only the cua-driver tools.","quotes":["To sign in with your Gemini API key instead of a Google account, set \"modelProvider\": \"gemini\" in step 3."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=To%20sign%20in%20with%20your%20Gemini%20API%20key%20instead%20of%20a%20Google%20account%2C%20set%20%22modelProvider%22%3A%20%22gemini%22%20in%20step%203.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"To avoid a prompt before every Cua Driver action, add \"mcp(cua-driver/)\" to the allow list in ~/.gemini/antigravity-cli/settings.json.","quotes":["\\# Or run non-interactively in print mode: agy --model gemini-4-argon-low -p \"Use only the cua-driver tools. List the windows that are open right now.\""],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=%5C%23%20Or%20run%20non%2Dinteractively%20in%20print%20mode%3A%20agy%20%2D%2Dmodel%20gemini%2D4%2Dargon%2Dlow%20%2Dp%20%22Use%20only%20the%20cua%2Ddriver%20tools.%20List%20the%20windows%20that%20are%20open%20right%20now.%22","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"},{"claim":"","quotes":["Add an allow rule to ~/.gemini/antigravity-cli/settings.json so Antigravity does not prompt before every Cua Driver action. It still asks before running unapproved shell commands."],"cite_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini#:~:text=Add%20an%20allow%20rule%20to%20%7E%2F.gemini%2Fantigravity%2Dcli%2Fsettings.json%20so%20Antigravity%20does%20not%20prompt%20before%20every%20Cua%20Driver%20action.%20It%20still%20asks%20before%20running%20unapproved%20shell%20commands.","source_url":"https://aistudio.google.com/learn/partner-cua-computer-use-gemini","publisher":"aistudio.google.com"}],"schema_version":"newruntime-agent-readable-v0.2","stable_id":"post:computer-use-with-gemini-and-cua-driver-26787d","status":"published","visuals":[],"editor":{"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]},"routes":{"html":"https://newruntime.com/posts/computer-use-with-gemini-and-cua-driver-26787d/","markdown":"https://newruntime.com/posts/computer-use-with-gemini-and-cua-driver-26787d.md","json":"https://newruntime.com/posts/computer-use-with-gemini-and-cua-driver-26787d.json"},"markdown_url":"https://newruntime.com/posts/computer-use-with-gemini-and-cua-driver-26787d.md","next_reads":[{"type":"topic","path":"/topics/gemini/","url":"https://newruntime.com/topics/gemini/","title":"Gemini","reason":"Explore the gemini topic hub.","media_type":"text/html","markdown_url":"https://newruntime.com/topics/gemini.md","json_url":"https://newruntime.com/topics/gemini.json"},{"type":"topic","path":"/topics/google/","url":"https://newruntime.com/topics/google/","title":"Google","reason":"Explore the google topic hub.","media_type":"text/html","markdown_url":"https://newruntime.com/topics/google.md","json_url":"https://newruntime.com/topics/google.json"},{"type":"topic","path":"/topics/mcp/","url":"https://newruntime.com/topics/mcp/","title":"Mcp","reason":"Explore the mcp topic hub.","media_type":"text/html","markdown_url":"https://newruntime.com/topics/mcp.md","json_url":"https://newruntime.com/topics/mcp.json"},{"type":"collection","path":"/posts/","url":"https://newruntime.com/posts/","title":"Field Notes","reason":"Open the latest editorial analysis.","media_type":"text/html","json_url":"https://newruntime.com/posts.json"},{"type":"collection","path":"/sources/","url":"https://newruntime.com/sources/","title":"Sources","reason":"See the original sources this archive cites.","media_type":"text/html"}]}
