मैनेज किए गए एजेंट बनाना

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

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

कस्टम एजेंट बनाने का सबसे तेज़ तरीका यह है कि नया इंटरैक्शन बनाते समय, अपने कॉन्फ़िगरेशन को इनलाइन पास करें. इसके लिए, रजिस्ट्रेशन करने की ज़रूरत नहीं होती. एजेंट को तीन तरीकों से बढ़ाया जा सकता है:

  • सिस्टम के निर्देश: system_instruction के ज़रिए, इनलाइन टेक्स्ट को शेप के व्यवहार में पास करें.
  • टूल: डिफ़ॉल्ट टूल (कोड एक्ज़ीक्यूशन, खोज, यूआरएल कॉन्टेक्स्ट) को बदलें.
  • फ़ाइलें और स्किल: AGENTS.md और SKILL.md जैसी फ़ाइलों को एनवायरमेंट में माउंट करें.

यहां तीनों को इनलाइन पास करने का उदाहरण दिया गया है:

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Analyze the Q1 revenue data and create a slide deck.",
    system_instruction="You are a data analyst. Always include visualizations and export results as PDF.",        
    environment={
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/AGENTS.md",
                "content": "Always use matplotlib for charts. Include a summary table in every report.",
            },
            {
                "type": "inline",
                "target": ".agents/skills/slide-maker/SKILL.md",
                "content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results.",
            },
        ],
    },
)

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: "Analyze the Q1 revenue data and create a slide deck.",
    system_instruction: "You are a data analyst. Always include visualizations and export results as PDF.",        
    environment: {
        type: "remote",
        sources: [
            {
                type: "inline",
                target: ".agents/AGENTS.md",
                content: "Always use matplotlib for charts. Include a summary table in every report.",
            },
            {
                type: "inline",
                target: ".agents/skills/slide-maker/SKILL.md",
                content: "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results.",
            },
        ],
    },
}, { 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": "Analyze the Q1 revenue data and create a slide deck.",
    "system_instruction": "You are a data analyst. Always include visualizations and export results as PDF.",
    "environment": {
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/AGENTS.md",
                "content": "Always use matplotlib for charts. Include a summary table in every report."
            },
            {
                "type": "inline",
                "target": ".agents/skills/slide-maker/SKILL.md",
                "content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results."
            }
        ]
    }
}'

इंटरैक्शन के समय ही सब कुछ तय किया जाता है. इसके लिए, आपको पहले कुछ भी रजिस्टर करने की ज़रूरत नहीं है. Antigravity एजेंट का हार्नेस, रनटाइम (कोड एक्ज़ीक्यूशन, फ़ाइल मैनेजमेंट, वेब ऐक्सेस) और आपके कॉन्फ़िगरेशन लेयर उपलब्ध कराता है.

टूल और सिस्टम के निर्देश

system_instruction और tools पैरामीटर का इस्तेमाल करके, किसी खास इंटरैक्शन के लिए एजेंट के व्यवहार और क्षमताओं को अपनी पसंद के मुताबिक बनाया जा सकता है.

  • सिस्टम के निर्देश: एजेंट के व्यवहार को तय करने वाले इनलाइन टेक्स्ट को पास करने के लिए, system_instruction पैरामीटर का इस्तेमाल करें. यह सुविधा, उन बदलावों के लिए सबसे सही है जिन्हें आपको हर कॉल के हिसाब से बदलना है. system_instruction और AGENTS.md, दोनों को जोड़ा जा सकता है. अगर ये दोनों मौजूद हैं, तो दोनों लागू होंगी.
  • टूल: डिफ़ॉल्ट रूप से, Antigravity एजेंट के पास code_execution, google_search, और url_context का ऐक्सेस होता है. इंटरैक्शन के समय tools पैरामीटर पास करके, इस सूची को बदला जा सकता है. उपलब्ध टूल और उन्हें इस्तेमाल करने के तरीके के बारे में पूरी जानकारी के लिए, Antigravity Agent: काम करने वाले टूल लेख पढ़ें.

फ़ाइल के आधार पर मनमुताबिक बनाने की सुविधा

