Skip to main content
Langflow integration with Openlayer Langflow is a visual framework for building multi-agent and RAG applications. Openlayer’s native integration with Langflow enables automatic tracing and monitoring of your Langflow workflows, providing real-time observability, performance tracking, and quality evaluation. The integration captures comprehensive trace data including LLM calls, tool executions, agent reasoning steps, retrieval operations, and full execution hierarchies.

Benefits

The Openlayer integration for Langflow provides:
  • Automatic tracing - No code changes required; traces are captured automatically when you run your flows
  • Real-time monitoring - Track performance, latency, and costs across different flows
  • Quality evaluation - Run tests on production traces to ensure your flows meet quality standards
  • Debugging - Detailed trace hierarchies help identify issues in complex multi-step workflows
  • Multi-flow support - Configure different inference pipelines for different flows or environments

Prerequisites

Before you begin, you need:
  1. Openlayer account - Sign up at openlayer.com
  2. Openlayer project - Create a project in your Openlayer dashboard
  3. Openlayer API key - Get your API key from Settings → API Keys
  4. Inference pipeline(s) - Create one or more inference pipelines in your Openlayer project for LLM monitoring
  5. Openlayer Python SDK - Install with pip install openlayer

Quick start

Step 1: Set environment variables

At minimum, you need to set your Openlayer API key and a default inference pipeline ID:

Step 2: Run Langflow

Step 3: Execute your flow

When you run any flow in Langflow, traces will automatically be sent to Openlayer.

Step 4: View traces in Openlayer

  1. Navigate to your Openlayer project → Inference Pipeline
  2. See your traces appear in real-time with detailed execution information

Configuration

Environment variables

The integration uses environment variables for configuration: *Required unless using flow-specific configuration

Single flow configuration

If you have one flow or want all flows to use the same pipeline:

Multiple flows with flow-specific variables

For multiple flows with explicit control over each one:

Flow name mapping

Flow names in Langflow are automatically converted to environment variable names:
  1. Convert to uppercase
  2. Replace spaces and special characters with underscores
  3. Add OPENLAYER_PIPELINE_ prefix
Examples:

Multiple flows with JSON mapping

For centralized configuration of many flows:
Flow names in the JSON mapping must match exactly (case-sensitive, including spaces) with your flow names in Langflow.

Configuration priority

When a flow runs, the system checks for pipeline IDs in this order:
  1. OPENLAYER_PIPELINE_<FLOW_NAME> (highest priority)
  2. OPENLAYER_LANGFLOW_MAPPING
  3. OPENLAYER_INFERENCE_PIPELINE_ID (fallback)