Pull LangFlow Repo
If you haven’t already, navigate to the LangFlow GitHub repo and pull the project down:GitHub - langflow-ai/langflow: ⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, model and vector store agnostic.
GitHub
Create .env file for Arize AX Integration
Inside your cloned LangFlow repository, create or update the.env file. LangFlow uses this file to configure its OpenTelemetry exports.
You can use the .env.example file in the LangFlow repository as a template.
Add the following environment variables to your .env file to send traces to Arize AX:
-
Replace
YOUR_ARIZE_SPACE_IDandYOUR_ARIZE_API_KEYwith your actual Arize AX Space ID and API Key, found in your Arize account settings. -
LangFlow will also need API keys for any LLMs or tools you use within your flows (e.g.,
OPENAI_API_KEY). Ensure these are also present in the.envfile or otherwise configured in your LangFlow environment.
https://otlp.arize.com/v1).
Start Docker Desktop & LangFlow
- Start Docker Desktop.
- Navigate to your LangFlow directory in the terminal.
- Build the images and run the container. This might take around 10 minutes the first time.
Go to Hosted LangFlow UI
Once the Docker container is running, access your local LangFlow UI, usually at:http://localhost:3000/
localhost
Create and Run a Flow
- Design or open a flow in LangFlow. For example, you can use a “Simple Agent” or any other flow that involves LLM calls.
-
Ensure any components requiring API keys (like an OpenAI node) are configured correctly (either via the UI or by ensuring LangFlow can access the keys from the
.envfile). - Go into the Playground section for your flow and run it by sending a message or triggering its execution.
View Traces in Arize AX
After your LangFlow application runs, navigate to your Arize AX account:https://app.arize.com/
app.arize.com
Inspecting Traces
In Arize AX, you should see traces from your LangFlow application. LangFlow, being built on LangChain, may produce traces that look similar to LangChain traces (e.g., “AgentExecutor” traces if you are using LangChain agents within LangFlow). LangFlow itself might also produce its own native trace spans.- **AgentExecutor Trace (or similar):*- These represent the LangChain operations occurring within your LangFlow components, captured via the underlying LangChain instrumentation that LangFlow utilizes.
- **Native LangFlow Tracing:*- LangFlow might also generate its own spans representing the execution of its components or the overall flow.