एजेंट डायरेक्ट्री स्ट्रक्चर

कॉन्फ़िगरेशन को इनलाइन पास किया जा सकता है. हालांकि, हमारा सुझाव है कि आप अपने एजेंट की फ़ाइलों को व्यवस्थित डायरेक्ट्री में सेव करें. इससे, एजेंट के एनवायरमेंट में डेटा को मैनेज करना, वर्शन कंट्रोल करना, और माउंट करना आसान हो जाता है.

किसी एजेंट प्रोजेक्ट की डायरेक्ट्री आम तौर पर ऐसी दिखती है:

my-agent/
├── AGENTS.md        # Instructions on how the agent should operate
├── skills/          # Custom skills (subfolders and SKILL.md files)
│   └── slide-maker/
│       └── SKILL.md
└── workspace/       # Initial data files and knowledge

Antigravity रनटाइम, इन फ़ाइलों के लिए .agents/ (और एनवायरमेंट के रूट) को स्कैन करता है.

AGENTS.md

एजेंट, स्टार्टअप पर सिस्टम के निर्देशों के तौर पर, एनवायरमेंट से .agents/AGENTS.md (या /.agents/AGENTS.md) को अपने-आप लोड करता है. AGENTS.md का इस्तेमाल, पर्सोना की लंबी परिभाषाओं, दिशा-निर्देशों, और उन निर्देशों के लिए करें जिन्हें आपको अपने कोड के साथ वर्शन कंट्रोल करना है.

इनलाइन सोर्स का इस्तेमाल करके AGENTS.md को माउंट करें:

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Analyze the Q1 revenue data and create a report.",
    system_instruction="You are a data analyst. Always include visualizations and export results as PDF.",
    environment={
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/AGENTS.md",
                "content": "Always use matplotlib for charts. Include a summary table in every report.",
            },
        ],
    },
)

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: "Analyze the Q1 revenue data and create a report.",
    system_instruction: "You are a data analyst. Always include visualizations and export results as PDF.",
    environment: {
        type: "remote",
        sources: [
            {
                type: "inline",
                target: ".agents/AGENTS.md",
                content: "Always use matplotlib for charts. Include a summary table in every report.",
            },
        ],
    },
}, { 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": "Analyze the Q1 revenue data and create a report.",
      "system_instruction": "You are a data analyst. Always include visualizations and export results as PDF.",
      "environment": {
          "type": "remote",
          "sources": [
              {
                  "type": "inline",
                  "target": ".agents/AGENTS.md",
                  "content": "Always use matplotlib for charts. Include a summary table in every report."
              }
          ]
      }
  }'

स्किल: SKILL.md

स्किल ऐसी फ़ाइलें होती हैं जो एजेंट की क्षमताओं को बढ़ाती हैं. उन्हें .agents/skills/<skill-name>/SKILL.md के नीचे रखें. इसके बाद, हार्नेस उन्हें अपने-आप ढूंढ लेगा और रजिस्टर कर लेगा.

.agents/
├── AGENTS.md
└── skills/
    └── slide-maker/
        └── SKILL.md

इनलाइन सोर्स का इस्तेमाल करके कोई स्किल माउंट करें:

Python

from google import genai

client = genai.Client()

interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Create a presentation about our Q1 results.",
    system_instruction="You create presentations from data.",
    environment={
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/skills/slide-maker/SKILL.md",
                "content": "---\nname: slide-maker\ndescription: Create HTML slide decks\n---\n# Slide Maker\n\nWhen asked to create a presentation:\n1. Analyze the input data\n2. Create an HTML slide deck with reveal.js\n3. Save to /workspace/output/slides.html",
            },
        ],
    },
)

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: "Create a presentation about our Q1 results.",
    system_instruction: "You create presentations from data.",
    environment: {
        type: "remote",
        sources: [
            {
                type: "inline",
                target: ".agents/skills/slide-maker/SKILL.md",
                content: "---\nname: slide-maker\ndescription: Create HTML slide decks\n---\n# Slide Maker\n\nWhen asked to create a presentation:\n1. Analyze the input data\n2. Create an HTML slide deck with reveal.js\n3. Save to /workspace/output/slides.html",
            },
        ],
    },
}, { 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": "Create a presentation about our Q1 results.",
      "system_instruction": "You create presentations from data.",
      "environment": {
          "type": "remote",
          "sources": [
              {
                  "type": "inline",
                  "target": ".agents/skills/slide-maker/SKILL.md",
                  "content": "---\nname: slide-maker\ndescription: Create HTML slide decks\n---\n# Slide Maker\n\nWhen asked to create a presentation:\n1. Analyze the input data\n2. Create an HTML slide deck with reveal.js\n3. Save to /workspace/output/slides.html"
              }
          ]
      }
  }'

