Runnable examples for antigravity_cli_sdk. These examples exercise the Antigravity SDK directly through agy; ASM examples stay in agent_session_manager/examples.

Prerequisites:

  • Antigravity CLI (agy) installed and authenticated
  • mix deps.get
  • secrets wrapper for live local sweeps: ~/scripts/with_bash_secrets

Run one example:

mix run examples/simple_run.exs
mix run examples/add_dirs_repeatable.exs -- --cwd /repo

Run all examples:

bash examples/run_all.sh
~/scripts/with_bash_secrets bash examples/run_all.sh

Run one example through the runner:

bash examples/run_all.sh simple_stream
bash examples/run_all.sh promotion_path/sdk_direct_antigravity --cwd /repo

Shared flags:

  • --cwd <path>
  • --cli-command <path>
  • --model <id>
  • --prompt <text>
  • --danger-full-access
  • --ssh-host <host>
  • --ssh-user <user>
  • --ssh-port <port>
  • --ssh-identity-file <path>

SSH flags are parsed consistently, but the default runner does not include a remote-only example. Passing --ssh-host routes examples through the shared execution_surface option.

Examples use ordinary coding-agent mode. completion_only: true and output_schema are deliberately unsupported and fail before agy starts. For lifecycle tests, timeout_ms, run_deadline_ms, and transport_headless_timeout_ms remain independent.

Inventory

ExampleSDK surface
simple_run.exsAntigravityCliSdk.run/2
simple_stream.exsAntigravityCliSdk.execute/2, message/result event accumulation
sync_sequence.exsmultiple sequential run/2 calls
model_selection.exsAntigravityCliSdk.Models, model payload normalization
add_dirs_repeatable.exsrepeatable --add-dir rendering
sandbox_and_permissions.exssandbox and permission rendering
conversation_continue.exsconversation and continue option rendering
debug_and_log_file.exslog file rendering; debug remains non-argv because agy --help exposes no --debug
plain_text_line_events.exsplain-text assistant delta projection
configuration_stagger.exsspawn stagger config and repeated live calls
governed_launch_demo.exsgoverned authority invocation and smuggling rejection
error_handling.exsvalidation and CLI-resolution errors
options_validation.exsAntigravityCliSdk.Options schema success/failure
cli_path_resolution.exsAntigravityCliSdk.CLI.resolve/1 and rendered --print
session_lifecycle.exsstart_session/1, tagged subscriber, and close
list_provider_sessions.exsportable session-list contract
promotion_path/sdk_direct_antigravity.exsSDK-only promotion path, no ASM imports

No example imports agent_session_manager. Antigravity is the supported Google coding-agent SDK; the retired gemini_cli_sdk remains retired, and gemini_ex is a distinct model API SDK. These examples use agy only.