Antigravity Agent

Antigravity एजेंट, Gemini API पर मैनेज किया जाने वाला एक सामान्य एजेंट है. एपीआई के एक कॉल से आपको ऐसा एजेंट मिलता है जो तर्क दे सकता है, कोड चला सकता है, फ़ाइलें मैनेज कर सकता है, और Google के होस्ट किए गए, सुरक्षित Linux सैंडबॉक्स में वेब ब्राउज़ कर सकता है.

यह Gemini 3.5 Flash पर काम करता है और Antigravity IDE की तरह ही हार्नेस का इस्तेमाल करता है. यह Interactions API और Google AI Studio के ज़रिए उपलब्ध है.

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Read Hacker News, summarize the top 10 stories, and save the results as a PDF.",
    environment="remote",
)

print(interaction.output_text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
    agent: "antigravity-preview-05-2026",
    input: "Read Hacker News, summarize the top 10 stories, and save the results as a PDF.",
    environment: "remote",
}, { timeout: 300000 });

console.log(interaction.output_text);

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Api-Revision: 2026-05-20" \
-d '{
    "agent": "antigravity-preview-05-2026",
    "input": "Read Hacker News, summarize the top 10 stories, and save the results as a PDF.",
    "environment": "remote"
}'

क्षमताएं

हर कॉल से एक Linux सैंडबॉक्स उपलब्ध कराया जा सकता है और टूल-यूज़ लूप शुरू किया जा सकता है. एजेंट, प्लान करता है, काम करता है, नतीजों को देखता है, और तब तक दोहराता है, जब तक टास्क पूरा नहीं हो जाता.

  • कोड चलाना: Bash, Python, और Node.js कमांड चलाएं. पैकेज इंस्टॉल करें, टेस्ट चलाएं, ऐप्लिकेशन बनाएं.
  • फ़ाइल मैनेजमेंट: सैंडबॉक्स में फ़ाइलें पढ़ें, लिखें, उनमें बदलाव करें, खोजें, और उनकी सूची बनाएं. इंटरैक्शन के दौरान, फ़ाइलें बनी रहती हैं.
  • वेब ऐक्सेस: डेटा के लिए Google Search और यूआरएल फ़ेच करना.
  • कॉन्टेक्स्ट कंपैक्शन: लंबे समय तक चलने वाले, मल्टी-टर्न सेशन के लिए, कॉन्टेक्स्ट या टोकन की सीमाएं पार किए बिना, कॉन्टेक्स्ट कंपैक्शन की सुविधा अपने-आप चालू हो जाती है. यह सुविधा, ~1,35,000 टोकन पर ट्रिगर होती है.

मल्टी-टर्न इस्तेमाल और स्ट्रीमिंग के बारे में जानने के लिए, क्विकस्टार्ट गाइड देखें.

इन टूल पर पासकी का इस्तेमाल किया जा सकता है

डिफ़ॉल्ट रूप से, एजेंट के पास code_execution, google_search, और url_context का ऐक्सेस होता है. environment पैरामीटर तय करने पर, फ़ाइल सिस्टम के टूल अपने-आप चालू हो जाते हैं. डिफ़ॉल्ट सेट को पसंद के मुताबिक बनाने या उस पर पाबंदी लगाने के लिए, आपको सिर्फ़ tools पैरामीटर तय करना होगा.

टूल वैल्यू टाइप करें ब्यौरा
कोड चलाना code_execution stdout/stderr कैप्चर के साथ, शेल कमांड (bash, Python, Node) चलाएं.
Google Search google_search सार्वजनिक वेब पर खोजें.
यूआरएल का कॉन्टेक्स्ट url_context वेब पेज फ़ेच करें और उन्हें पढ़ें.
फ़ाइल सिस्टम (यह सुविधा, environment पैरामीटर के ज़रिए चालू होती है) सैंडबॉक्स में फ़ाइलें पढ़ें, लिखें, उनमें बदलाव करें, खोजें, और उनकी सूची बनाएं. इसके लिए कोई अलग टूल टाइप नहीं है. environment सेट करने पर, यह सुविधा अपने-आप चालू हो जाती है.

एजेंट को सिर्फ़ कुछ टूल तक सीमित करने के लिए, सिर्फ़ वे टूल पास करें जिनकी आपको ज़रूरत है:

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Search for the latest AI research papers on reasoning and summarize them.",
    environment="remote",
    tools=[
        {"type": "google_search"},
        {"type": "url_context"},
    ],
)