.agents/skills/ और /.agents/skills/ से लोड की गई दोनों तरह की स्किल अपने-आप दिख जाती हैं.

मैनेज किया गया एजेंट बनाना

कॉन्फ़िगरेशन को दोहराने के बाद, इसे agents.create की मदद से मैनेज किए जाने वाले एजेंट के तौर पर बनाया जा सकता है. इससे, हर बार कॉन्फ़िगरेशन को दोहराए बिना, आईडी के ज़रिए एजेंट को शुरू किया जा सकता है.

सोर्स से

सोर्स के साथ base_agent, id, system_instruction, और base_environment की जानकारी दें. यह प्लैटफ़ॉर्म, हर बार फ़ंक्शन को चालू करने पर आपकी फ़ाइलों के साथ एक नया सैंडबॉक्स उपलब्ध कराता है. उपलब्ध सोर्स टाइप (Git, GCS, इनलाइन) के लिए, एनवायरमेंट देखें.

Python

from google import genai

client = genai.Client()

agent = client.agents.create(
    id="data-analyst",
    base_agent="antigravity-preview-05-2026",
    system_instruction="You are a data analyst. Always include visualizations and export results as PDF.",
    base_environment={
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/AGENTS.md",
                "content": "Always use matplotlib for charts. Include a summary table in every report.",
            },
            {
                "type": "inline",
                "target": ".agents/skills/slide-maker/SKILL.md",
                "content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results.",
            },
            {
                "type": "repository",
                "source": "https://github.com/my-org/analysis-templates",
                "target": "/workspace/templates",
            },
        ],
    },
)

print(f"Created agent: {agent.id}")

JavaScript

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

const client = new GoogleGenAI({});

const agent = await client.agents.create({
    id: "data-analyst",
    base_agent: "antigravity-preview-05-2026",
    system_instruction: "You are a data analyst. Always include visualizations and export results as PDF.",
    base_environment: {
        type: "remote",
        sources: [
            {
                type: "inline",
                target: ".agents/AGENTS.md",
                content: "Always use matplotlib for charts. Include a summary table in every report.",
            },
            {
                type: "inline",
                target: ".agents/skills/slide-maker/SKILL.md",
                content: "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results.",
            },
            {
                type: "repository",
                source: "https://github.com/my-org/analysis-templates",
                target: "/workspace/templates",
            },
        ],
    },
});

console.log(`Created agent: ${agent.id}`);

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/agents" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Api-Revision: 2026-05-20" \
-d '{
    "id": "data-analyst",
    "base_agent": "antigravity-preview-05-2026",
    "system_instruction": "You are a data analyst. Always include visualizations and export results as PDF.",
    "base_environment": {
        "type": "remote",
        "sources": [
            {
                "type": "inline",
                "target": ".agents/AGENTS.md",
                "content": "Always use matplotlib for charts. Include a summary table in every report."
            },
            {
                "type": "inline",
                "target": ".agents/skills/slide-maker/SKILL.md",
                "content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks from data analysis results."
            },
            {
                "type": "repository",
                "source": "https://github.com/my-org/analysis-templates",
                "target": "/workspace/templates"
            }
        ]
    }
}'

किसी मौजूदा एनवायरमेंट से (फ़ोर्क करना)

जब तक एनवायरमेंट सही न हो जाए (पैकेज इंस्टॉल हो जाएं, फ़ाइलें सही जगह पर हों), तब तक Antigravity के बेस एजेंट का इस्तेमाल करें. इसके बाद, इसे मैनेज किए जा सकने वाले एजेंट में फ़ोर्क करें.

