Skip to main content
Trace Gemini CLI sessions, agent steps, model calls, and tool invocations in Arize AX for full observability.
Gemini CLI is Google’s open-source command-line agent for Gemini. The Arize Coding Harness Tracing instruments Gemini CLI sessions and exports OpenInference spans to Arize AX.

Launch Arize AX

To get started, sign up for a free Arize AX account and get your Space ID and API Key:
  1. Log in at app.arize.com
  2. Click Settings and copy the Space ID
  3. Open the API Keys tab and create or copy an API key

Install

Curl installer

macOS / Linux:
Windows (PowerShell):

Local clone

The installer prompts for your Arize AX credentials and project name, writes them to ~/.arize/harness/config.json, and registers the hooks in ~/.gemini/settings.json.

Configuration

Credentials live in ~/.arize/harness/config.json. Environment variables override values in config.json and can be set in your shell profile.

Redaction controls

Each ARIZE_LOG_* flag accepts "true" or "false" and defaults to "true". Set to "false" to opt out per category:

Observe

Once tracing is enabled, Gemini CLI activity is streamed to Arize AX. You’ll see:
  • Session traces — each session bracketed by SessionStart and SessionEnd
  • Agent spans — paired BeforeAgent / AfterAgent events for each agent step
  • LLM spans — paired BeforeModel / AfterModel events with model info and tokens
  • Tool spans — paired BeforeTool / AfterTool events with input, output, and duration
  • Session grouping — all spans from the same session grouped by session_id

Hooks Captured

Reference

For the full list of environment variables, default file paths, and troubleshooting steps, see the Gemini tracing README.

Uninstall

Resources

Arize Coding Harness Tracing

OpenInference

Gemini CLI