LangChain adapter for Novu Connect
Connect a LangChain or LangGraph agent to Slack, Microsoft Teams, WhatsApp, Telegram, and email, with mapped conversation history and in-channel tool approval on the adapter-managed path.

- Contributors
The LangChain adapter is now available through @novu/framework/langchain. It gives teams already using LangChain or LangGraph a direct path to Novu Connect without rebuilding their agent for each communication channel.
Your agent or graph continues to run in your application. Novu Connect handles inbound channel events, conversation context, and delivery of the response back to the user.
For OpenAI:
For Anthropic:
This is not limited to just OpenAI and Anthropic, you can use other LangChain provider keys.
Return a config or invoke your own agent
The adapter supports two handoff patterns based on how much of your LangChain setup you want it to manage.
When you return a LangChainAgentConfig from onMessage, the adapter calls createAgent().invoke() in your application, maps ctx.history, and delivers the final assistant response:
If you already invoke a LangChain agent or LangGraph graph yourself, use toLangChainMessages(ctx.history), run your existing invoke() call, and return { messages }. Novu delivers the final assistant message. Tool approval is not managed by the adapter on this bring-your-own invocation path.
Ask for approval in the channel
On the config path, needsApproval lets you gate sensitive tools without building a separate approval flow for every channel. When the model calls a gated tool, Novu posts an Approve / Deny card and pauses the turn. After the user responds, the adapter replays the approval cycle from conversation history and continues the agent run.
This approval flow does not require a separate LangGraph checkpointer. The conversation history holds the information the adapter needs to resume the turn.
Get started with npx novu connect --runtime langchain, then follow the LangChain quickstart. See the LangChain reference for config returns, custom invocation, approval gating, Next.js setup, and error handling.