Python

from google import genai

client = genai.Client()

# Step 1: set up the environment interactively
interaction = client.interactions.create(
    agent="antigravity-preview-05-2026",
    input="Install pandas, matplotlib, and seaborn. Create an analysis template at /workspace/template.py.",
    environment="remote",
)

# Step 2: fork that environment into a managed agent

agent = client.agents.create(
    id="my-data-analyst",
    base_agent="antigravity-preview-05-2026",
    system_instruction="You are a data analyst. Use the template at /workspace/template.py for all reports.",
    base_environment=interaction.environment_id,
)

print(f"Forked agent successfully: {agent.id}")

JavaScript

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

const client = new GoogleGenAI({});

const interaction = await client.interactions.create({
    agent: "antigravity-preview-05-2026",
    input: "Install pandas, matplotlib, and seaborn. Create an analysis template at /workspace/template.py.",
    environment: "remote",
}, { timeout: 300000 });

const agent = await client.agents.create({
    id: "my-data-analyst",
    base_agent: "antigravity-preview-05-2026",
    system_instruction: "You are a data analyst. Use the template at /workspace/template.py for all reports.",
    base_environment: interaction.environment_id,
});

console.log(`Forked agent successfully: ${agent.id}`);

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": "Install pandas, matplotlib, and seaborn. Create an analysis template at /workspace/template.py.",
      "environment": "remote"
  }'

नेटवर्क के नियमों वाले ऑफ़र

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

यहां दिए गए उदाहरण में, एक ऐसा issue-resolver एजेंट बनाया गया है जो सिर्फ़ GitHub और PyPI को ऐक्सेस कर सकता है. साथ ही, इसमें GitHub के क्रेडेंशियल डाले गए हैं:

Python

from google import genai

client = genai.Client()

agent = client.agents.create(
    id="issue-resolver",
    base_agent="antigravity-preview-05-2026",
    system_instruction="You resolve GitHub issues. Clone the repo, find the bug, write the fix, run the tests, and open a PR.",
    base_environment={
        "type": "remote",
        "sources": [
            {
                "type": "repository",
                "source": "https://github.com/my-org/backend",
                "target": "/workspace/repo",
            }
        ],
        "network": {
            "allowlist": [
                {
                    "domain": "api.github.com",
                    "transform": {
                        "Authorization": "Basic YOUR_BASE64_TOKEN"
                    },
                },
                {"domain": "pypi.org"},
            ]
        },
    },
)

print(f"Created issue-resolver agent successfully: {agent.id}")

JavaScript

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

const client = new GoogleGenAI({});

const agent = await client.agents.create({
    id: "issue-resolver",
    base_agent: "antigravity-preview-05-2026",
    system_instruction: "You resolve GitHub issues. Clone the repo, find the bug, write the fix, run the tests, and open a PR.",
    base_environment: {
        type: "remote",
        sources: [
            {
                type: "repository",
                source: "https://github.com/my-org/backend",
                target: "/workspace/repo",
            }
        ],
        network: {
            allowlist: [
                {
                    domain: "api.github.com",
                    transform: {
                        "Authorization": "Basic YOUR_BASE64_TOKEN"
                    },
                },
                { domain: "pypi.org" },
            ]
        }
    },
});

console.log(`Created issue-resolver agent successfully: ${agent.id}`);

REST

curl -X POST "https://generativelanguage.googleapis.com/v1beta/agents" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Api-Revision: 2026-05-20" \
  -d '{
      "id": "issue-resolver",
      "base_agent": "antigravity-preview-05-2026",
      "system_instruction": "You resolve GitHub issues. Clone the repo, find the bug, write the fix, run the tests, and open a PR.",
      "base_environment": {
          "type": "remote",
          "sources": [
              {
                  "type": "repository",
                  "source": "https://github.com/my-org/backend",
                  "target": "/workspace/repo"
              }
          ],
          "network": {
              "allowlist": [
                  {
                      "domain": "api.github.com",
                      "transform": {
                          "Authorization": "Basic YOUR_BASE64_TOKEN"
                      }
                  },
                  {"domain": "pypi.org"}
              ]
          }
      }
  }'

