Antigravity 에이전트는 Gemini API의 범용 관리형 에이전트입니다. 단일 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 검색 및 URL 가져오기.
- 컨텍스트 압축: 컨텍스트를 잃거나 토큰 한도에 도달하지 않고 장기 실행 다중 턴 세션을 지원하기 위한 자동 컨텍스트 압축 (~135, 000개 토큰에서 트리거됨).
다중 턴 사용 및 스트리밍에 관한 빠른 시작을 참고하세요.
지원되는 도구
기본적으로 에이전트는 code_execution, google_search, url_context에 액세스할 수 있습니다. environment 매개변수를 지정하면 파일 시스템 도구가 자동으로 사용 설정됩니다. 기본 집합을 맞춤설정하거나 제한할 때만 tools 매개변수를 지정하면 됩니다.
| 도구 | 유형 값 | 설명 |
|---|---|---|
| 코드 실행 | code_execution |
stdout/stderr 캡처를 사용하여 셸 명령어 (bash, Python, Node)를 실행합니다. |
| Google 검색 | google_search |
공개 웹을 검색합니다. |
| URL 컨텍스트 | url_context |
웹페이지를 가져오고 읽습니다. |
| 파일 시스템 | (enabled via 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 인코딩 문자열 (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\"
}"
시스템 안내
인라인 프롬프트에 system_instruction을 사용하거나 안내 파일을 환경에 마운트하여 에이전트의 동작을 맞춤설정합니다.
Python
from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="Analyze the uploaded CSV and create a report.",
environment="remote",
system_instruction="You are a data analyst. Always include visualizations and export results as PDF.",
)
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 uploaded CSV and create a report.",
environment: "remote",
system_instruction: "You are a data analyst. Always include visualizations and export results as PDF.",
}, { 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 uploaded CSV and create a report.",
"environment": "remote",
"system_instruction": "You are a data analyst. Always include visualizations and export results as PDF."
}'
에이전트는 환경에서 안내 파일을 자동으로 로드합니다.
AGENTS.md:.agents/또는 작업공간 루트에서 발견되면 시스템 안내로 추가됩니다.SKILL.md:.agents/skills/에서 로드되고 에이전트가 호출할 수 있는 기능으로 등록됩니다.
예를 들면 다음과 같습니다.
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.",
environment={
"type": "remote",
"sources": [
{
"type": "inline",
"target": ".agents/AGENTS.md",
"content": "You are a data analyst. Always use matplotlib for charts.",
},
{
"type": "inline",
"target": ".agents/skills/slide-maker/SKILL.md",
"content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks...",
},
],
},
)
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.",
environment: {
type: "remote",
sources: [
{
type: "inline",
target: ".agents/AGENTS.md",
content: "You are a data analyst. Always use matplotlib for charts.",
},
{
type: "inline",
target: ".agents/skills/slide-maker/SKILL.md",
content: "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks...",
},
],
},
}, { 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: $API_KEY" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "Analyze the Q1 revenue data and create a slide deck.",
"environment": {
"type": "remote",
"sources": [
{
"type": "inline",
"target": ".agents/AGENTS.md",
"content": "You are a data analyst. Always use matplotlib for charts."
},
{
"type": "inline",
"target": ".agents/skills/slide-maker/SKILL.md",
"content": "---\nname: slide-maker\n---\n# Slide Maker\nCreate HTML slide decks..."
}
]
}
}'
전체 에이전트 정의 형식 및 재사용 가능한 명명된 에이전트는 커스텀 에이전트 빌드를 참고하세요.
환경
각 호출은 Linux 샌드박스를 만들거나 재사용합니다. environment 매개변수는 세 가지 형식을 취합니다.
| 자세 | 설명 |
|---|---|
"remote" |
기본 설정으로 새 샌드박스를 프로비저닝합니다. |
"env_abc123" |
모든 파일과 상태를 보존하여 기존 환경을 ID별로 재사용합니다. |
{...} |
커스텀 소스 및 네트워크 규칙이 있는 전체 EnvironmentConfig입니다. |
소스 (Git, GCS, 인라인), 네트워킹, 수명 주기, 리소스 한도에 관한 자세한 내용은 환경을 참고하세요.
사용 가능 여부 및 가격 책정
Antigravity 에이전트는 Google AI Studio의 Interactions API 및 Gemini API를 통해 프리뷰로 제공됩니다.
가격 책정은 기본 Gemini 모델 토큰과 에이전트가 사용하는 도구를 기반으로 사용한 만큼만 지불 모델을 따릅니다. 단일 출력을 생성하는 표준 채팅 요청과 달리 Antigravity 상호작용은 에이전트형 워크플로입니다. 단일 요청은 추론, 도구 실행, 코드 실행, 파일 관리의 자율 루프를 트리거합니다.
예상 비용
비용은 작업 복잡성에 따라 다릅니다. 에이전트는 필요한 도구 호출, 코드 실행, 파일 작업의 수를 자율적으로 결정합니다. 다음 추정치는 실행을 기반으로 합니다.
| 작업 카테고리 | 입력 토큰 | 출력 토큰 | 일반 비용 |
|---|---|---|---|
| 연구 및 정보 합성 | 10만~50만 | 1만~4만 | $0.30~$1.00 |
| 문서 및 콘텐츠 생성 | 10만~50만 | 1만 5천~5만 | $0.30~$1.30 |
| 프로세스 및 시스템 설계 | 10만~40만 | 1만~3만 | $0.25~$0.80 |
| 데이터 처리 및 분석 | 30만~300만 | 3만~15만 | $0.70~$3.25 |
입력 토큰의 50~70% 는 일반적으로 캐시됩니다. 도구 호출이 많은 복잡한 에이전트 워크플로는 단일 상호작용에서 300만~500만 개의 토큰을 누적할 수 있으며 비용은 최대 약$5입니다.
프리뷰 기간에는 환경 컴퓨팅 (CPU, 메모리, 샌드박스 실행)에 요금이 청구되지 않습니다.
제한사항
- 프리뷰 상태: 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가 필요합니다. - 지원되지 않는 멀티모달 유형. 현재 오디오, 동영상, 문서 입력은 지원되지 않습니다. 텍스트와 이미지만 허용됩니다.
다음 단계
- 에이전트 개요: 관리형 에이전트의 핵심 개념에 대해 알아봅니다.
- 빠른 시작: 다중 턴 대화 및 스트리밍으로 빌드를 시작합니다.
- 에이전트 환경: 샌드박스, 소스, 네트워킹을 구성합니다.
- 커스텀 에이전트 빌드:
AGENTS.md및SKILL.md를 사용하여 자체 에이전트를 정의합니다.