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

Configure the Ruby agent's AI monitoring settings to enable LLM instrumentation and control whether input and output content is captured in AI events.

## AI Monitoring [#ai-monitoring]

This section includes Ruby agent configurations for setting up AI monitoring.

> #### ⚠️ IMPORTANT
>
> You need to enable distributed tracing to capture trace and feedback data. It is turned on by default in Ruby agents 8.0.0 and higher.

**ai_monitoring.enabled**

| TypeBoolean                                     |
| ----------------------------------------------- |
| Defaultfalse                                    |
| Environ variableNEW_RELIC_AI_MONITORING_ENABLED |

If `false`, all LLM instrumentation (OpenAI only for now) will be disabled and no metrics, events, or spans will be sent. AI Monitoring is automatically disabled if `high_security` mode is enabled.

**ai_monitoring.record_content.enabled**

| TypeBoolean                                                    |
| -------------------------------------------------------------- |
| Defaulttrue                                                    |
| Environ variableNEW_RELIC_AI_MONITORING_RECORD_CONTENT_ENABLED |

If `false`, LLM instrumentation (OpenAI only for now) will not capture the `content` attribute on LlmChatCompletionMessage events or the `input` attribute on LlmEmbedding events. This is an optional security setting to prevent recording sensitive data sent to and received from your LLMs.
