Connect Gemini to Swarmia
Swarmia detects Gemini Code Assist's pull requests, reviews, and commits automatically. Send usage data to also see adoption and time-based PR attribution.
Swarmia detects Gemini Code Assist's pull requests, reviews, and commits automatically, including activity from recognized Gemini CLI identities. You can also send usage data for both tools to Swarmia to see adoption and add time-based pull request attribution.
Track Gemini's Git activity
Swarmia detects Gemini as soon as it's active in one of your repositories. Settings → AI tools shows whether Swarmia has detected it.
Swarmia detects the following activity with high confidence:
Pull requests opened by Gemini, or whose first commit Gemini authored, as cloud agent work
Pull requests reviewed by Gemini as review agent work
Commits Gemini authored or co-authored as AI-assisted work
Send Gemini usage data (optional)
To show Gemini usage data in Users and licenses, collect daily per-user data and send it to Swarmia's additional AI integrations API with Gemini as the aiService. The data goes to the built-in Gemini integration, so you don't need to create a custom AI tool.
Find your Gemini data
Google provides different data sources for Gemini Code Assist and Gemini CLI:
Gemini Code Assist seats: View assigned users through license management or the license pool API. Use your contract price or Google's license pricing for subscription costs.
Gemini Code Assist IDE usage: Configure Cloud Logging and use the metadata logs for per-user activity. These logs cover IDE usage, not Gemini Code Assist reviews on GitHub or Gemini CLI usage.
Gemini CLI usage: Use Gemini CLI OpenTelemetry for activity, model, and token data. Review the telemetry privacy settings before collecting prompts or responses.
Gemini CLI API usage and cost: When using pay-as-you-go API access, see Gemini API billing and usage and Gemini CLI quotas and pricing for Gemini API and Vertex AI options. Billing data may not identify individual users or distinguish CLI usage from other API usage.
The available data depends on your plan and logging setup. For example, Code Assist IDE logs don't provide a complete per-user token breakdown.
Data to send to Swarmia
Send one record per user and day, combining Code Assist and CLI data for that person. Include the user's email and date, and report:
Access (
is_enabled): Whether the person had a Code Assist seat or other Gemini access, including pay-as-you-go API access.Activity (
is_active): Whether the person sent a message or accepted a suggestion that day.Subscription spend (
subscription_spend_minor, optional): The per-day portion of the person's subscription seat price, including days they didn't use it.Extra usage spend (
extra_usage_spend_minor, optional): Additional usage charges, including pay-as-you-go API costs. Don't count usage included in the subscription again.
You can also include other available details, such as subscription tier and model or token breakdowns.
Sending another record for the same user, tool, and date replaces the previous record, so include data from both tools when updating it. See send usage data to the API for authentication and import details.
Swarmia uses daily usage records for time-based, low-confidence AI-assisted attribution. Use the high-confidence-only filter to exclude this attribution.
Last updated
Was this helpful?