print(interaction.output_text)

JavaScript

import { GoogleGenAI } from "@google/genai";

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
    agent: "antigravity-preview-05-2026",
    input: "Search for the latest AI research papers on reasoning and summarize them.",
    environment: "remote",
    tools: [
        { type: "google_search" },
        { type: "url_context" },
    ],
}, { timeout: 300000 });

console.log(interaction.output_text);

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Api-Revision: 2026-05-20" \
-d '{
    "agent": "antigravity-preview-05-2026",
    "input": "Search for the latest AI research papers on reasoning and summarize them.",
    "environment": "remote",
    "tools": [
        {"type": "google_search"},
        {"type": "url_context"}
    ]
}'

मल्टीमोडल इनपुट

Antigravity एजेंट, मल्टीमोडल इनपुट के साथ काम करता है. फ़िलहाल, सिर्फ़ text और image इनपुट के साथ काम किया जा सकता है. इमेज को इनलाइन base64-encoded स्ट्रिंग (data) के तौर पर उपलब्ध कराया जाना चाहिए.

Python

import base64
from google import genai

client = genai.Client()

with open("path/to/chart.png", "rb") as f:
    image_bytes = f.read()

interaction_inline = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input=[
        {"type": "text", "text": "Analyze this chart and summarize the trends."},
        {
            "type": "image",
            "data": base64.b64encode(image_bytes).decode("utf-8"),
            "mime_type": "image/png",
        },
    ],
    environment="remote",
)

JavaScript


import { GoogleGenAI } from "@google/genai";

import * as fs from "node:fs";

const client = new GoogleGenAI({});
const base64Image = fs.readFileSync("path/to/chart.png", { encoding: "base64" });

const interactionInline = await client.interactions.create({
    agent: "antigravity-preview-05-2026",
    input: [
        { type: "text", text: "Analyze this chart and summarize the trends." },
        {
            type: "image",
            data: base64Image,
            mime_type: "image/png",
        },
    ],
    environment: "remote",
}, { timeout: 300000 });

REST

BASE64_IMAGE=$(base64 -w0 /path/to/chart.png)

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Api-Revision: 2026-05-20" \
-d "{
    \"agent\": \"antigravity-preview-05-2026\",
    \"input\": [
        {\"type\": \"text\", \"text\": \"Analyze this chart and summarize the trends.\"},
        {
            \"type\": \"image\",
            \"mime_type\": \"image/png\",
            \"data\": \"$BASE64_IMAGE\"
        }
    ],
    \"environment\": \"remote\"
}"

एजेंट को पसंद के मुताबिक बनाना

निर्देश, टूल, और एनवायरमेंट को पसंद के मुताबिक बनाकर, Antigravity एजेंट को बढ़ाया जा सकता है. एजेंट, पसंद के मुताबिक बनाने के लिए, फ़ाइल सिस्टम-नेटिव अप्रोच के साथ काम करता है. इसके लिए, AGENTS.md जैसी फ़ाइलें, सीधे सैंडबॉक्स में .agents/skills/ के तहत, निर्देशों और कौशल के लिए माउंट की जा सकती हैं. इसके अलावा, इंटरैक्शन के दौरान, कॉन्फ़िगरेशन को इनलाइन पास किया जा सकता है. कॉन्फ़िगरेशन को इनलाइन दोहराया जा सकता है. इसके बाद, तैयार होने पर इसे मैनेज किए गए एजेंट के तौर पर सेव किया जा सकता है.

कस्टम एजेंट बनाने के बारे में पूरी जानकारी के लिए, मैनेज किए गए एजेंट बनाना लेख पढ़ें.

एनवायरमेंट

हर कॉल से एक Linux सैंडबॉक्स बनता है या उसका दोबारा इस्तेमाल किया जाता है. environment पैरामीटर तीन तरह से इस्तेमाल किया जा सकता है:

फ़ॉर्म ब्यौरा
"remote" डिफ़ॉल्ट सेटिंग के साथ, नया सैंडबॉक्स उपलब्ध कराएं.
"env_abc123" आईडी के हिसाब से, मौजूदा एनवायरमेंट का दोबारा इस्तेमाल करें. इससे सभी फ़ाइलें और स्टेट बनी रहती हैं.
{...} कस्टम सोर्स और नेटवर्क के नियमों के साथ, पूरा EnvironmentConfig.

