Overview

To enable full observability for your BeeAI agents, you can instrument them using OpenInference, follow the steps below for both Python and JavaScript frameworks. These instructions will guide you through the installation and setup of OpenInference instrumentation, enabling you to capture and export telemetry data effectively.

⚠️ Note: This guide only covers frameworks that are officially supported by the OpenInference ecosystem. If a framework is not part of OpenInference, we do not provide instrumentation guidance for it.

Be sure you have already run the Phoenix server. See the Agent Traceability site for more details.

Python Instrumentation example

  1. Install Required Packages: Begin by installing the necessary packages:
pip install beeai-framework openinference-instrumentation-beeai
  1. Instrument BeeAI Framework: Apply the OpenInference instrumentation to the BeeAI framework:
from openinference.instrumentation.beeai import BeeAIInstrumentor

# Instrument the BeeAI framework
BeeAIInstrumentor().instrument()
  1. Use BeeAI as Usual: Proceed with your standard BeeAI agent implementations. The instrumentation will automatically capture and export relevant telemetry data.

See OpenInference Instrumentation for BeeAI on how to run the instrumentation outside of the BeeAI.

JavaScript Instrumentation example

  1. Install Required Packages: Begin by installing the necessary packages:
npm install --save @arizeai/openinference-instrumentation-beeai beeai-framework
  1. Instrument BeeAI Framework: Apply the OpenInference instrumentation to the BeeAI framework:
import { BeeAIInstrumentation } from "@arizeai/openinference-instrumentation-beeai";
import * as beeaiFramework from "beeai-framework";

const beeAIInstrumentation = new BeeAIInstrumentation();
beeAIInstrumentation.manuallyInstrument(beeaiFramework);
  1. Use BeeAI as Usual: Proceed with your standard BeeAI agent implementations. The instrumentation will automatically capture and export relevant telemetry data.

See OpenInference Instrumentation for BeeAI on how to run the instrumentation outside of the BeeAI.