For the complete documentation index, see llms.txt. This page is also available as Markdown.

Agent Frameworks Integration

The BlueRock runtime provides native telemetry tracing for multiple agent ecosystems, including LangChain, CrewAI, Anthropic, Google Agent Development Kit (ADK), OpenAI, and LiteLLM. By embedding the bluerock sensor directly into the execution space, the BlueRock runtime automatically hooks into internal orchestration and lifecycle engines. The integration requires no architectural changes to the codebase and no manual analytics callbacks.

lightbulb-exclamation-on

Core Architecture

The architecture remains consistent across all BlueRock agent integrations:

  1. Agent Execution Space: The environment where the specific agent program runs alongside the bluerock sensor. The environment must operate within a BlueRock Ubuntu or AL2023 VM.

  2. Event Collector: The component capturing telemetry from the execution space.

  3. bluerockd: The BlueRock Control Plane processing intercepted execution tasks and intents.

  4. CloudWatch or External Event Collector: The final destination for aggregated telemetry and logs.

Environment Setup

Prerequisites

  • Package Manager: Install uv for dependency management and execution.

Framework Configuration Reference

Different frameworks require specific primary packages and example scripts. The project name parameter can be any string (for example, search_agent or file_agent); enter the desired project name when substituting the <Enter_Project_Name_Here> placeholder. Reference the table below when substituting the remaining placeholder values in the subsequent setup steps.

Framework

<Package_Name>

Example Scripts

LangChain

langchain

Anthropic

anthropic

Google ADK

google_adk

OpenAI

openai

notes-sticky

Note:

The <Package_Name> represents the primary framework entry point. Additional packages and adapters required by custom implementations (for example: langchain_ollama, mcp, or fastmcp) can be dynamically appended to the dependency installation command.

Install the uv Package Manager

Run the installation script to install the package manager.

Provision the Isolated Project Environment

Initialize the local project workspace using Python 3.13 (or above) and establish project dependencies using the target framework details from the reference table.

Inject and Register BlueRock Sensors

Deploy the custom BlueRock telemetry sensor library directly within the activated workspace context. Activate runtime sensor hooks using the installation flag.

Stage the Agent Script

Add the script based on the selected agent framework. If required, use the example scripts from BlueRock.

Agent Execution Block

lightbulb-exclamation-on

Execution Variable Reference

Reference the table below when substituting placeholder values in the execution commands.

Framework

<API_Key_Variable>

LangChain

OPENAI_API_KEY

CrewAI

OPENAI_API_KEY

Anthropic

OPENAI_API_KEY

Google ADK

GOOGLE_API_KEY

OpenAI

OPENAI_API_KEY

LiteLLM

OPENAI_API_KEY

Local Execution

Set the required environment variable and execute the primary workspace script using the package manager.

Containerized Execution

Run the target agent as a Docker application. Securely mount the BlueRock socket into the container.

notes-sticky

Note:

<Container_Name> can be any arbitrary name assigned to the container. <Image_Name> must match the exact tag assigned when building or pulling the Docker image. Run docker images in the terminal to list all locally available images and corresponding tags.

Sensor Configuration and Telemetry Events

The sensors are governed by the bru_policy.json configuration file, located in the /opt/bluerock/trex/ directory on a BlueRock instance or VM. The policy defines separate configuration blocks to activate interception hooks for fundamental LLM calls versus higher-level agentic orchestration.

Depending on the active ecosystem, the sensor automatically captures distinct execution and lifecycle events.

LLM Sensors

The llm block controls the tracing of direct interactions with foundational models. Activating specific vendor flags within this block allows the sensor to capture raw generation requests, tokens, and response latencies.

Agentic Sensors

The Agentic configuration blocks (such as crewai and langchain) hook into multi-step reasoning, tool execution, memory retrieval, and agent delegation. These are enabled independently of the base LLM sensors.

Standardized Sample Events by Sensor Type

LLM Sensors

  • OpenAI

  • Anthropic

  • LiteLLM

Agentic Sensors

  • LangChain

  • CrewAI

  • Google Gemini

Last updated