LangChain/LangGraph
The Langchain integration enables to monitor your Langchain agents and chains with a single line of code.
Multiple langchain calls in a single thread
You can combine the Langchain callback handler with the concept of Thread to monitor multiple langchain calls in a single thread.
Adding tags, metadata or a Step ID
If you use LangChain’s built-in tags and metadata, they will be added to the Literal AI generations. Additionally, you can specify a Step ID to ensure a generation is logged with this Step ID.
LangGraph
LangGraph works similarly to LangChain when it comes to using the Literal AI callback handler.
Python
Check out this Python LangGraph example.
Typescript
Check out this Typescript LangGraph example.
Link a Literal AI Prompt to a LangChain/LangGraph Run
The Literal AI SDK will not only log the generations but also track which prompt versions were used to generate them.
This is especially useful to track the performance of your prompt versions and debug in context.
Was this page helpful?