सोर्स (Git, GCS, इनलाइन), नेटवर्किंग, लाइफ़साइकल, और संसाधन की सीमाओं के बारे में ज़्यादा जानने के लिए, एनवायरमेंट देखें.

उपलब्धता और कीमत

Antigravity एजेंट, Google AI Studio और Gemini API में, Interactions API के ज़रिए झलक के तौर पर उपलब्ध है.

कीमत, इस्तेमाल के हिसाब से पेमेंट करने वाले मॉडल पर आधारित होती है. यह कीमत, Gemini मॉडल के टोकन और एजेंट के इस्तेमाल किए जाने वाले टूल के हिसाब से तय की जाती है. चैट के सामान्य अनुरोध से सिर्फ़ एक आउटपुट मिलता है. हालांकि, Antigravity इंटरैक्शन, एजेंटिक वर्कफ़्लो है. एक अनुरोध से, तर्क देने, टूल चलाने, कोड चलाने, और फ़ाइल मैनेजमेंट का एक ऑटोनॉमस लूप ट्रिगर होता है.

अनुमानित लागत

टास्क की जटिलता के हिसाब से लागत अलग-अलग होती है. एजेंट अपने-आप तय करता है कि टूल कॉल, कोड चलाने, और फ़ाइल ऑपरेशन की कितनी ज़रूरत है. नीचे दिए गए अनुमान, रन के आधार पर हैं.

टास्क की कैटगरी इनपुट टोकन आउटपुट टोकन औसत लागत के बराबर
रिसर्च और जानकारी को एक साथ लाना 1,00,000–5,00,000 10,000–40,000 0.30–1.00 डॉलर
दस्तावेज़ और कॉन्टेंट जनरेट करना 1,00,000–5,00,000 15,000–50,000 0.30–1.30 डॉलर
प्रोसेस और सिस्टम डिज़ाइन करना 1,00,000–4,00,000 10,000–30,000 0.25–0.80 डॉलर
डेटा प्रोसेस करना और उसका विश्लेषण करना 3,00,000–30,0,000 30,000–1,50,000 0.70–3.25 डॉलर

आम तौर पर, 50–70% इनपुट टोकन कैश किए जाते हैं. कई टूल कॉल वाले जटिल एजेंटिक वर्कफ़्लो में, एक इंटरैक्शन में 30–50 लाख टोकन इकट्ठा किए जा सकते हैं. इसकी लागत, करीब 5 डॉलर तक हो सकती है.

झलक के दौरान, एनवायरमेंट कंप्यूट (सीपीयू, मेमोरी, सैंडबॉक्स एक्ज़ीक्यूशन) के लिए कोई शुल्क नहीं लिया जाता.

सीमाएं

  • झलक की स्थिति: Antigravity एजेंट और Interactions API, झलक के तौर पर उपलब्ध हैं. इनकी सुविधाएं और स्कीमा बदल सकते हैं.
  • जनरेशन कॉन्फ़िगरेशन के साथ काम न करने वाले पैरामीटर: ये पैरामीटर काम नहीं करते. इनके इस्तेमाल पर, 400 गड़बड़ी दिखती है: temperature, top_p, top_k, stop_sequences, max_output_tokens.
  • स्ट्रक्चर्ड आउटपुट: Antigravity एजेंट, स्ट्रक्चर्ड आउटपुट के साथ काम नहीं करता.
  • उपलब्ध न होने वाले टूल: file_search, computer_use, google_maps, function_calling, और mcp फ़िलहाल उपलब्ध नहीं हैं.
  • फ़ाइल सिस्टम टूल: फ़िलहाल, फ़ाइल सिस्टम टूल उपलब्ध नहीं है. यह environment का हिस्सा है.
  • बैकग्राउंड: एजेंट, background=True के साथ काम नहीं करता. इसके लिए, store=True की ज़रूरत होती है.
  • मल्टीमोडल टाइप के साथ काम न करने वाले पैरामीटर. फ़िलहाल, ऑडियो, वीडियो, और दस्तावेज़ इनपुट के साथ काम नहीं किया जा सकता. सिर्फ़ टेक्स्ट और इमेज का इस्तेमाल किया जा सकता है.

आगे क्या करना है