﻿---
title: AI configuration options
description: Enables capture of Spring AI prompt and response messages, embedding inputs, vector store documents and queries, and tool arguments and results. Captured...
url: https://docs-v3-preview.elastic.dev/elastic/apm-agent-java/pull/4622/reference/config-ai
products:
  - APM Agent
  - APM Java Agent
applies_to:
  - Serverless Observability projects: Generally available
  - Elastic Stack: Generally available
  - Application Performance Monitoring Agent for Java: Generally available
---

# AI configuration options
## `capture_ai_content` (experimental, security, performance)

<applies-to>
  - Application Performance Monitoring Agent for Java: Planned
</applies-to>

Enables capture of Spring AI prompt and response messages, embedding inputs, vector store documents and queries, and tool arguments and results.
Captured content can contain sensitive information and can significantly increase heap usage, network traffic, and storage requirements. Review your data handling requirements before enabling this option. Individual captured content values are truncated according to [`long_field_max_length`](/elastic/apm-agent-java/pull/4622/reference/config-core#config-long-field-max-length).
[![dynamic config](https://docs-v3-preview.elastic.dev/elastic/apm-agent-java/pull/4622/reference/images/dynamic-config.svg) ](/elastic/apm-agent-java/pull/4622/reference/configuration#configuration-dynamic)
Support for configuring this option through Kibana central configuration will be added in a future Kibana version.

| Default | Type    | Dynamic |
|---------|---------|---------|
| `false` | Boolean | true    |


| Java System Properties           | Property file        | Environment                      |
|----------------------------------|----------------------|----------------------------------|
| `elastic.apm.capture_ai_content` | `capture_ai_content` | `ELASTIC_APM_CAPTURE_AI_CONTENT` |