The Teams AI Library empowers developers to build agents for Microsoft Teams to support individuals and teams with their daily work – from answering questions, automating tasks, to connecting people with information. The library already has over 100,000 monthly downloads. Today, we’re thrilled to introduce the new and improved Teams AI Library, designed to help developers create even more powerful agents for Teams up to 90% faster.
Inspired by your feedback and built for joy
We believe coding should be fun, not a chore. You told us where the friction was, so we streamlined the experience to bring speed, clarity, and a bit of delight back to your editor.
import { App } from '@microsoft/teams.apps';
const app = new App();
app.on('message', async ({ api, isSignedIn, send, signin }) => {
if (!isSignedIn) {
await signin(); // initiates Entra login flow
}
const me = await api.user.me.get(); // Get user profile from Graph
await send(`Hello, ${me.displayName}!`); // Send a message response
});
This updated Teams AI Library provides a simplified developer experience with a streamlined SDK. This allows developers to focus on creating innovative solutions and addressing user-specific needs rather than spending time on repetitive coding tasks. Start building Teams agents in minutes with our quick‑start guide.
This update also introduces the advanced agent orchestration capabilities of Model Context Protocol (MCP), which allows agents to effortlessly share memory and tools via a common interface. MCP opens the door to complex multi-agent workflows, making your agents more versatile and capable than ever before.
Together, these enhancements make it easier for developers to design intelligent agents that integrate seamlessly into the Teams environment and elevate productivity. Read on for more details and resources to get started.
Simplified tools to build agents for Teams more efficiently
The updated Teams AI Library transforms the development process, providing a streamlined and intuitive platform that simplifies building smart, collaborative agents for Teams. Unlike generic bot frameworks, the enhanced Teams AI library leverages Teams’ deep collaboration features, treating your agent as a full-fledged team member inside the flow of work. Updates include:
- One library for all Teams capabilities: Developers no longer need to worry about managing multiple SDKs. This new library consolidates all the SDKs needed to create collaborative, intelligent agents for Teams such as Botbuilder, Microsoft Graph, Adaptive Cards and Client—all designed to work out-of-the-box.
- Reduced boilerplate code: The library reduces boilerplate code by 70-90%, making it easier to build sophisticated Teams agents in minutes, not weeks. This frees you to spend time on your bot’s unique logic or content, rather than wiring up Teams-specific details. The end result is not only faster development, but also cleaner, more maintainable code.
- Seamless adaptive cards for rich UX: Adaptive cards are a flexible, cross-platform UI framework for embedding visual content and user controls into conversations. This update makes it easy to generate and send adaptive cards, allowing your agent’s responses to include tables, charts, buttons, and inputs—all beautifully formatted within the Teams chat interface. By embracing adaptive cards, agents built on the new library deliver far more engaging and productive interactions than plain-text bots. A new developer resource for adaptive cards is available now.
Model Context Protocol for building smarter agents
The updated Teams AI Library isn’t just about simplicity – it also brings the latest and greatest AI innovations right into the SDK, giving your agents capabilities that are on the frontier of what’s possible. Most notably, the Teams AI Library now supports Model Context Protocol (MCP). MCP can drastically enhance the abilities of the agents you build, enabling agents to leverage external AI services and vastly expand their skill/action set. These complex workflows can help stream your work and lighten the load for you and your teammates. This vendor-neutral protocol lets AI agents share memory and tools over a common interface, enabling complex multi-agent workflows. You can now create an agent that uses MCP servers. Connect your agent with our MCP server guide.
const prompt = new ChatPrompt(
{
instructions: 'You are a helpful assistant. You MUST use tool calls to do all your work.',
model: new OpenAIChatModel({
model: 'gpt-4o-mini',
apiKey: process.env.OPENAI_API_KEY,
}),
},
// Tell the prompt that the plugin needs to be used
// Here you may also pass in additional configurations such as
// a tool-cache, which can be used to limit the tools that are used
// or improve performance
[new McpClientPlugin()]
)
// Here we are saying you can use any tool from localhost:3000/mcp
// (that is the URL for the server we built using the mcp plugin)
.usePlugin('mcpClient', { url: 'http://localhost:3000/mcp' })
// Alternatively, you can use a different server hosted somewhere else
// Here we are using the mcp server hosted on an Azure Function
.usePlugin('mcpClient', {
url: 'https://pokemonmcp.azurewebsites.net/runtime/webhooks/mcp/sse',
params: {
headers: {
// If your server requires authentication, you can pass in Bearer or other
// authentication headers here
'x-functions-key': process.env.AZURE_FUNCTION_KEY!,
},
},
});
Goodcall, one of Microsoft’s partners, has already experienced enhanced efficiency with the updated Teams AI library. They remarked that the initial setup process was streamlined, allowing developers to start working with the tools quickly. Join in on the action and get started with the Teams AI Library today!
Get started
The updated Teams AI Library represents a significant improvement in empowering developers to build intelligent, integrated agents for Teams. Whether you’re a seasoned Teams developer or completely new to the ecosystem, now is the perfect time to dive in and start building your own agent.
- Follow the Quick Start guide: Using the latest Teams Toolkit in Visual Studio Code, you can create a new Teams AI agent in minutes, and our documentation will guide you through it step by step.
- Join the Community: We’re building this for and with a community of developers. Join the discussions in the Microsoft 365 Developer Forum, share your agent ideas or ask questions on Stack Overflow, and follow our updates on the Teams developer blog. Your feedback will help shape future releases—please report any issues you may experience here.
With AI at your fingertips and Teams as your canvas, what will you create? Happy coding!
When will python version come out???? Do you have est. time? Many thanks!
I love this, but for those getting started can you please show for instance how I can reuse existing MCP servers that I have been using today from lets say VS Code or Claude Desktop and make those same available using this new library in Teams? I would love to showcase this
Does this need additional license to develop? How about for end users (aside from Teams)?
It doesn’t require any additional license to develop. Same for the end users, as long as they are on Teams.