---
title: Automatic Integrations
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Datadog Security > AI Guard > Set Up AI Guard > Automatic Integrations
---

# Automatic Integrations

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
AI Guard isn't available in the  site.
{% /alert %}


{% /callout %}

AI Guard can automatically evaluate LLM calls made through supported AI ecosystem packages, without requiring manual API calls. When your application uses one of the supported packages, the Datadog SDK instruments it to evaluate those calls through AI Guard automatically. No code changes are required.

## Supported frameworks and libraries{% #supported-frameworks-and-libraries %}

{% tab title="Python" %}

| Package   | Supported Versions | SDK Version |
| --------- | ------------------ | ----------- |
| LangChain | \>= 0.1.20         | \>= 3.14.0  |

{% /tab %}

{% tab title="Node.js" %}

| Package | Supported Versions | SDK Version |
| ------- | ------------------ | ----------- |
| AI SDK  | v6                 | \>=5.95.0   |

{% /tab %}

## Set up the Datadog Agent

SDKs use the [Datadog Agent](https://docs.datadoghq.com/agent.md?tab=Host-based) to send AI Guard data to Datadog. The Agent must be running and accessible to your application.

If you don't use the Datadog Agent, the AI Guard evaluator API still works, but you can't see AI Guard traces in Datadog.

## Required environment variables

Set the following environment variables in your application:

| Variable              | Value                    |
| --------------------- | ------------------------ |
| `DD_AI_GUARD_ENABLED` | `true`                   |
| `DD_API_KEY`          | `<YOUR_API_KEY>`         |
| `DD_APP_KEY`          | `<YOUR_APPLICATION_KEY>` |
| `DD_ENV`              | `<YOUR_ENVIRONMENT>`     |
| `DD_SERVICE`          | `<YOUR_SERVICE>`         |
| `DD_TRACE_ENABLED`    | `true`                   |

By default, automatic integrations follow the blocking configuration set in the AI Guard service settings. To disable blocking for a specific service, set `DD_AI_GUARD_BLOCK` to `false` (equivalent to the `block` option in the [SDK](https://docs.datadoghq.com/security/ai_guard/setup/sdk.md) and [REST API](https://docs.datadoghq.com/security/ai_guard/setup/http_api.md)):

| Variable            | Value   |
| ------------------- | ------- |
| `DD_AI_GUARD_BLOCK` | `false` |

## Integrations{% #integrations %}

{% tab title="Python" %}
The LangChain integration automatically applies AI Guard evaluations to calls made through the [LangChain Python SDK](https://docs.langchain.com/oss/python/langchain/overview).

### Traced operations{% #traced-operations %}

AI Guard automatically evaluates the following LangChain operations:

- LLMs:
  - `llm.invoke()`, `llm.ainvoke()`
- [Chat models](https://docs.langchain.com/oss/python/langchain/models):
  - `chat_model.invoke()`, `chat_model.ainvoke()`
- [Tools](https://docs.langchain.com/oss/python/langchain/tools):
  - `BaseTool.invoke()`, `BaseTool.ainvoke()`

{% /tab %}

{% tab title="Node.js" %}
The [AI SDK](https://ai-sdk.dev/docs/introduction) integration automatically applies AI Guard evaluations to text and object generation, embeddings, and tool calls.

### Traced operations{% #traced-operations %}

- [Text generation](https://ai-sdk.dev/docs/ai-sdk-core/generating-text):
  - `generateText`
  - `streamText`
- [Object generation](https://ai-sdk.dev/docs/ai-sdk-core/generating-structured-data):
  - `generateObject`
  - `streamObject`
- [Tool calling](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling):
  - `tool.execute`

{% /tab %}

## Further reading{% #further-reading %}

- [Manual Integrations](https://docs.datadoghq.com/security/ai_guard/setup/manual_integrations.md)
- [SDK](https://docs.datadoghq.com/security/ai_guard/setup/sdk.md)
