Skip to main content
LangChain is a popular framework for developing applications powered by language models. It provides a standard interface for chains, integrations with other tools, and end-to-end chains for common applications. This guide demonstrates how to integrate Maxim’s observability capabilities with LangChain applications, allowing you to:
  1. Track LLM interactions - Monitor all calls to language models
  2. Analyze performance - Measure latency, token usage, and costs
  3. Debug chains - Visualize the flow of information through your LangChain applications
  4. Evaluate outputs - Assess the quality of responses from your LLM chains
The integration is simple and requires minimal changes to your existing LangChain code.

Requirements

Env variables

Initialize logger

Initialize MaximLangchainTracer

Make LLM calls using MaximLangchainTracer

Langchain Gif

Streaming example