Skip to main content

Overview

This example demonstrates how to use the Gemini CLI integration to execute simple prompts. The AgentCtrl facade provides a clean API for invoking the gemini CLI in headless mode with full event observability. Key concepts:
  • AgentCtrl::gemini(): Factory for Gemini agent builder
  • planMode(): Run in read-only analysis mode
  • AgentCtrlConsoleLogger: Shows execution lifecycle with color-coded labels

Example

Expected Output

Key Points

  • Simple execution: One method call handles the entire interaction
  • Full observability: Console logger shows request building, sandbox setup, and response parsing
  • Plan mode: Use planMode() for read-only analysis without file modifications
  • Free tier: Gemini CLI offers a free tier with Google account authentication