Langchain visualizer logo

Langchain visualizer

Free

visualization and debugging tool for LangChain workflows ![GitHub Repo stars](https://img.shields.io/github/stars/amosjyng/langchain-visualizer?style=social)

FreeFree tier
Type
Open Source

About Langchain visualizer

LangChain Visualizer is an open-source Python library that adapts Ought's ICE visualizer for LangChain, providing a beautiful and interactive UI for debugging and inspecting LangChain workflows. It displays full prompt text for each LLM interaction, color-codes hardcoded versus templated prompt parts, shows execution flow with stack traces, and tracks costs for OpenAI's text-davinci-003 model. Supports Jupyter notebooks via a separate import and can visualize embeddings chunking. Ideal for developers and researchers building LangChain agents or chains who need a clear, real-time view of their pipeline's behavior.

Key Features

Adapts Ought's ICE visualizer for LangChain with a beautiful UI
Displays full prompt text for every LLM interaction
Color-codes hardcoded vs. templated substitution parts of prompts
Inspects execution flow and observes function stack traces
Tracks costs of each LLM call and total run (OpenAI text-davinci-003)
Jupyter notebook support via langchain_visualizer.jupyter
Visualizes embeddings chunking with visualize_embeddings()

Pros & Cons

Pros
  • Intuitive visual debugging for LangChain workflows
  • Clear prompt highlighting helps identify template vs. static content
  • Real-time execution visualization shows agent steps as they happen
  • Supports Jupyter notebooks for interactive development
  • Free and open source with a simple pip install
Cons
  • Requires Python environment with specific dependencies (libyaml on Linux)
  • Only works with LangChain workflows, not general-purpose
  • Cost tracking limited to OpenAI text-davinci-003 model
  • May introduce performance overhead on complex chains

Best For

Debugging and inspecting LangChain agent executions in real-timeMonitoring prompt composition and LLM call costs during developmentTeaching or demonstrating LangChain workflows with visual aids

FAQ

Why use this instead of LangChain's built-in tracer?
The developer prefers the ICE UI for its colored highlighting of filled-in template variables and the ability to quickly inspect different LLM calls without leaving the trace page.
How can I use LangChain Visualizer in a Jupyter notebook?
Import the visualize function from langchain_visualizer.jupyter instead of the standard langchain_visualizer. See the demo notebook for an example.