Traceability and Observability
Track, monitor, and debug all agent operations with built-in tracing and observability features.
Overview
Agent Kernel provides comprehensive observability capabilities through integration with popular tracing platforms. Monitor agent execution, debug issues, and gain insights into your AI agent systems.
Supported Platforms
Agent Kernel supports the following observability platforms:
- Langfuse - Open-source LLM engineering platform for tracing, evaluating, and monitoring AI applications
- OpenLLMetry (Traceloop) - OpenTelemetry-based observability for LLM applications with support for multiple backends
Getting Started with Langfuse
Installation
Install Agent Kernel with Langfuse support:
pip install agentkernel[langfuse]
Or if you need multiple framework integrations:
# OpenAI with Langfuse
pip install agentkernel[openai,langfuse]
# LangGraph with Langfuse
pip install agentkernel[langgraph,langfuse]
# CrewAI with Langfuse
pip install agentkernel[crewai,langfuse]
# Google ADK with Langfuse
pip install agentkernel[adk,langfuse]
Configuration
Method 1: Configuration File
Create or update config.yaml:
trace:
enabled: true
type: langfuse
Method 2: Environment Variables
export AK_TRACE__ENABLED=true
export AK_TRACE__TYPE=langfuse
With tracing enabled in config, all agent interactions will be automatically traced to Langfuse.
Langfuse Credentials
Configure Langfuse credentials via environment variables:
export LANGFUSE_PUBLIC_KEY=pk-lf-...
export LANGFUSE_SECRET_KEY=sk-lf-...
export LANGFUSE_HOST=https://cloud.langfuse.com # or your self-hosted instance
Or add them to your .env file:
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_HOST=https://cloud.langfuse.com
Getting Langfuse Credentials
- Sign up for a free account at https://cloud.langfuse.com
- Create a new project
- Navigate to Settings → API Keys
- Copy your Public Key and Secret Key
For self-hosted Langfuse, see the Langfuse documentation.
Getting Started with OpenLLMetry (Traceloop)
Installation
Install Agent Kernel with OpenLLMetry support:
pip install agentkernel[openllmetry]
Or if you need multiple framework integrations:
# OpenAI with OpenLLMetry
pip install agentkernel[openai,openllmetry]
# LangGraph with OpenLLMetry
pip install agentkernel[langgraph,openllmetry]
# CrewAI with OpenLLMetry
pip install agentkernel[crewai,openllmetry]
# Google ADK with OpenLLMetry
pip install agentkernel[adk,openllmetry]
Configuration
Method 1: Configuration File
Create or update config.yaml:
trace:
enabled: true
type: openllmetry
Method 2: Environment Variables
export AK_TRACE__ENABLED=true
export AK_TRACE__TYPE=openllmetry
OpenLLMetry Credentials
Configure Traceloop credentials via environment variables:
export TRACELOOP_API_KEY=your-api-key
# Optional: for self-hosted instances
export TRACELOOP_BASE_URL=https://api.traceloop.com
Or add them to your .env file:
TRACELOOP_API_KEY=your-api-key
TRACELOOP_BASE_URL=https://api.traceloop.com
Getting Traceloop Credentials
- Sign up for an account at https://www.traceloop.com
- Create a new project
- Navigate to Settings → API Keys
- Copy your API key
For self-hosted deployment or other backends (like Datadog, New Relic, Honeycomb), see the Traceloop documentation.
OpenLLMetry Features
OpenLLMetry provides:
- OpenTelemetry Standards: Industry-standard telemetry data
- Multiple Backends: Send traces to Traceloop, Datadog, New Relic, Honeycomb, and more
- Automatic Instrumentation: Zero-code instrumentation for popular LLM frameworks
- Performance Monitoring: Track latency, token usage, and costs
- Distributed Tracing: Follow requests across multiple services