Skip to content
Français

createAntigravityHarness

import { createAntigravityHarness } from "@elie-laloum/outpost";

Create the Antigravity CLI (agy) preset without starting the CLI; createAgent({ harness, model }) binds it and rejects reasoning and maxOutputTokens. Resume, response repairs and steering work only inside the same open sandbox; conversation capture, cold resume and fork are rejected.

Complete example and detailed rules.

  • settingsOptional
    AntigravitySettings | undefined
    Antigravity settings; model, reasoning and maxOutputTokens belong on createAgent() and are rejected here, as is conversations.
  • settings.authenticationOptional
    AgentAuthentication | undefined
    “account” or account.file copies the agy Google sign-in token from ~/.gemini/antigravity-cli; usage forms forward GEMINI_API_KEY and select the Gemini API. Account key and variable fail when the agent is composed.
  • settings.variablesOptional
    Readonly<Record<string, string>> | undefined
    Environment variables for agy commands, merged over .outpost/.env; AGY_CLI_DISABLE_AUTO_UPDATE is always true. A name also set by the sandbox provider fails with code configuration.
  • settings.mcpServersOptional
    McpServers | undefined
    MCP servers merged into .gemini/config/mcp_config.json in the agent home, keyed by server name; other servers in the file are kept. On the local provider this is your own home. Each referenced variable must be declared.
  • settings.modeOptional
    "accept-edits" | "plan" | undefined
    Antigravity execution mode passed with —mode. Without it, headless runs pass —dangerously-skip-permissions; interactive sessions keep the CLI’s approval prompts.

CliHarness

export declare function createAntigravityHarness(
  settings?: AntigravitySettings,
): CliHarness;