Many interactions with LLM applications span multiple traces.
Sessions in Langfuse are a way to group these traces together and see a simple session replay of the entire interaction. Get started by adding a
sessionId when creating a trace.
sessionId when creating/updating a trace. This can be any string that you use to identify the session. All traces with the same
sessionId will be grouped together.
from langfuse import Langfuse
langfuse = Langfuse()
trace = langfuse.trace(
Try this feature using the public example project.
Example session spanning multiple traces
- Publish a session to share with others as a public link
- Bookmark a session to easily find it later
- Manually evaluate sessions by adding
scoresfrom the Langfuse UI