Class AntigravitySDK

The main Antigravity SDK class.

Provides access to:

  • commands — Execute Antigravity internal commands
  • state — Read agent preferences and state from USS
  • cascade — Manage Cascade conversations, send messages, read preferences
  • monitor — Watch for state changes (new conversations, preference updates)
const sdk = new AntigravitySDK(context);
await sdk.initialize();
const sessions = await sdk.cascade.getSessions();

Implements

Constructors

Properties

Cascade manager for conversations, preferences, diagnostics

commands: CommandBridge

Command bridge for executing Antigravity commands

integration: IntegrationManager

Integration manager for Agent View UI customization

Language Server bridge for headless cascade operations. Use this for background cascade creation without UI switching.

const id = await sdk.ls.createCascade({ text: 'Analyze coverage' });
await sdk.ls.sendMessage({ cascadeId: id, text: 'Focus on tests' });
await sdk.ls.focusCascade(id); // Only when ready to show
monitor: EventMonitor

Event monitor for watching state changes

State bridge for reading USS data

Accessors

  • get isInitialized(): boolean

    Check if the SDK has been initialized.

    Returns boolean

  • get version(): string

    Get the SDK version.

    Returns string

Methods

  • Initialize the SDK and verify Antigravity is running.

    Call this before using any SDK features.

    Returns Promise<void>

    If Antigravity is not detected