Пример запроса
curl -X POST https://generativelanguage.googleapis.com/v1beta/interactions \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent": "antigravity-preview-05-2026",
"input": "List all files under /workspace and summarize what you find.",
"environment": {
"type": "remote",
"sources": [
{
"type": "repository",
"source": "https://github.com/octocat/Spoon-Knife",
"target": "/workspace/repo"
},
{
"type": "inline",
"content": "Focus on Python files only.",
"target": "/workspace/notes.txt"
}
]
}
}' from google import genai
client = genai.Client()
interaction = client.interactions.create(
agent="antigravity-preview-05-2026",
input="List all files under /workspace and summarize what you find.",
environment={
"type": "remote",
"sources": [
{
"type": "repository",
"source": "https://github.com/octocat/Spoon-Knife",
"target": "/workspace/repo",
},
{
"type": "inline",
"content": "Focus on Python files only.",
"target": "/workspace/notes.txt",
},
],
},
)
print(interaction.output_text) import {GoogleGenAI} from '@google/genai';
const ai = new GoogleGenAI({});
const interaction = await ai.interactions.create({
agent: 'antigravity-preview-05-2026',
input: 'List all files under /workspace and summarize what you find.',
environment: {
type: 'remote',
sources: [
{
type: 'repository',
source: 'https://github.com/octocat/Spoon-Knife',
target: '/workspace/repo',
},
{
type: 'inline',
content: 'Focus on Python files only.',
target: '/workspace/notes.txt',
},
],
},
});
console.log(interaction.output_text); import com.google.genai.Client;
import com.google.genai.gaos.models.interactions.AgentOption;
import com.google.genai.gaos.models.interactions.CreateAgentInteraction;
import com.google.genai.gaos.models.interactions.CreateAgentInteractionEnvironment;
import com.google.genai.gaos.models.interactions.Environment;
import com.google.genai.gaos.models.interactions.Interaction;
import com.google.genai.gaos.models.interactions.InteractionsInput;
import com.google.genai.gaos.models.interactions.Source;
import com.google.genai.gaos.models.interactions.SourceType;
import com.google.genai.gaos.models.operations.CreateInteractionRequestBody;
import com.google.genai.gaos.models.operations.CreateInteractionResponse;
import java.util.List;
Client client = new Client();
Environment env = Environment.builder()
.sources(List.of(
Source.builder()
.type(SourceType.REPOSITORY)
.source("https://github.com/octocat/Spoon-Knife")
.target("/workspace/repo")
.build(),
Source.builder()
.type(SourceType.INLINE)
.content("Focus on Python files only.")
.target("/workspace/notes.txt")
.build()
))
.build();
CreateAgentInteraction params =
CreateAgentInteraction.builder()
.agent(AgentOption.of("antigravity-preview-05-2026"))
.input(InteractionsInput.of("List all files under /workspace and summarize what you find."))
.environment(CreateAgentInteractionEnvironment.of(env))
.build();
CreateInteractionResponse response =
client.interactions.create(CreateInteractionRequestBody.of(params));
Interaction interaction =
response.interaction().orElseThrow(() -> new RuntimeException("No interaction returned"));
System.out.println(interaction.outputText().orElse(""));