[Docs] Add LangGraph integration examples to JS/TS documentation #7709
cgx-avenue
started this conversation in
Ideas
Replies: 5 comments 1 reply
|
Hi @cgx-avenue, thanks for adding this. We have this on our project roadmap, and we'll add an example notebook soon. |
0 replies
0 replies
|
Following |
0 replies
|
Make sure to install necessary libraries as shown in the documentation. Then add the following imports: import { NodeSDK } from "@opentelemetry/sdk-node";
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { CallbackHandler } from "@langfuse/langchain";
import { CustomConfigService } from "../../config/custom.config.service";Next, initialize the OpenTelemetry SDK with the Langfuse span processor and start it, then create the handler: sdk = new NodeSDK({
spanProcessors: [new LangfuseSpanProcessor()],
});
sdk.start();
handler = new CallbackHandler();Then include the handler in your graph's config object alongside any other details: const config = {
// other config details
callbacks: [handler],
};Finally, pass the config when invoking the graph. In this case using graph.stream(<YOUR_INPUT>, config);langchain documentation for reference (switch to type script references in it): https://langfuse.com/integrations/frameworks/langchain |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Describe the feature or potential improvement
Currently, the Langfuse JS/TS documentation lacks guidance on integrating with LangGraph. Given LangGraph's growing adoption for building stateful, multi-actor LLM applications, this gap makes it challenging for developers to monitor LangGraph-based workflows with Langfuse.
Suggested Improvement:
Add a new section under "Integrations" (e.g., docs/integrations/langgraph.md)
Include:
Reference existing Python LangGraph example for consistency.
Why this matters:
LangGraph users need standardized observability
Besides, now Python SDK has v3 version as OTEL-based, do you have a roadmap for JS/TS SDK to be OTEL-based as well?
Thanks!
Additional information
No response
All reactions