Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft Teams AI Library for Python
# Microsoft Teams SDK for Python

Microsoft Teams AI Library for Python is a comprehensive SDK for building Microsoft Teams applications, bots, and AI agents using Python. This is a monorepo with workspace structure containing core packages and test applications.
Microsoft Teams SDK for Python is a comprehensive SDK for building Microsoft Teams applications, bots, and AI agents using Python. This is a monorepo with workspace structure containing core packages and test applications.

**Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**

Expand All @@ -23,10 +23,10 @@ Microsoft Teams AI Library for Python is a comprehensive SDK for building Micros
```bash
# On Linux/Mac
source .venv/bin/activate

# On Windows
.venv\Scripts\Activate

# Alternative: Use uv run (no activation needed)
# Example: uv run pytest packages
```
Expand Down Expand Up @@ -89,15 +89,15 @@ Microsoft Teams AI Library for Python is a comprehensive SDK for building Micros
```bash
# These commands must pass:
ruff format --check # Format validation
ruff check # Linting validation
ruff check # Linting validation
pyright # Type checking validation
```

## Repository Structure and Navigation

### Core Packages (`/packages`)
- **microsoft-teams-apps**: Main application framework
- **microsoft-teams-ai**: AI integration functionality
- **microsoft-teams-ai**: AI integration functionality
- **microsoft-teams-api**: Teams API client
- **microsoft-teams-cards**: Adaptive cards support
- **microsoft-teams-common**: Shared utilities
Expand Down Expand Up @@ -153,7 +153,7 @@ The CI pipeline (`.github/workflows/ci.yml`) runs:

### Common Problems
- **Import errors**: Ensure virtual environment is activated (`source .venv/bin/activate`) or use `uv run` commands
- **UV not found**: Install with pip: `python -m pip install uv`
- **UV not found**: Install with pip: `python -m pip install uv`
- **Test failures**: Run `uv sync --all-packages --group dev` to update dependencies
- **Type errors**: Run `pyright` to catch type issues before CI
- **Format issues**: Run `ruff format` to auto-fix formatting
Expand All @@ -163,7 +163,7 @@ The CI pipeline (`.github/workflows/ci.yml`) runs:

- **NEVER CANCEL builds or tests** - Commands complete in 3-18 seconds but network delays may occur
- **ALWAYS use timeouts of 60+ seconds** for any UV or build commands
- **ALWAYS activate virtual environment or use uv run** before running Python commands
- **ALWAYS activate virtual environment or use uv run** before running Python commands
- **ALWAYS validate with a test app** after making changes to core packages
- **ALWAYS run pre-commit validation** (`poe check && pyright`) before committing
- **NEVER skip manual testing** - Automated tests don't cover integration scenarios
Expand All @@ -175,7 +175,7 @@ The CI pipeline (`.github/workflows/ci.yml`) runs:
.
├── .github/ # GitHub workflows and configs
├── packages/ # Core SDK packages
├── tests/ # Test applications
├── tests/ # Test applications
├── templates/ # Cookiecutter templates
├── scripts/ # Build and release scripts
├── pyproject.toml # Workspace and tool configuration
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please refer to this sub-module's root repo Contributing guide at [Teams AI v2 Contributing](https://github.com/microsoft/teams-ai/blob/v2-preview/CONTRIBUTING.md)
Please refer to this sub-module's root repo Contributing guide at [Teams SDK Contributing](https://github.com/microsoft/teams-ai/blob/main/CONTRIBUTING.md)
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams AI Library for Python
# Microsoft Teams SDK for Python

A comprehensive SDK for building Microsoft Teams applications, bots, and AI agents using Python. This SDK provides a high-level framework with built-in Microsoft Graph integration, OAuth handling, and extensible plugin architecture.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand All @@ -19,17 +19,20 @@ A comprehensive SDK for building Microsoft Teams applications, bots, and AI agen
### Prerequisites

