Monitor Generative AI Applications through Events

The Python Agent captures and publishes events for Large Language Model (LLM) and Vector Database operations. It helps you to monitor and analyze your generative AI application behavior in the Controller.

When you enable monitoring events of generative AI applications, the Python Agent instruments LLM and vector database calls from the supported frameworks. Then, it publishes the event data to the Events Service and this data is displayed on the Controller. Analyze the generative AI applications behavior using this data and take actions if necessary.

Supported Frameworks

After you enable the Python instrumentation to monitor events data, the Python Agent automatically collects events from the following frameworks:

FrameworkFlag
AWS Bedrockenable-bedrock
LangChain LLM and VectorStoresenable-langchain
OpenAI Clientenable-openai

Prerequisites

  • Install the Python Agent 25.10.0 or later.

  • Enable the required frameworks with the agent instrumentation.

    For example, capture OpenAI events, set both enable-openai and enable-genai-events to true.

Configure the Python Agent to Monitor Events

Update the /path/to/appdynamics.cfg file.
  1. In the [services:events] section, set the enable-genai-events flag to true.
    [services:events]
    	enable-genai-events = true
    	event-service-url = https://your-events-api-endpoint.com
    	event-service-account-name = <your_account_name>
    	event-service-access-key = <your_access_key_here>
  2. In the [instrumentation] section, enable the required frameworks.
    Example code:
    [instrumentation]
    	enable-openai = true
    	enable-langchain = true 
    	enable-bedrock = true
  3. (Optional) Configure advanced Events Service settings.
    Customize event buffering, retry behavior, and connection settings. See, [services:events].