Agent ของ Antigravity เป็น Agent ที่ได้รับการจัดการแบบอเนกประสงค์ใน Gemini API การเรียก API ครั้งเดียวจะทำให้คุณมีเอเจนต์ที่ให้เหตุผล ดำเนินการโค้ด จัดการไฟล์ และท่องเว็บภายในแซนด์บ็อกซ์ Linux ที่ปลอดภัยของคุณเอง ซึ่งโฮสต์โดย Google
โดยขับเคลื่อนด้วย Gemini 3.6 Flash และใช้ Harness เดียวกันกับ Antigravity IDE คุณกำหนดค่าโมเดล Gemini พื้นฐานได้โดยใช้ agent_config พร้อมใช้งานผ่าน 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" \
-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 และการดึงข้อมูล URL
- การบีบอัดบริบท: การบีบอัดบริบทอัตโนมัติ (ทริกเกอร์ที่โทเค็นประมาณ 135, 000 รายการ) เพื่อรองรับเซสชันการสนทนาไปมาที่ทำงานเป็นเวลานานโดยไม่สูญเสียบริบทหรือเกินขีดจำกัดโทเค็น
ดูการเริ่มต้นอย่างรวดเร็วสำหรับการใช้งานแบบการสนทนาไปมาและการสตรีมมิง
เครื่องมือที่รองรับ
โดยค่าเริ่มต้น เอเจนต์จะมีสิทธิ์เข้าถึง code_execution, google_search และ url_context ระบบจะเปิดใช้เครื่องมือระบบไฟล์โดยอัตโนมัติเมื่อคุณระบุพารามิเตอร์ environment นอกจากนี้ คุณยังกำหนดฟังก์ชันที่กำหนดเองเพื่อเชื่อมต่อเอเจนต์กับ API และเครื่องมือของคุณเองได้ด้วย คุณต้องระบุพารามิเตอร์ tools ก็ต่อเมื่อปรับแต่งหรือจำกัดชุดเริ่มต้น หรือเมื่อเพิ่มฟังก์ชันที่กำหนดเอง
| เครื่องมือ | ประเภทค่า | คำอธิบาย |
|---|---|---|
| การเรียกใช้โค้ด | code_execution |
เรียกใช้คำสั่งเชลล์ (Bash, Python, Node) พร้อมการจับภาพ stdout/stderr |
| Google Search | google_search |
ค้นหาเว็บสาธารณะ |
| บริบท URL | url_context |
ดึงข้อมูลและอ่านหน้าเว็บ |
| ระบบไฟล์ | (เปิดใช้ผ่าน environment) |
อ่าน เขียน แก้ไข ค้นหา และแสดงรายการไฟล์ในแซนด์บ็อกซ์ ไม่มีประเภทเครื่องมือแยกต่างหาก ระบบจะเปิดใช้โดยอัตโนมัติเมื่อตั้งค่า environment |
| ฟังก์ชันที่กำหนดเอง | function |
กำหนดฟังก์ชันที่กำหนดเองซึ่ง Agent สามารถขอให้ดำเนินการได้ ดูการเรียกใช้ฟังก์ชัน |
| เซิร์ฟเวอร์ MCP ระยะไกล | mcp_server |
ลงทะเบียนเซิร์ฟเวอร์ Model Context Protocol (MCP) ภายนอกเป็นเครื่องมือ ดูเซิร์ฟเวอร์ MCP |
หากต้องการจำกัดเอเจนต์ให้ใช้เฉพาะเครื่องมือบางอย่าง ให้ส่งเฉพาะเครื่องมือที่คุณต้องการ
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" \
-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"}
]
}'
อินพุตหลายรูปแบบ
Agent ของ Antigravity รองรับอินพุตแบบหลายรูปแบบ ปัจจุบันรองรับเฉพาะอินพุต text และ image ต้องระบุรูปภาพเป็นสตริงที่เข้ารหัส Base64 ในบรรทัด (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" \
-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\"
}"
การเรียกใช้ฟังก์ชัน
การเรียกใช้ฟังก์ชันช่วยให้คุณเชื่อมต่อ Agent ของ Antigravity กับ API และฐานข้อมูลภายนอกได้โดยการกำหนดเครื่องมือที่กำหนดเองซึ่ง Agent สามารถเรียกใช้ได้ ดูแนวคิดทั่วไปได้ที่การเรียกฟังก์ชันด้วย Gemini API
ตัวอย่างต่อไปนี้แสดงการโต้ตอบ 2 รอบ ก่อนอื่นเอเจนต์จะขอการเรียกใช้ฟังก์ชัน get_weather ที่กำหนดเอง จากนั้นไคลเอ็นต์จะเรียกใช้ฟังก์ชันดังกล่าวและแสดงผลลัพธ์ในเทิร์นที่ 2
Python
from google import genai
client = genai.Client()
# 1. Define the custom function
get_weather_tool = {
"type": "function",
"name": "get_weather",
"description": "Gets the current weather for a given location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and country, e.g. San Francisco, USA",
}
},
"required": ["location"],
},
}
# 2. Call the agent with the custom tool (Turn 1)
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="What is the weather in Tokyo?",
environment="remote",
tools=[
{"type": "code_execution"}, # Enable default code execution
get_weather_tool, # Add custom function
],
)
# Check if the agent requested a function call
if interaction.status == "requires_action":
# Find function calls that do not have a matching function result.
# Filesystem tools (like write_file) are also represented as function calls
# but are executed automatically by the environment.
executed_calls = {step.call_id for step in interaction.steps if step.type == "function_result"}
pending_calls = [step for step in interaction.steps if step.type == "function_call" and step.id not in executed_calls]
if pending_calls:
fc_step = pending_calls[0]
print(f"Function to call: {fc_step.name} (ID: {fc_step.id})")
print(f"Arguments: {fc_step.arguments}")
# 3. Execute the function locally (simulated get_weather()) and send the result back (Turn 2)
function_result = {
"temperature": 23,
"unit": "celsius"
}
final_interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
previous_interaction_id=interaction.id, # Reference the interaction ID
environment=interaction.environment_id,
input=[
{
"type": "function_result",
"name": fc_step.name,
"call_id": fc_step.id,
"result": function_result,
}
],
)
print(final_interaction.output_text)
# Output: The current weather in Tokyo, Japan is 23°C (Celsius).
else:
print("No pending function calls.")
else:
print(f"Interaction completed with status: {interaction.status}")
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
// 1. Define the custom function
const get_weather_tool = {
type: "function",
name: "get_weather",
description: "Gets the current weather for a given location.",
parameters: {
type: "object",
properties: {
location: {
type: "string",
description: "The city and country, e.g. San Francisco, USA",
},
},
required: ["location"],
},
};
// 2. Call the agent with the custom tool (Turn 1)
const interaction = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "What is the weather in Tokyo?",
environment: "remote",
tools: [
{ type: "code_execution" },
get_weather_tool,
],
}, { timeout: 300000 });
if (interaction.status === "requires_action") {
// Find function calls that do not have a matching function result.
// Filesystem tools (like write_file) are also represented as function calls
// but are executed automatically by the environment.
const executedCalls = new Set(
interaction.steps
.filter(s => s.type === "function_result")
.map(s => s.call_id)
);
const pendingCalls = interaction.steps.filter(
s => s.type === "function_call" && !executedCalls.has(s.id)
);
if (pendingCalls.length > 0) {
const fcStep = pendingCalls[0];
console.log(`Function to call: ${fcStep.name} (ID: ${fcStep.id})`);
// 3. Execute the function locally (simulated get_weather()) and send the result back (Turn 2)
const functionResult = {
temperature: 23,
unit: "celsius"
};
const finalInteraction = await client.interactions.create({
agent: "antigravity-preview-05-2026",
previous_interaction_id: interaction.id, // Reference the interaction ID
environment: interaction.environment_id,
input: [
{
type: "function_result",
name: fcStep.name,
call_id: fcStep.id,
result: functionResult,
}
],
}, { timeout: 300000 });
console.log(finalInteraction.output_text);
} else {
console.log("No pending function calls.");
}
} else {
console.log(`Interaction completed with status: ${interaction.status}`);
}
REST
# 1. Turn 1: Request function call
RESPONSE=$(curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "What is the weather in Tokyo?",
"environment": "remote",
"tools": [
{"type": "code_execution"},
{
"type": "function",
"name": "get_weather",
"description": "Gets the current weather for a given location.",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
]
}')
# Extract interaction ID, environment ID, and call ID (requires jq)
INTERACTION_ID=$(echo $RESPONSE | jq -r '.id')
ENVIRONMENT_ID=$(echo $RESPONSE | jq -r '.environment_id')
CALL_ID=$(echo $RESPONSE | jq -r '.steps[] | select(.type=="function_call") | .id')
# 2. Turn 2: Send function result back using variables
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d "{
\"agent\": \"antigravity-preview-05-2026\",
\"previous_interaction_id\": \"$INTERACTION_ID\",
\"environment\": \"$ENVIRONMENT_ID\",
\"input\": [
{
\"type\": \"function_result\",
\"name\": \"get_weather\",
\"call_id\": \"$CALL_ID\",
\"result\": {
\"temperature\": 23,
\"unit\": \"celsius\"
}
}
]
}"
เซิร์ฟเวอร์ MCP
คุณเชื่อมต่อ Agent Antigravity กับเครื่องมือภายนอกได้โดยการลงทะเบียนเซิร์ฟเวอร์ Model Context Protocol (MCP) ระยะไกล เอเจนต์รองรับเซิร์ฟเวอร์ MCP ระยะไกลผ่าน HTTP ที่สตรีมได้
เมื่อลงทะเบียนเซิร์ฟเวอร์ MCP คุณต้องระบุช่องต่อไปนี้ในอาร์เรย์ tools
| ช่อง | ประเภท | ต้องระบุ | คำอธิบาย |
|---|---|---|---|
type |
สตริง | ใช่ | ต้องเป็น "mcp_server" |
name |
สตริง | ใช่ | ตัวระบุที่ไม่ซ้ำกันสำหรับเซิร์ฟเวอร์ ต้องเป็นตัวอักษรพิมพ์เล็กและตัวอักษรและตัวเลขคละกัน (ตรงกับ ^[a-z0-9_-]+$) |
url |
สตริง | ใช่ | URL ปลายทางของเซิร์ฟเวอร์ MCP ระยะไกล |
headers |
ออบเจ็กต์ | ไม่ | ส่วนหัวที่กำหนดเอง (เช่น การตรวจสอบสิทธิ์) ที่ส่งพร้อมกับคำขอ |
allowed_tools |
อาร์เรย์ | ไม่ | รายการชื่อเครื่องมือที่อนุญาตให้ดำเนินการ หากไม่ได้ระบุ ระบบจะอนุญาตให้ใช้เครื่องมือทั้งหมด |
Python
from google import genai
client = genai.Client()
# Register a remote HTTP MCP server
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="What is the weather in Tokyo?",
environment="remote",
tools=[{
"type": "mcp_server",
"name": "weather", # Must be lowercase
"url": "https://gemini-api-demos.uc.r.appspot.com/mcp"
}]
)
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: "What is the weather in Tokyo?",
environment: "remote",
tools: [{
type: "mcp_server",
name: "weather", // Must be lowercase
url: "https://gemini-api-demos.uc.r.appspot.com/mcp"
}]
}, { 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" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "What is the weather in Tokyo?",
"environment": "remote",
"tools": [{
"type": "mcp_server",
"name": "weather",
"url": "https://gemini-api-demos.uc.r.appspot.com/mcp"
}]
}'
การเลือกโมเดล
สำหรับ antigravity-preview-05-2026 โมเดลเริ่มต้นคือ Gemini 3.6 Flash (gemini-3.6-flash) หากคุณละเว้น agent_config ไว้ เอเจนต์จะใช้ gemini-3.6-flash เป็นค่าเริ่มต้น
คุณกำหนดค่าโมเดล Gemini พื้นฐานได้โดยใช้ agent_config เพื่อเพิ่มประสิทธิภาพด้านความเร็ว ต้นทุน หรือความสามารถในการให้เหตุผล
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Summarize the key differences between functional and object-oriented programming.",
environment="remote",
agent_config={
"type": "antigravity",
"model": "gemini-3.5-flash-lite",
},
)
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: "Summarize the key differences between functional and object-oriented programming.",
environment: "remote",
agent_config: {
type: "antigravity",
model: "gemini-3.5-flash-lite",
},
}, { 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" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "Summarize the key differences between functional and object-oriented programming.",
"environment": "remote",
"agent_config": {
"type": "antigravity",
"model": "gemini-3.5-flash-lite"
}
}'
ค่าที่รองรับสำหรับ agent_config.model มีดังนี้
| รุ่น | มูลค่าใน agent_config.model |
คำอธิบาย |
|---|---|---|
| Gemini 3.6 Flash (ค่าเริ่มต้น) | gemini-3.6-flash |
โมเดลที่สมดุลเริ่มต้นสำหรับการให้เหตุผล การเขียนโค้ด และการใช้เครื่องมือ |
| Gemini 3.5 Flash | gemini-3.5-flash |
โมเดล Flash รุ่นก่อนหน้าสำหรับเวิร์กโฟลว์การเป็นตัวแทนทั่วไป |
| Gemini 3.5 Flash-Lite | gemini-3.5-flash-lite |
โมเดลที่มีน้ำหนักเบาซึ่งเพิ่มประสิทธิภาพสำหรับงานที่มีเวลาในการตอบสนองต่ำและคำนึงถึงต้นทุน |
เมื่อสร้างเอเจนต์ที่มีการจัดการด้วย agents.create คุณจะกำหนดค่าโมเดลในลักษณะเดียวกันโดยส่ง base_agent และ agent_config โปรดทราบว่าคุณไม่สามารถลบล้างโมเดลในเวลาที่เกิดการโต้ตอบสำหรับเอเจนต์ที่มีการจัดการซึ่งสร้างด้วย agents.create โมเดลจะล็อกไว้ตามที่ตั้งค่าไว้เมื่อสร้างเอเจนต์ ซึ่งจะช่วยให้มั่นใจได้ว่าลักษณะการทำงานของการเรียกใช้เครื่องมือจะคาดการณ์ได้ การแก้ไขข้อบกพร่องจะสอดคล้องกัน และการปฏิบัติตามขอบเขตด้านความปลอดภัย
การปรับแต่ง Agent
คุณขยายความสามารถของ Agent ของ Antigravity ได้โดยการปรับแต่งคำสั่ง เครื่องมือ และสภาพแวดล้อม เอเจนต์รองรับแนวทางการปรับแต่งที่ใช้ระบบไฟล์ดั้งเดิม โดยคุณสามารถติดตั้งไฟล์ เช่น AGENTS.md สำหรับวิธีการและทักษะภายใต้ .agents/skills/ ลงในแซนด์บ็อกซ์ได้โดยตรง หรือส่งการกำหนดค่าแบบอินไลน์ในเวลาที่โต้ตอบ คุณสามารถวนซ้ำการกำหนดค่าแบบอินไลน์ แล้วบันทึกเป็น Agent ที่มีการจัดการเมื่อพร้อม
โปรดดูรายละเอียดทั้งหมดเกี่ยวกับวิธีสร้างเอเจนต์ที่กำหนดเองที่หัวข้อการสร้างเอเจนต์ที่มีการจัดการ
การดำเนินการเมื่ออยู่เบื้องหลัง
งานของ Agent ที่เกี่ยวข้องกับการให้เหตุผลหลายขั้นตอน การเรียกใช้โค้ด หรือการดำเนินการกับไฟล์อาจใช้เวลาหลายนาทีจึงจะเสร็จสมบูรณ์ ใช้ background=True เพื่อเรียกใช้การโต้ตอบแบบไม่พร้อมกัน API จะแสดงผลทันทีพร้อมรหัสการโต้ตอบที่คุณสำรวจจนกว่าสถานะจะเป็น completed หรือ failed
Python
import time
from google import genai
client = genai.Client()
# 1. Start the interaction in the background
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Run a complex analysis on the repository.",
environment="remote",
background=True,
)
print(f"Interaction started in background: {interaction.id}")
# 2. Poll for completion
while interaction.status == "in_progress":
time.sleep(5)
interaction = client.interactions.get(id=interaction.id)
if interaction.status == "completed":
print(interaction.output_text)
else:
print(f"Finished with status: {interaction.status}")
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "Run a complex analysis on the repository.",
environment: "remote",
background: true,
});
console.log(`Interaction started in background: ${interaction.id}`);
let result = interaction;
while (result.status === "in_progress") {
await new Promise(resolve => setTimeout(resolve, 5000));
result = await client.interactions.get(interaction.id);
}
if (result.status === "completed") {
console.log(result.output_text);
} else {
console.log(`Finished with status: ${result.status}`);
}
REST
# 1. Start the interaction in the background
RESPONSE=$(curl -s -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": "Run a complex analysis on the repository.",
"environment": "remote",
"background": true
}')
INTERACTION_ID=$(echo $RESPONSE | jq -r '.id')
# 2. Poll for results (repeat until status is "completed")
curl -s -X GET "https://generativelanguage.googleapis.com/v1beta/interactions/$INTERACTION_ID" \
-H "x-goog-api-key: $GEMINI_API_KEY"
การดำเนินการเมื่ออยู่เบื้องหลังต้องใช้ store=True ซึ่งเป็นค่าเริ่มต้น ดูข้อมูลอัปเดตความคืบหน้าแบบเรียลไทม์ระหว่างการดำเนินการเบื้องหลังได้ที่การสตรีมการโต้ตอบเบื้องหลัง
คุณยกเลิกการโต้ตอบในเบื้องหลังที่กำลังทำงานได้โดยใช้เมธอด cancel
Python
client.interactions.cancel(id="INTERACTION_ID")
JavaScript
await client.interactions.cancel("INTERACTION_ID");
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions/INTERACTION_ID:cancel" \
-H "x-goog-api-key: $GEMINI_API_KEY"
การสนทนาไปมาพร้อมการดำเนินการในเบื้องหลัง
เมื่อการโต้ตอบเบื้องหลังเกี่ยวข้องกับเครื่องมือที่มีสถานะ (เช่น การเรียกใช้โค้ดในแซนด์บ็อกซ์) ให้ใช้ environment_id จากการโต้ตอบที่เสร็จสมบูรณ์เพื่อดำเนินการต่อในสภาพแวดล้อมเดียวกัน วิธีนี้ช่วยให้ Agent ทำงานต่อจากที่ค้างไว้ได้โดยที่ไฟล์และสถานะทั้งหมดไม่เปลี่ยนแปลง
Python
import time
from google import genai
client = genai.Client()
# First turn: run a task in the background
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Clone https://github.com/google/generative-ai-python and run its tests.",
environment="remote",
background=True,
)
while interaction.status == "in_progress":
time.sleep(5)
interaction = client.interactions.get(id=interaction.id)
# Second turn: continue in the same environment
followup = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Fix any failing tests and re-run them.",
previous_interaction_id=interaction.id,
environment=interaction.environment_id,
background=True,
)
while followup.status == "in_progress":
time.sleep(5)
followup = client.interactions.get(id=followup.id)
print(followup.output_text)
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
// First turn: run a task in the background
let interaction = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "Clone https://github.com/google/generative-ai-python and run its tests.",
environment: "remote",
background: true,
});
while (interaction.status === "in_progress") {
await new Promise(resolve => setTimeout(resolve, 5000));
interaction = await client.interactions.get(interaction.id);
}
// Second turn: continue in the same environment
let followup = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "Fix any failing tests and re-run them.",
previous_interaction_id: interaction.id,
environment: interaction.environment_id,
background: true,
});
while (followup.status === "in_progress") {
await new Promise(resolve => setTimeout(resolve, 5000));
followup = await client.interactions.get(followup.id);
}
console.log(followup.output_text);
REST
# 1. Start first interaction in the background
RESPONSE=$(curl -s -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": "Clone https://github.com/google/generative-ai-python and run its tests.",
"environment": "remote",
"background": true
}')
INTERACTION_ID=$(echo $RESPONSE | jq -r '.id')
# 2. Poll until completed (repeat until status is "completed")
RESULT=$(curl -s -X GET "https://generativelanguage.googleapis.com/v1beta/interactions/$INTERACTION_ID" \
-H "x-goog-api-key: $GEMINI_API_KEY")
ENVIRONMENT_ID=$(echo $RESULT | jq -r '.environment_id')
# 3. Continue in the same environment
curl -s -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\": \"Fix any failing tests and re-run them.\",
\"previous_interaction_id\": \"$INTERACTION_ID\",
\"environment\": \"$ENVIRONMENT_ID\",
\"background\": true
}"
สภาพแวดล้อม
การเรียกใช้แต่ละครั้งจะสร้างหรือนำแซนด์บ็อกซ์ Linux กลับมาใช้ใหม่ พารามิเตอร์ environment มี 3 รูปแบบ ได้แก่
| แบบฟอร์ม | คำอธิบาย |
|---|---|
"remote" |
จัดสรรแซนด์บ็อกซ์ใหม่ที่มีการตั้งค่าเริ่มต้น |
"env_abc123" |
นำสภาพแวดล้อมที่มีอยู่กลับมาใช้ใหม่โดยใช้รหัส โดยจะเก็บรักษาไฟล์และสถานะทั้งหมดไว้ |
{...} |
EnvironmentConfigแบบเต็มพร้อมแหล่งที่มาและกฎเครือข่ายที่กำหนดเอง |
ดูรายละเอียดเกี่ยวกับแหล่งที่มา (Git, GCS, อินไลน์), เครือข่าย, วงจร และขีดจำกัดของทรัพยากรได้ที่สภาพแวดล้อม
ทริกเกอร์
ทริกเกอร์ช่วยให้คุณกำหนดเวลาให้ Agent ทำงานโดยอัตโนมัติตามกำหนดเวลาของ Cron ได้ ทริกเกอร์จะเชื่อมโยงเอเจนต์ สภาพแวดล้อม พรอมต์ และกำหนดการเข้ากับทรัพยากรแบบถาวรซึ่งจะทำงานโดยไม่ต้องมีการแทรกแซงด้วยตนเอง การดำเนินการแต่ละครั้งจะใช้สภาพแวดล้อมเดียวกันซ้ำ ดังนั้นไฟล์ที่สร้างในการเรียกใช้ครั้งหนึ่งจะยังคงอยู่และมองเห็นได้ในการเรียกใช้ครั้งถัดไป
สร้างทริกเกอร์
สร้างทริกเกอร์โดยระบุกำหนดเวลา Cron, เขตเวลา และการกำหนดค่าการโต้ตอบ ทริกเกอร์จะเริ่มต้นในสถานะ active และจะเริ่มทำงานในเวลา Cron ที่ตรงกันครั้งถัดไป บันทึก id ที่ส่งคืนเพื่อจัดการทริกเกอร์ในการเรียกใช้ครั้งต่อๆ ไป
Python
from google import genai
client = genai.Client()
trigger = client.triggers.create(
schedule="0 9 * * *",
time_zone="America/Argentina/Buenos_Aires",
display_name="issue-solver",
interaction={
"agent": "antigravity-preview-05-2026",
"input": "Review open PRs in my-org/my-app for new comments and address feedback. Close issues whose PRs were merged. Then check for new issues labeled 'accepted', skip any already tracked in /workspace/solved-issues/, fix the rest, and open a PR for each. Save reports to /workspace/solved-issues/.",
"environment": {
"type": "remote",
"network": {
"allowlist": [
{
"domain": "api.github.com",
"transform": {
"Authorization": "Bearer ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
},
{"domain": "github.com"},
]
},
},
},
)
print(f"Trigger created: {trigger.id}")
print(f"Next run: {trigger.next_run_time}")
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const trigger = await client.triggers.create({
schedule: "0 9 * * *",
time_zone: "America/Argentina/Buenos_Aires",
display_name: "issue-solver",
interaction: {
agent: "antigravity-preview-05-2026",
input: [{
type: "text",
text: "Review open PRs in my-org/my-app for new comments and address feedback. Close issues whose PRs were merged. Then check for new issues labeled 'accepted', skip any already tracked in /workspace/solved-issues/, fix the rest, and open a PR for each. Save reports to /workspace/solved-issues/.",
}],
environment: {
type: "remote",
network: {
allowlist: [
{
domain: "api.github.com",
transform: {
"Authorization": "Bearer ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
},
},
{ domain: "github.com" },
],
},
},
},
});
console.log(`Trigger created: ${trigger.id}`);
console.log(`Next run: ${trigger.next_run_time}`);
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/triggers" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
"schedule": "0 9 * * *",
"time_zone": "America/Argentina/Buenos_Aires",
"display_name": "issue-solver",
"interaction": {
"agent": "antigravity-preview-05-2026",
"input": [{"type": "text", "text": "Review open PRs in my-org/my-app for new comments and address feedback. Close issues whose PRs were merged. Then check for new issues labeled accepted, skip any already tracked in /workspace/solved-issues/, fix the rest, and open a PR for each. Save reports to /workspace/solved-issues/."}],
"environment": {
"type": "remote",
"network": {
"allowlist": [
{
"domain": "api.github.com",
"transform": {
"Authorization": "Bearer ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
{"domain": "github.com"}
]
}
}
}
}'
คำขอ CreateTrigger ยอมรับฟิลด์ต่อไปนี้
| ช่อง | ประเภท | ต้องระบุ | คำอธิบาย |
|---|---|---|---|
schedule |
สตริง | ใช่ | นิพจน์ Cron (เช่น 0 * * * * สำหรับรายชั่วโมง 0 9 * * 1-5 สำหรับเช้าวันธรรมดา) |
time_zone |
สตริง | ใช่ | เขตเวลา IANA (เช่น UTC, America/Argentina/Buenos_Aires) |
display_name |
สตริง | ไม่ | ชื่อทริกเกอร์ที่มนุษย์อ่านได้ |
max_consecutive_failures |
จำนวนเต็ม | ไม่ | จำนวนครั้งที่ล้มเหลวสูงสุดก่อนที่ระบบจะหยุดทริกเกอร์ชั่วคราวโดยอัตโนมัติ ค่าเริ่มต้น: 5 |
execution_timeout_seconds |
จำนวนเต็ม | ไม่ | ระยะหมดเวลาต่อการดำเนินการในหน่วยวินาที ค่าเริ่มต้น: 600 |
interaction |
ออบเจ็กต์ | ใช่ | CreateInteractionRequest ที่กำหนดเอเจนต์ อินพุต เครื่องมือ และสภาพแวดล้อม |
การตอบกลับจะมีฟิลด์คีย์ต่อไปนี้
| ช่อง | ประเภท | คำอธิบาย |
|---|---|---|
id |
สตริง | ตัวระบุที่ไม่ซ้ำกันสำหรับทริกเกอร์ ใช้รหัสนี้ในการดำเนินการทั้งหมดในภายหลัง |
status |
สตริง | สถานะปัจจุบัน: active, paused หรือ disabled |
next_run_time |
สตริง | การประทับเวลา ISO 8601 ของการดำเนินการที่กำหนดเวลาไว้ครั้งถัดไป |
consecutive_failure_count |
จำนวนเต็ม | จำนวนการดำเนินการที่ไม่สำเร็จติดต่อกันนับตั้งแต่ครั้งล่าสุดที่สำเร็จ |
แสดงรายการทริกเกอร์
เรียกข้อมูลทริกเกอร์ทั้งหมดที่เชื่อมโยงกับโปรเจ็กต์
Python
triggers = client.triggers.list()
for trigger in triggers.triggers:
print(f"{trigger.id}: {trigger.display_name} ({trigger.status})")
JavaScript
const triggers = await client.triggers.list();
for (const trigger of triggers.triggers) {
console.log(`${trigger.id}: ${trigger.display_name} (${trigger.status})`);
}
REST
curl -X GET "https://generativelanguage.googleapis.com/v1beta/triggers" \
-H "x-goog-api-key: $GEMINI_API_KEY"
รับทริกเกอร์
ดึงข้อมูลการกำหนดค่าทั้งหมดและสถานะปัจจุบันของทริกเกอร์รายการเดียว
Python
trigger = client.triggers.get(id="TRIGGER_ID")
print(f"Schedule: {trigger.schedule}")
print(f"Next run: {trigger.next_run_time}")
JavaScript
const trigger = await client.triggers.get("TRIGGER_ID");
console.log(`Schedule: ${trigger.schedule}`);
console.log(`Next run: ${trigger.next_run_time}`);
REST
curl -X GET "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID" \
-H "x-goog-api-key: $GEMINI_API_KEY"
หยุดชั่วคราวและเล่นต่อ
คุณสามารถหยุดทริกเกอร์ชั่วคราวเพื่อหยุดการเรียกใช้ตามกำหนดเวลา และกลับมาใช้งานอีกครั้งเพื่อเปิดใช้งานกำหนดเวลา การหยุดชั่วคราวไม่มีผลต่อการดำเนินการด้วยตนเอง
Python
# Pause
client.triggers.update(id="TRIGGER_ID", status="paused")
# Resume
client.triggers.update(id="TRIGGER_ID", status="active")
JavaScript
// Pause
await client.triggers.update("TRIGGER_ID", { status: "paused" });
// Resume
await client.triggers.update("TRIGGER_ID", { status: "active" });
REST
# Pause
curl -X PATCH "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{"status": "paused"}'
# Resume
curl -X PATCH "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{"status": "active"}'
ลบทริกเกอร์
นำทริกเกอร์ออกอย่างถาวร ระบบจะไม่ลบประวัติการดำเนินการที่ผ่านมา
Python
client.triggers.delete(id="TRIGGER_ID")
JavaScript
await client.triggers.delete("TRIGGER_ID");
REST
curl -X DELETE "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID" \
-H "x-goog-api-key: $GEMINI_API_KEY"
เรียกใช้ทริกเกอร์ทันที
ทริกเกอร์ตามต้องการโดยไม่ต้องรอเวลาที่กำหนดไว้ครั้งถัดไป โดยจะทำงานแม้ว่าทริกเกอร์จะหยุดชั่วคราวอยู่ก็ตาม
Python
client.triggers.run(trigger_id="TRIGGER_ID")
JavaScript
await client.triggers.run("TRIGGER_ID");
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID/executions" \
-H "x-goog-api-key: $GEMINI_API_KEY"
แสดงรายการการดำเนินการ
ดูประวัติการดำเนินการของทริกเกอร์ การดำเนินการแต่ละครั้งจะมี status, การประทับเวลา, interaction_id ที่คุณใช้เพื่อดึงข้อมูลเอาต์พุตการโต้ตอบทั้งหมด และ environment_id ที่ยืนยันว่าการเรียกใช้ทั้งหมดใช้แซนด์บ็อกซ์เดียวกัน
Python
executions = client.triggers.list_executions(trigger_id="TRIGGER_ID")
for ex in executions.trigger_executions:
print(f"{ex.id}: {ex.status} ({ex.start_time} - {ex.end_time})")
# Fetch the full interaction for an execution
interaction = client.interactions.get(id=ex.interaction_id)
print(interaction.output_text)
JavaScript
const executions = await client.triggers.listExecutions("TRIGGER_ID");
for (const ex of executions.trigger_executions) {
console.log(`${ex.id}: ${ex.status} (${ex.start_time} - ${ex.end_time})`);
}
// Fetch the full interaction for an execution
const interaction = await client.interactions.get(ex.interaction_id);
console.log(interaction.output_text);
REST
curl -X GET "https://generativelanguage.googleapis.com/v1beta/triggers/TRIGGER_ID/executions" \
-H "x-goog-api-key: $GEMINI_API_KEY"
ความพร้อมให้บริการและการกำหนดราคา
Agent ของ Antigravity พร้อมให้บริการในเวอร์ชันตัวอย่างผ่าน Interactions API ใน Google AI Studio และ Gemini API สำหรับโปรเจ็กต์ทั้งในระดับฟรีและระดับที่ต้องชำระเงิน
ราคาเป็นไปตามรูปแบบการจ่ายเมื่อใช้ โดยอิงตามโทเค็นของโมเดล Gemini พื้นฐานและเครื่องมือที่เอเจนต์ใช้ การโต้ตอบ Antigravity เป็นเวิร์กโฟลว์แบบเอเจนต์ ซึ่งแตกต่างจากคำขอแชทมาตรฐานที่สร้างเอาต์พุตเดียว คำขอเดียวจะทริกเกอร์ลูปการให้เหตุผล การดำเนินการเครื่องมือ การเรียกใช้โค้ด และการจัดการไฟล์แบบอัตโนมัติ โปรเจ็กต์ในรุ่นฟรีมีขีดจำกัดอัตราการใช้งานฟรี และโควต้าการใช้งาน
การโต้ตอบแบบ Antigravity ทำงานในลูปอัตโนมัติแบบการสนทนาไปมาและอาจใช้โทเค็นจำนวนมาก ตั้งค่าการควบคุมงบประมาณในคำขอเพื่อจำกัดการใช้โทเค็น นอกจากนี้ คุณยังตรวจสอบความคืบหน้าแบบเรียลไทม์ได้ด้วยการสตรีม SSE หรือยกเลิกคำขอที่กำลังดำเนินการ
การควบคุมงบประมาณ
นอกเหนือจากการเลือกโมเดลแล้ว ให้ตั้งค่า max_total_tokens ภายใน agent_config (ด้วย "type": "antigravity") เพื่อจำกัด
จำนวนโทเค็นทั้งหมด (อินพุต + เอาต์พุต + การคิด) ที่การโต้ตอบใช้ได้
โทเค็นที่แคชไว้จะไม่นับรวมในขีดจํากัดนี้ เมื่อเอเจนต์ถึงขีดจำกัดแล้ว การโต้ตอบจะหยุดลงและกลับมาพร้อมกับ status: "incomplete" ขีดจํากัดนี้เป็นแบบพยายามอย่างเต็มที่
การใช้งานจริงอาจเกินขีดจํากัดเล็กน้อย ขึ้นอยู่กับเวลาที่ตัวแทนตรวจสอบงบประมาณ
ระหว่างขั้นตอน
ตั้งงบประมาณในคำขอการโต้ตอบใน agent_config พร้อมกับ agent และ input
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Analyze the dataset in /workspace/data.csv and generate a summary report.",
agent_config={
"type": "antigravity",
"max_total_tokens": 50000
},
environment={
"type": "remote",
"sources": [
{
"type": "inline",
"target": "/workspace/data.csv",
"content": "id,name,value\n1,alpha,100\n2,beta,200\n",
}
],
}
)
print(f"Status: {interaction.status}") # "incomplete" if budget was hit
print(f"Tokens used: {interaction.usage.total_tokens}")
JavaScript
import { GoogleGenAI } from "@google/genai";
const client = new GoogleGenAI({});
const interaction = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "Analyze the dataset in /workspace/data.csv and generate a summary report.",
agent_config: {
type: "antigravity",
max_total_tokens: 50000
},
environment: {
type: "remote",
sources: [
{
type: "inline",
target: "/workspace/data.csv",
content: "id,name,value\n1,alpha,100\n2,beta,200\n",
},
],
},
});
console.log(`Status: ${interaction.status}`);
console.log(`Tokens used: ${interaction.usage.total_tokens}`);
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "Analyze the dataset in /workspace/data.csv and generate a summary report.",
"agent_config": {
"type": "antigravity",
"max_total_tokens": 50000
},
"environment": {
"type": "remote",
"sources": [
{
"type": "inline",
"target": "/workspace/data.csv",
"content": "id,name,value\n1,alpha,100\n2,beta,200\n"
}
]
}
}'
ดำเนินการโต้ตอบที่ไม่สมบูรณ์ต่อ
เมื่อการโต้ตอบกลับมา status: "incomplete" ระบบจะเก็บรักษางานและบริบทของตัวแทน
ส่งการโต้ตอบใหม่โดยอ้างอิงถึงการโต้ตอบเดิม id และ
environment_id เพื่อดำเนินการต่อจากจุดที่ค้างไว้ การโต้ตอบใหม่จะมีงบประมาณของตัวเอง
max_total_tokens
Python
# Continue from where the agent stopped
continuation = client.interactions.create(
agent="antigravity-preview-05-2026",
input="continue",
previous_interaction_id=interaction.id,
environment=interaction.environment_id,
agent_config={
"type": "antigravity",
"max_total_tokens": 50000
}
)
print(f"Status: {continuation.status}")
JavaScript
const continuation = await client.interactions.create({
agent: "antigravity-preview-05-2026",
input: "continue",
previous_interaction_id: interaction.id,
environment: interaction.environment_id,
agent_config: {
type: "antigravity",
max_total_tokens: 50000
}
});
console.log(`Status: ${continuation.status}`);
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
-H "Content-Type: application/json" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "continue",
"previous_interaction_id": "INTERACTION_ID",
"environment": "ENVIRONMENT_ID",
"agent_config": {
"type": "antigravity",
"max_total_tokens": 50000
}
}'
ค่าใช้จ่ายโดยประมาณ
ค่าใช้จ่ายจะแตกต่างกันไปตามความซับซ้อนของงาน Agent จะพิจารณาโดยอัตโนมัติว่าต้องมีการเรียกใช้เครื่องมือ การดำเนินการโค้ด และการดำเนินการกับไฟล์กี่ครั้ง ค่าประมาณต่อไปนี้อิงตามการวิ่ง
| หมวดหมู่งาน | โทเค็นอินพุต | โทเค็นเอาต์พุต | ค่าใช้จ่ายปกติ |
|---|---|---|---|
| การวิจัยและการสังเคราะห์ข้อมูล | 100,000-500,000 | 10,000-40,000 | $0.30–$1.00 |
| การสร้างเอกสารและเนื้อหา | 100,000-500,000 | 15,000-50,000 | $0.30–$1.30 |
| การออกแบบกระบวนการและระบบ | 100,000-400,000 | 10,000-30,000 | $0.25–$0.80 |
| การประมวลผลและการวิเคราะห์ข้อมูล | 300,000–3,000,000 | 30,000-150,000 | $0.70–$3.25 |
โดยปกติแล้ว ระบบจะแคชโทเค็นอินพุต 50-70% เวิร์กโฟลว์ของเอเจนต์ที่ซับซ้อนซึ่งมีการเรียกใช้เครื่องมือหลายครั้งอาจสะสมโทเค็นได้ 3-5 ล้านโทเค็นในการโต้ตอบครั้งเดียว โดยมีค่าใช้จ่ายสูงสุดประมาณ$5
การประมวลผลสภาพแวดล้อม (CPU, หน่วยความจำ, การดำเนินการในแซนด์บ็อกซ์) จะไม่มีการเรียกเก็บเงินในช่วงระยะเวลาแสดงตัวอย่าง
ข้อจำกัด
- สถานะเวอร์ชันตัวอย่าง: Agent ของ Antigravity และ Interactions API ฟีเจอร์และสคีมาอาจมีการเปลี่ยนแปลง
- การกำหนดค่าการสร้างที่ไม่รองรับ: ระบบไม่รองรับพารามิเตอร์ต่อไปนี้และจะแสดงข้อผิดพลาด 400:
temperature,top_p,top_k,stop_sequences,max_output_tokens - เอาต์พุตที่มีโครงสร้าง: Agent ของ Antigravity ไม่รองรับเอาต์พุตที่มีโครงสร้าง
- เครื่องมือที่ไม่พร้อมใช้งาน: ระบบยังไม่รองรับ
file_search,computer_useและgoogle_maps - ข้อจำกัดของ MCP ระยะไกล: ไม่รองรับการรับส่งข้อมูล Server-Sent Events (SSE) (ใช้ HTTP ที่สตรีมได้) นอกจากนี้ เซิร์ฟเวอร์
nameต้องเป็นตัวอักษรพิมพ์เล็กและตัวอักษรและตัวเลขคละกันเท่านั้น (การใช้ตัวอักษรพิมพ์ใหญ่จะทริกเกอร์ข้อผิดพลาด400 Bad Requestทั่วไป) - เครื่องมือระบบไฟล์: ขณะนี้ยังไม่มีเครื่องมือระบบไฟล์ ซึ่งเป็นส่วนหนึ่งของ
environment - ข้อกำหนดของร้านค้า: การดำเนินการของ Agent โดยใช้
background=Trueต้องมีstore=True - การเรียกใช้ฟังก์ชันแบบมีสถานะเท่านั้น: ระบบรองรับการเรียกใช้ฟังก์ชันในโหมดมีสถานะเท่านั้น คุณต้องใช้
previous_interaction_idเพื่อดำเนินการต่อ และระบบไม่รองรับการสร้างประวัติขึ้นใหม่ด้วยตนเอง (โหมดไม่เก็บสถานะ) - ประเภทมัลติโมดัลที่ไม่รองรับ ขณะนี้ระบบยังไม่รองรับอินพุตเสียง วิดีโอ และเอกสาร อนุญาตให้ใช้ได้เฉพาะข้อความและรูปภาพ
ขั้นตอนถัดไป
- การเริ่มต้นอย่างรวดเร็ว: การสนทนาไปมาและการสตรีม
- การสร้าง Agent ที่กำหนดเอง: คำสั่งที่กำหนดเอง ทักษะ และการบันทึก Agent
- สภาพแวดล้อม: การกำหนดค่าแซนด์บ็อกซ์ แหล่งที่มา เครือข่าย
- Deep Research Agent: งานวิจัยแบบยาว
- Interactions API: API พื้นฐาน