एजेंट को चालू करना

नया इंटरैक्शन बनाकर, अपने एजेंट आईडी से मैनेज किए जा रहे एजेंट को कॉल करें. हर इनवोकेशन, बेस एनवायरमेंट को फ़ोर्क करता है. इसलिए, हर रन क्लीन तरीके से शुरू होता है.

Python

result = client.interactions.create(
    agent="data-analyst",
    input="Analyze Q1 revenue data from /workspace/templates/sample.csv and create a slide deck.",
    environment="remote",
)

print(result.output_text)

JavaScript

const result = await client.interactions.create({
    agent: "data-analyst",
    input: "Analyze Q1 revenue data from /workspace/templates/sample.csv and create a slide deck.",
    environment: "remote",
}, { timeout: 300000 });

console.log(result.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": "data-analyst",
      "input": "Analyze Q1 revenue data from /workspace/templates/sample.csv and create a slide deck.",
      "environment": "remote"
  }'

एक से ज़्यादा बार बातचीत करने और स्ट्रीमिंग के लिए, क्विकस्टार्ट देखें. मैनेज किए गए एजेंट पर भी previous_interaction_id और environment के यही पैटर्न लागू होते हैं.

इनवोकेशन के समय कॉन्फ़िगरेशन को बदलना

इंटरैक्शन बनाते समय, एजेंट के डिफ़ॉल्ट system_instruction और tools को बदला जा सकता है. इससे, सेव की गई एजेंट की परिभाषा में बदलाव किए बिना, किसी खास रन के लिए एजेंट के व्यवहार या क्षमताओं में बदलाव किया जा सकता है.

Python

result = client.interactions.create(
    agent="data-analyst",
    input="Analyze Q1 revenue data, but do not create a slide deck. Just output a summary table.",
    system_instruction="You are a data analyst. Focus ONLY on summary tables. Ignore default instructions about slides.",
    tools=[{"type": "code_execution"}], # Override to only use code execution
    environment="remote",
)
print(result.output_text)

JavaScript

const result = await client.interactions.create({
    agent: "data-analyst",
    input: "Analyze Q1 revenue data, but do not create a slide deck. Just output a summary table.",
    system_instruction: "You are a data analyst. Focus ONLY on summary tables. Ignore default instructions about slides.",
    tools: [{ type: "code_execution" }], // Override to only use code execution
    environment: "remote",
}, { timeout: 300000 });

console.log(result.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": "data-analyst",
      "input": "Analyze Q1 revenue data, but do not create a slide deck. Just output a summary table.",
      "system_instruction": "You are a data analyst. Focus ONLY on summary tables. Ignore default instructions about slides.",
      "tools": [{"type": "code_execution"}],
      "environment": "remote"
  }'

एजेंट मैनेज करें

आपके पास एजेंटों को सूची में शामिल करने, उन्हें पाने, और उन्हें मिटाने का विकल्प होता है.

एजेंट की सूची बनाना

Python

agents = client.agents.list()
for a in agents.agents:
    print(f"{a.id}: {a.description}")

JavaScript

const agents = await client.agents.list();
if (agents.agents) {
    for (const a of agents.agents) {
        console.log(`${a.id}: ${a.description}`);
    }
}

REST

curl -X GET "https://generativelanguage.googleapis.com/v1beta/agents" \
  -H "x-goog-api-key: $GEMINI_API_KEY"

कोई एजेंट पाना

Python

agent = client.agents.get(id="data-analyst")
print(agent)

JavaScript

const agent = await client.agents.get("data-analyst");
console.log(agent);

REST

curl -X GET "https://generativelanguage.googleapis.com/v1beta/agents/data-analyst" \
  -H "x-goog-api-key: $GEMINI_API_KEY"

किसी एजेंट को मिटाना

मिटाने पर, कॉन्फ़िगरेशन हट जाता है. इससे, एजेंट के बनाए गए मौजूदा एनवायरमेंट और इंटरैक्शन पर कोई असर नहीं पड़ता.

