---
title: Node.js agent AI monitoring settings
source: https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration-ai-monitoring-settings
---

This page covers the Node.js agent settings for AI monitoring, including LLM telemetry, streaming, and content recording.

> #### 💡 TIP
>
> Back to the full settings index: [Node.js agent configuration](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration)

## AI monitoring [#ai-monitoring]

LLM instrumentation is enabled by default. The agent sends `Llm*` custom events, spans, and metrics without message content.

To opt out, set any of the following to `false`:

-   `ai_monitoring.basic_telemetry.enabled` in `newrelic.js`
-   `NEW_RELIC_AI_MONITORING_BASIC_TELEMETRY_ENABLED` environment variable
-   `ai_monitoring.enabled` in `newrelic.js` (deprecated, but still works)
-   `NEW_RELIC_AI_MONITORING_ENABLED` environment variable (deprecated, but still works)

> #### ⚠️ IMPORTANT
>
> You must enable [distributed tracing](https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#dt-main) to capture AI data. It's turned on by default in Node.js agents 8.3.0 and higher. If you've enabled high security mode, AI monitoring will not work.

> #### ⚠️ IMPORTANT
>
> When enabled, AI Monitoring will record a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein. When using AI Monitoring, you are responsible for obtaining consent from your model users that their interactions may be recorded by a third party (New Relic) for the purpose of providing the AI Monitoring feature.

**ai_monitoring.basic_telemetry.enabled**

| Type                             | Boolean                                           |
| -------------------------------- | ------------------------------------------------- |
| Default                          | `true`                                            |
| [Environ variable](#environment) | `NEW_RELIC_AI_MONITORING_BASIC_TELEMETRY_ENABLED` |

When set to `true`, the agent sends `Llm*` custom events, spans, and metrics without message content. Set to `false` to opt out of AI monitoring.

**ai_monitoring.enabled (deprecated)**

| Type                             | Boolean                           |
| -------------------------------- | --------------------------------- |
| Default                          | `null`                            |
| [Environ variable](#environment) | `NEW_RELIC_AI_MONITORING_ENABLED` |

Deprecated. Use [`ai_monitoring.basic_telemetry.enabled`](#ai-monitoring-basic-telemetry) instead. Setting this to `false` still opts out of AI monitoring.

**ai_monitoring.streaming.enabled**

| Type                             | Boolean                                     |
| -------------------------------- | ------------------------------------------- |
| Default                          | `true`                                      |
| [Environ variable](#environment) | `NEW_RELIC_AI_MONITORING_STREAMING_ENABLED` |

When set to `false`, disables instrumentation for streamed LLM data. Set to `true`, captures streamed data for LLM events.

**ai_monitoring.record_content.enabled**

| Type                             | Boolean                                          |
| -------------------------------- | ------------------------------------------------ |
| Default                          | `null`                                           |
| [Environ variable](#environment) | `NEW_RELIC_AI_MONITORING_RECORD_CONTENT_ENABLED` |

If set to `false`, agent omits input and output content (like text strings from prompts and responses) captured in LLM events. This is an optional security setting if you don't want to record sensitive data sent to and received from your LLMs.
