Home / Home / Integrations / Spend Control for the Google GenAI SDK

Spend Control for the Google GenAI SDK

The GenAI SDK is the official Python/Go path to Gemini — and Gemini agents call tools that spend. The guard makes the spend policy real.

Why GenAI SDK agents overspend

Tool-calling agents hit paid endpoints per turn.

Long agentic sessions multiply inference and tool costs.

Gemini's own limits cover Gemini; the rest is ungoverned.

How it works

Register the guard as a tool (or call the HTTP API). Before any spend, the agent gets APPROVED, BLOCKED, or FLAGGED.

Rules that fit GenAI SDK workloads

Per-agent daily ceiling.

Merchant allowlist for paid tools.

Velocity limit for retry loops.

Guard call

from google import genai
from sipi_guard import sipi_guard

# Before a paid tool call:
decision = sipi_guard(amount=40, merchant="data-api.com", category="data")

Gemini for the model; the firewall for the money.

FAQ

Does this replace Gemini's usage limits?

No — keep them for Gemini. The firewall covers every merchant, including outside Google.

Is there a Go client?

sipi.bot is HTTP — any language works.

Related

Stop the next $12,400 night.

One API call (or MCP tool) in front of every agent transaction — APPROVED, BLOCKED, or FLAGGED, deterministic, ~5 ms, fully logged.

See plans — from $99/mo Try a live check