Python

client.agents.delete(id="data-analyst")

JavaScript

await client.agents.delete("data-analyst");

REST

curl -X DELETE "https://generativelanguage.googleapis.com/v1beta/agents/data-analyst" \
  -H "x-goog-api-key: $GEMINI_API_KEY"

एजेंट की परिभाषा का रेफ़रंस

फ़ील्ड प्रकार ज़रूरी है ब्यौरा
id स्ट्रिंग हां एजेंट का यूनीक आइडेंटिफ़ायर. इसका इस्तेमाल एजेंट को चालू करने के लिए किया जाता है.
description स्ट्रिंग नहीं इस फ़ील्ड में एजेंट के बारे में ऐसी जानकारी होती है जिसे कोई भी व्यक्ति आसानी से पढ़ सकता है.
base_agent स्ट्रिंग हां बेस एजेंट आईडी (जैसे, antigravity-preview-05-2026).
system_instruction स्ट्रिंग नहीं सिस्टम प्रॉम्प्ट, जो व्यवहार और पर्सोना तय करता है.
tools स्ट्रिंग या ऑब्जेक्ट नहीं ऐसे टूल जिनका इस्तेमाल एजेंट कर सकता है. अगर इस फ़ील्ड को शामिल नहीं किया जाता है, तो एजेंट के पास code_execution, google_search, और url_context का ऐक्सेस होगा.
base_environment स्ट्रिंग या ऑब्जेक्ट नहीं "remote", environment_id या sources और network वाला कॉन्फ़िगरेशन ऑब्जेक्ट. एनवायरमेंट देखें.

इटरेशन वर्कफ़्लो

  1. Antigravity के बेसिक एजेंट के साथ प्रोटोटाइप. सिस्टम के निर्देश और एनवायरमेंट सोर्स को इनलाइन पास करें. निर्देशों, कौशल, और एनवायरमेंट सेटअप की इंटरैक्टिव तरीके से जांच करें.
  2. एनवायरमेंट को स्थिर करें. पैकेज इंस्टॉल करें, सोर्स माउंट करें, और पुष्टि करें कि सब कुछ काम कर रहा है.
  3. सोर्स से या एनवायरमेंट को फ़ोर्क करके, नया एजेंट बनाकर मैनेज किए जा रहे एजेंट के तौर पर बने रहें.
  4. एजेंट की परिभाषा को अपडेट करें. सिस्टम के निर्देश बदलें, स्किल बदलें या सोर्स जोड़ें. अगला अनुरोध, नए कॉन्फ़िगरेशन के हिसाब से किया जाएगा.

सीमाएं

  • प्रीव्यू की स्थिति: मैनेज किए गए एजेंट, प्रीव्यू में हैं. सुविधाओं और स्कीमा में बदलाव हो सकता है.
  • बेस एजेंट: base_agent के तौर पर, सिर्फ़ antigravity-preview-05-2026 का इस्तेमाल किया जा सकता है.
  • वर्शनिंग की सुविधा उपलब्ध नहीं है: एजेंट वर्शनिंग और रोलबैक की सुविधा, फ़िलहाल उपलब्ध नहीं है.
  • सब-एजेंट नेस्टिंग की सुविधा उपलब्ध नहीं है: फ़िलहाल, सब-एजेंट को डेलिगेट करने की सुविधा उपलब्ध नहीं है.
  • आपके पास मैनेज किए जा सकने वाले ज़्यादा से ज़्यादा 1,000 एजेंट हो सकते हैं.

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

  • एजेंट की खास जानकारी: मैनेज किए जाने वाले एजेंट के मुख्य सिद्धांतों के बारे में जानें.
  • क्विकस्टार्ट: एक से ज़्यादा बार बातचीत करने और स्ट्रीमिंग की सुविधा का इस्तेमाल शुरू करें.
  • Antigravity Agent: डिफ़ॉल्ट एजेंट की सुविधाओं, टूल, और कीमत के बारे में जानें.
  • एजेंट एनवायरमेंट: सैंडबॉक्स, सोर्स, और नेटवर्किंग कॉन्फ़िगर करें.