---
title: Java agent AI monitoring settings
source: https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-ai-monitoring-settings
---

AI monitoring settings control how the agent instruments large language model (LLM) calls and captures AI response data.

> #### 💡 TIP
>
> Back to the full settings index: [Java agent configuration](https://docs.newrelic.com/docs/apm/agents/java-agent/configuration/java-agent-configuration-config-file)

## AI monitoring [#ai-monitoring]

This section details the Java agent configuration options for [AI monitoring](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring). This feature can be configured in the `ai_monitoring` yaml config file stanza, with `newrelic.config.ai_monitoring.` prefixed system properties, or with `NEW_RELIC_AI_MONITORING_` prefixed environment variables.

> #### ⚠️ IMPORTANT
>
> If distributed tracing is disabled or high security mode is enabled, AI monitoring will not collect AI data.

> #### ⚠️ IMPORTANT
>
> When enabled, AI monitoring  records a streaming copy of inputs and outputs sent to and from the models you choose to monitor, including any personal information contained therein.
> You're 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.

**enabled**

| Type    | Boolean |
| ------- | ------- |
| Default | `false` |

When set to `true`, enables AI monitoring.

**record_content.enabled**

| Type    | Boolean |
| ------- | ------- |
| Default | `true`  |

If set to `false`, agent will omit 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.
