Docs
Google Gemini

Google Gemini

Ingest Gemini traces into AITracer via the SDK or API.

Agent Lab: Run local Ollama agents in the dashboard — no SDK required (Quick Start). This guide is for ingesting traces from this provider via the SDK or API.

Use the SDK or API to store Google Gemini runs in AITracer alongside Agent Lab traces.

Each ingested record typically includes:

  • prompt and response text
  • model id (e.g. gemini-2.0-flash)
  • token counts from usageMetadata
  • latency and finish reason

Gemini integration workflow

Rendering diagram...

Connecting Gemini (coach / cloud execution)

To run Gemini from the dashboard (e.g. coach mode):

  1. Go to Settings → Provider Connections
  2. Select Google Gemini
  3. Enter your API key from Google AI Studio

Supported models include gemini-2.0-flash, gemini-2.0-pro, and other models exposed by the Gemini API.

For production ingest, you only need an API key on the server and SDK calls from your app — no dashboard connection required.


What is captured

FieldSource
PromptInput text and system instructions
ResponseGenerated output
TokenspromptTokenCount, candidatesTokenCount, totalTokenCount
LatencyMeasured client-side or server-side
Finish reasonSTOP, MAX_TOKENS, SAFETY, etc.

Cost tracking

When token counts are present, AITracer estimates spend using model price tables. View rollups under Cost Intelligence (optional; not required for Agent Lab).


Optional advanced

Compliance scanning, integrity hashing, and audit export are documented under Governance Engine, Verification Layer, and Audit Vault.


Google Gemini – AITracer — AITracer