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.
Gemini
Raw google-genai SDK on Vertex AI or AI Studio. Supported in beta.
LangChain
Callback handler for chains, models, tools and retrievers. Supported in beta.
LangGraph
Node-level tracking for graph agents. Supported in beta.
Anthropic
Raw anthropic SDK. Coming after beta.
Two ways to attach a provider
For the raw provider SDKs, Guard offers two mechanisms. Both capture streaming and non-streaming calls.
| Module-level patch | Instance-level wrapper | |
|---|---|---|
| Gemini | patch_gemini(guard) | guard.wrap_gemini(client) |
| Anthropic | patch_anthropic(guard) | guard.wrap_anthropic(client) |
| Scope | Process-wide, every client | Only the client you wrap |
| Use when | You want zero changes at call sites | You want explicit control per client |
Beyond tracing
- Rules and circuit breaker protect any Python function with
@guard.toolorguard.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, callguard.check_contentyourself.
See Compatibility for what is supported in beta.