# Connect LangChain to Microsoft Teams | Novu Connect

> Give your LangChain agent a voice in Microsoft Teams with Novu Connect.

Canonical: https://novu.co/channels/microsoft-teams/langchain/

Markdown: https://novu.co/channels/microsoft-teams/langchain.md

LangChain is the open-source framework for building agents and LLM apps in Python and JavaScript. Novu Connect gives it a voice in Microsoft Teams.

Novu Connect is the communication layer, the ACI, Agent Communication Infrastructure, bridge between your LangChain agent and Microsoft Teams. Your agent keeps running in your app. Novu delivers its messages to Microsoft Teams, maps each user, and forwards their replies back to your handler. We never run your agent's reasoning. That is the whole point.

Connect command: npx novu connect --channel teams --runtime langchain

## What is LangChain

LangChain gives developers the building blocks for agents: models, tools, memory, and control flow. You compose chains and agents, wire in your own tools, and keep the reasoning in your codebase. LangChain runs the agent. It does not carry the conversation to your users. That last mile, reaching a person in Slack and routing their reply back to your agent, is what Novu Connect adds.

- Tool calling and structured output for real agent actions
- Memory and retrieval for context across a conversation
- Runs in Python or JavaScript, in your own app
- A large ecosystem of integrations you already use

## How to connect LangChain to Microsoft Teams

1. Keep your LangChain agent: Your agent, tools, and memory stay in your codebase exactly as they are. Novu Connect wraps the input and output, so your LangChain logic does not change when you add Microsoft Teams.
2. Connect the channel: Run npx novu connect --channel teams --runtime langchain. The CLI scaffolds a bridge route in your app and connects Microsoft Teams. You can also paste the prompt below into your coding agent and let it wire the bridge for you.
3. Wire the bridge handler: The CLI prints a requirements file with the bridge route and handler. Point it at your LangChain agent so messages from Microsoft Teams reach your agent and its replies route back to the same conversation.
4. Go live: Sign in to keep the agent live, then run your dev server. Your LangChain agent now holds a two-way conversation in Microsoft Teams, and the same agent can reach every other channel from one thread.

Prompt for your coding agent: Connect this project's LangChain agent to Microsoft Teams with Novu using instructions from https://novu.co/agents.md

## LangChain and Microsoft Teams, common questions

### Do I have to rewrite my LangChain agent to add Microsoft Teams?

No. Novu Connect uses a custom-code bridge. Your LangChain agent keeps running in your app. Novu forwards messages from Microsoft Teams to your handler and routes replies back, so your agent code stays the same.

### Does Novu run my LangChain agent?

No. Novu Connect is the communication layer, the ACI, Agent Communication Infrastructure, bridge between your agent and Microsoft Teams. You own the reasoning and the tools. We never run your brain, that is the whole point.

### Is the conversation two-way, or just outbound messages?

Two-way. Novu Connect maps each Microsoft Teams user to your LangChain agent and forwards their replies back into the same conversation, with retries on delivery.

### How do I connect my AI agent to Microsoft Teams?

Connect Microsoft Teams from the Novu dashboard. Authenticate your workspace once, and Novu Connect handles the app, identity, and two-way routing so your agent code does not change.

### Can the agent do approvals and human handoffs in Teams?

Yes. Novu Connect renders native Adaptive Cards and approval prompts, and supports human handoff workflows so a person can step in when needed.
