Amazon Bedrock AgentCore
Prerequisites
Installation
pip install bedrock-agentcore-starter-toolkit strands-agents[otel] interactiveai boto3 mcpConfiguration
InteractiveAI and OpenTelemetry Setup
import os
import base64
from interactiveai import Interactive
# InteractiveAI credentials
os.environ["INTERACTIVEAI_PUBLIC_KEY"] = "pk-ia-..."
os.environ["INTERACTIVEAI_SECRET_KEY"] = "sk-ia-..."
os.environ["INTERACTIVEAI_HOST"] = "https://app.interactiveai.com"
interactiveai = Interactive(
secret_key=os.getenv("INTERACTIVEAI_SECRET_KEY"),
public_key=os.getenv("INTERACTIVEAI_PUBLIC_KEY")
)
# Construct Basic Auth header for OTLP export
auth_string = base64.b64encode(
f"{os.environ['INTERACTIVEAI_PUBLIC_KEY']}:{os.environ['INTERACTIVEAI_SECRET_KEY']}".encode()
).decode()
# Configure OpenTelemetry exporter
os.environ["OTEL_EXPORTER_OTLP_ENDPOINT"] = os.environ["INTERACTIVEAI_HOST"] + "/api/public/otel"
os.environ["OTEL_EXPORTER_OTLP_HEADERS"] = f"Authorization=Basic {auth_string}"AWS Credentials
Creating an Instrumented Agent
Deployment and Invocation
Viewing Trace Data
Last updated
Was this helpful?

