Impraint
Integrations

Integrations

Connect Guard to your LLM provider or agent framework.

Guard records model, tokens and cost for you once you attach an integration. Pick the one that matches how you call your model.

Two ways to attach a provider

For the raw provider SDKs, Guard offers two mechanisms. Both capture streaming and non-streaming calls.

Module-level patchInstance-level wrapper
Geminipatch_gemini(guard)guard.wrap_gemini(client)
Anthropicpatch_anthropic(guard)guard.wrap_anthropic(client)
ScopeProcess-wide, every clientOnly the client you wrap
Use whenYou want zero changes at call sitesYou want explicit control per client

Beyond tracing

  • Rules and circuit breaker protect any Python function with @guard.tool or guard.intercept, whatever provider you use. You do not need an integration for them.
  • Content safety checks prompts for you on the beta integrations (Gemini, LangChain and LangGraph). It is on by default and reports what it finds, and you can set it to block or switch it off with on_input. For any other code, call guard.check_content yourself.

See Compatibility for what is supported in beta.

On this page