- UV version is >= 0.8.11. Install and upgrade from [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/).
- Python version is >= 3.12. Install or upgrade from [python.org/downloads](https://www.python.org/downloads/).
- Python version is >= 3.12. Install or upgrade from [python.org/downloads](https://www.python.org/downloads/).

### Installation

#### 1. Install the dependencies.

```bash
uv sync --all-packages --group dev
```

#### 2. Activate the virtual env

> **Note:** After the initial setup, you need to activate the virtual environment each time you start a new terminal session

```bash
# On Mac
`source .venv/bin/activate`
Expand All @@ -39,6 +42,7 @@ A comprehensive SDK for building Microsoft Teams applications, bots, and AI agen
```

#### 3. Install the pre-commit hooks

```bash
pre-commit install
```
Expand Down Expand Up @@ -86,7 +90,7 @@ cookiecutter templates/test -o tests
> ⚠️ **WARNING** these apps are changed often and are not intended to be used outside the
> projects monorepo. To easily setup a new project please use the **templates** available via
> the [@microsoft/teams.cli](https://www.npmjs.com/package/@microsoft/teams.cli) and follow the
> [Getting Started](https://microsoft.github.io/teams-ai/python/getting-started) documentation!
> [Getting Started](https://microsoft.github.io/teams-sdk/python/getting-started) documentation!

- [`@tests/echo`](./tests/echo/README.md)
- [`@tests/message-extensions`](./tests/message-extensions/README.md)
Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project uses GitHub Issues to track bugs and feature requests. Please searc
issues before filing new issues to avoid duplicates. For new issues, file your bug or
feature request as a new Issue.

For help and questions about using this project, please join our [Teams AI Teams channel](https://teams.microsoft.com/l/channel/19%3A4PLRDRT5qVLpvXpfIHnoNohFElTC0aDzsNwfI0KHDxo1%40thread.tacv2/Support?groupId=1314f851-c930-4caa-b3e0-dbe9b8fe2737&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47)
For help and questions about using this project, please join our [Teams SDK Teams channel](https://teams.microsoft.com/l/channel/19%3A4PLRDRT5qVLpvXpfIHnoNohFElTC0aDzsNwfI0KHDxo1%40thread.tacv2/Support?groupId=1314f851-c930-4caa-b3e0-dbe9b8fe2737&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47)

## Microsoft Support Policy

Expand Down
2 changes: 1 addition & 1 deletion packages/a2aprotocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<img src="https://img.shields.io/pypi/dw/microsoft-teams-a2a" />
</a>
</p>
<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>
6 changes: 3 additions & 3 deletions packages/ai/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Microsoft Teams AI
# Microsoft Teams SDK

<p>
<a href="https://pypi.org/project/microsoft-teams-ai/" target="_blank">
Expand All @@ -11,6 +11,6 @@

AI tools and utilities.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>
</a>
2 changes: 1 addition & 1 deletion packages/ai/src/microsoft/teams/ai/ai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AIModel(Protocol):
Protocol defining the interface for AI models that can generate text responses.

This protocol standardizes how different AI providers (OpenAI, Azure OpenAI, etc.)
integrate with the Teams AI framework. Implementations should handle message
integrate with the Teams SDK. Implementations should handle message
processing, function calling, and optional streaming.
"""

Expand Down
5 changes: 2 additions & 3 deletions packages/api/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams API Client

Expand All @@ -15,11 +15,10 @@
Core API client library for Microsoft Teams Bot Framework integration.
Provides HTTP clients, authentication, and typed models for Teams Bot Framework APIs.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>


## Features

- **API Clients**: Bot, User, Conversation, Team, and Meeting clients
Expand Down
4 changes: 2 additions & 2 deletions packages/apps/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams Apps Framework

Expand All @@ -15,7 +15,7 @@
High-level framework for building Microsoft Teams applications.
Handles activity routing, authentication, and provides Microsoft Graph integration.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand Down
4 changes: 2 additions & 2 deletions packages/cards/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams Cards

Expand All @@ -15,7 +15,7 @@
Adaptive Cards models and specialized action types for Microsoft Teams applications.
Provides Pydantic-based models for creating Adaptive Cards and Teams-specific actions.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand Down
4 changes: 2 additions & 2 deletions packages/common/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams Common Utilities

Expand All @@ -15,7 +15,7 @@
Shared utilities including HTTP client, logging, storage, and event handling.
Provides common functionality used across other Teams SDK packages.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand Down
4 changes: 2 additions & 2 deletions packages/devtools/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases.

# Microsoft Teams DevTools

Expand All @@ -14,7 +14,7 @@

Developer tools for locally testing and debugging Teams applications. Streamlines the development process by eliminating the need to deploy apps or expose public endpoints during development.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand Down
6 changes: 3 additions & 3 deletions packages/graph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</a>
</p>

This package provides seamless access to Microsoft Graph APIs from Teams bots and agents built with the Microsoft Teams AI SDK for Python.
This package provides seamless access to Microsoft Graph APIs from Teams bots and agents built with the Microsoft Teams SDK for Python.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>

Expand All @@ -23,7 +23,7 @@ This package provides seamless access to Microsoft Graph APIs from Teams bots an

## Requirements

- Teams AI Library for Python
- Teams SDK for Python
- Microsoft Graph SDK for Python (msgraph-sdk)
- Azure Core library (azure-core)
- Microsoft Teams Common library (microsoft-teams-common)
Expand Down
4 changes: 2 additions & 2 deletions packages/mcpplugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "microsoft-teams-mcpplugin"
version = "2.0.0a4"
description = "library for handling mcp with teams ai library"
description = "library for handling mcp with teams sdk"
authors = [{ name = "Microsoft", email = "TeamsAISDKFeedback@microsoft.com" }]
readme = "README.md"
requires-python = ">=3.12"
Expand All @@ -13,7 +13,7 @@ dependencies = [
"microsoft-teams-common",
"fastmcp>=0.5.0",
"microsoft-teams-apps",
"microsoft-teams-ai"
"microsoft-teams-ai"
]

[tool.microsoft-teams.metadata]
Expand Down
8 changes: 4 additions & 4 deletions packages/mcpplugin/src/microsoft/teams/mcpplugin/ai_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

class McpClientPlugin(BaseAIPlugin):
"""
MCP Client Plugin for Teams AI integration.
MCP Client Plugin for Teams SDK integration.

Connects to MCP (Model Context Protocol) servers to dynamically fetch
and expose their tools as functions in the Teams AI framework.
and expose their tools as functions in the Teams SDK framework.
Supports caching, multiple servers, and automatic tool discovery.
"""

Expand Down Expand Up @@ -119,7 +119,7 @@ async def on_build_functions(self, functions: List[Function[BaseModel]]) -> List
Build functions from MCP tools.

Fetches tools from configured MCP servers and converts them to
Teams AI functions, adding them to the available function list.
Teams SDK functions, adding them to the available function list.

Args:
functions: Existing list of functions
Expand Down Expand Up @@ -197,7 +197,7 @@ def _create_function_from_tool(
self, url: str, tool: McpToolDetails, plugin_params: McpClientPluginParams
) -> Function[BaseModel]:
"""
Create a Teams AI function from an MCP tool.
Create a Teams SDK function from an MCP tool.

Args:
url: MCP server URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@


@Plugin(
name="mcp-server", version=version, description="MCP server plugin that exposes Teams AI functions as MCP tools"
name="mcp-server", version=version, description="MCP server plugin that exposes AI functions as MCP tools"
)
class McpServerPlugin(PluginBase):
"""
MCP Server Plugin for Teams Apps.

This plugin wraps FastMCP and provides a bridge between Teams AI Functions
This plugin wraps FastMCP and provides a bridge between AI Functions
and MCP tools, exposing them via streamable HTTP transport. It allows
Teams AI functions to be discovered and called by MCP clients.
AI functions to be discovered and called by MCP clients.
"""

# Dependency injection
Expand Down Expand Up @@ -70,7 +70,7 @@ def server(self) -> FastMCP:

def use_tool(self, function: Function[P]) -> "McpServerPlugin":
"""
Add a Teams AI function as an MCP tool.
Add a AIfunction as an MCP tool.

This a convenience wrapper on top of the underlying FastMCP's add_tool.
Use it like:
Expand All @@ -86,7 +86,7 @@ def my_fn_definition(arg1: int, arg2: str): bool
```

Args:
function: The Teams AI function to register as an MCP tool
function: The AI function to register as an MCP tool

Returns:
Self for method chaining
Expand All @@ -103,7 +103,7 @@ def my_fn_definition(arg1: int, arg2: str): bool
# Create wrapper handler that converts kwargs to the expected format
async def wrapped_handler(**kwargs: Any) -> Any:
"""
Wrapper that adapts Teams AI function calls to MCP format.
Wrapper that adapts AI function calls to MCP format.

Args:
**kwargs: Function arguments from MCP client
Expand Down Expand Up @@ -137,7 +137,7 @@ async def wrapped_handler(**kwargs: Any) -> Any:
)
self.mcp_server.add_tool(function_tool)

self.logger.debug(f"Registered Teams AI function '{function.name}' as MCP tool")
self.logger.debug(f"Registered AI function '{function.name}' as MCP tool")

return self
except Exception as e:
Expand Down
6 changes: 3 additions & 3 deletions packages/openai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</a>
</p>

OpenAI model implementations to be used with @microsoft-teams-ai. Supports all OpenAI-like API models.
OpenAI model implementations to be used with @microsoft-teams-ai package. Supports all OpenAI-like API models.

<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<img src="https://img.shields.io/pypi/dw/{{cookiecutter.pypi_package_name}}" />
</a>
</p>
<a href="https://microsoft.github.io/teams-ai" target="_blank">
<a href="https://microsoft.github.io/teams-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>
Loading