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
64 changes: 61 additions & 3 deletions packages/a2aprotocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,65 @@
<a href="https://pypi.org/project/microsoft-teams-a2a" target="_blank">
<img src="https://img.shields.io/pypi/dw/microsoft-teams-a2a" />
</a>
<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>
</p>
<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>

Agent-to-Agent (A2A) protocol support for Microsoft Teams AI applications.
Enables Teams agents to communicate and collaborate with other AI agents using standardized protocols.

## Installation

```bash
uv add microsoft-teams-a2a
```

## Usage

### A2A Server (Expose Agent)

```python
from microsoft.teams.apps import App
from microsoft.teams.a2a import A2APlugin, A2APluginOptions
from a2a.types import AgentCard, AgentCapabilities

app = App()

# Define agent card with capabilities
agent_card = AgentCard(
name="weather_agent",
description="An agent that can tell you the weather",
url="http://localhost:4000/a2a/",
version="0.0.1",
protocol_version="0.3.0",
capabilities=AgentCapabilities(),
default_input_modes=[],
default_output_modes=[]
)

a2a_server = A2APlugin(A2APluginOptions(agent_card=agent_card))
app = App(plugins=[a2a_server])
```

### A2A Client (Use Other Agents)

```python
from microsoft.teams.a2a import A2AClientPlugin, A2APluginUseParams
from microsoft.teams.ai import ChatPrompt
from microsoft.teams.openai import OpenAICompletionsAIModel

model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")

# Connect to another A2A agent
a2a_client = A2AClientPlugin()
a2a_client.on_use_plugin(
A2APluginUseParams(
key="my-weather-agent",
base_url="http://localhost:4000/a2a",
card_url=".well-known/agent-card.json"
)
)

prompt = ChatPrompt(model, plugins=[a2a_client])
```
55 changes: 51 additions & 4 deletions packages/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,57 @@
<a href="https://pypi.org/project/microsoft-teams-ai/" target="_blank">
<img src="https://img.shields.io/pypi/dw/microsoft-teams-ai" />
</a>
<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>
</p>

AI tools and utilities.
AI-powered conversational experiences for Microsoft Teams applications.
Provides prompt management, action planning, and model integration for building intelligent Teams bots.

[📖 Documentation](https://microsoft.github.io/teams-sdk/python/in-depth-guides/ai/)

## Installation

```bash
uv add microsoft-teams-ai
```

## Usage

### ChatPrompt

```python
from microsoft.teams.ai import ChatPrompt, Function
from microsoft.teams.openai import OpenAICompletionsAIModel
from pydantic import BaseModel

model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")

# Create a ChatPrompt
prompt = ChatPrompt(model)

result = await prompt.send(
input="Hello!",
instructions="You are a helpful assistant."
)
```

### Function Calling

```python
class GetWeatherParams(BaseModel):
location: str

async def get_weather(params: GetWeatherParams) -> str:
return f"The weather in {params.location} is sunny"

weather_function = Function(
name="get_weather",
description="Get weather for a location",
parameter_schema=GetWeatherParams,
handler=get_weather
)

<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>
prompt = ChatPrompt(model, functions=[weather_function])
```
27 changes: 21 additions & 6 deletions packages/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,30 @@
<a href="https://pypi.org/project/microsoft-teams-devtools" target="_blank">
<img src="https://img.shields.io/pypi/dw/microsoft-teams-devtools" />
</a>
<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>
</p>

[📖 Documentation](https://microsoft.github.io/teams-sdk/developer-tools/devtools/)

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-sdk" target="_blank">
<img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>
## Installation

```bash
uv add microsoft-teams-devtools
```

## Usage

```python
from microsoft.teams.apps import App
from microsoft.teams.devtools import DevToolsPlugin

## Features
app = App()
app.use(DevToolsPlugin())

- **Local Testing**: Test Teams apps locally without deployment
- **Bot Emulator**: Simulate Teams conversations and interactions
await app.start()
# Open http://localhost:3979/devtools in your browser
```
73 changes: 73 additions & 0 deletions packages/mcpplugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Microsoft Teams MCP Plugin

<p>
<a href="https://pypi.org/project/microsoft-teams-mcpplugin/" target="_blank">
<img src="https://img.shields.io/pypi/v/microsoft-teams-mcpplugin" />
</a>
<a href="https://pypi.org/project/microsoft-teams-mcpplugin/" target="_blank">
<img src="https://img.shields.io/pypi/dw/microsoft-teams-mcpplugin" />
</a>
</p>

Model Context Protocol (MCP) integration for Microsoft Teams AI applications.
Enables Teams bots to both expose tools as MCP servers and use MCP servers as clients.

[📖 Documentation](https://microsoft.github.io/teams-sdk/python/in-depth-guides/ai/mcp/)

## Installation

```bash
uv add microsoft-teams-mcpplugin
```

## Usage

### MCP Client (Use MCP Servers)

```python
from microsoft.teams.apps import App
from microsoft.teams.mcpplugin import McpClientPlugin
from microsoft.teams.ai import ChatPrompt
from microsoft.teams.openai import OpenAICompletionsAIModel

# Create MCP client plugin
mcp_client = McpClientPlugin()

# Connect to MCP servers
mcp_client.use_mcp_server("https://example.com/mcp")

# Use with ChatPrompt
model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")
prompt = ChatPrompt(model, plugins=[mcp_client])
```

### MCP Server (Expose Tools)

```python
from microsoft.teams.apps import App
from microsoft.teams.mcpplugin import McpServerPlugin
from microsoft.teams.ai import Function
from pydantic import BaseModel

# Create MCP server plugin
mcp_server = McpServerPlugin(name="my-mcp-server")

# Define a tool
class EchoParams(BaseModel):
input: str

async def echo_handler(params: EchoParams) -> str:
return f"You said {params.input}"

# Register tool with MCP server
mcp_server.use_tool(
Function(
name="echo",
description="Echo back whatever you said",
parameter_schema=EchoParams,
handler=echo_handler
)
)

app = App(plugins=[mcp_server])
```
25 changes: 21 additions & 4 deletions packages/openai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,27 @@
<a href="https://pypi.org/project/microsoft-teams-openai" target="_blank">
<img src="https://img.shields.io/pypi/dw/microsoft-teams-openai" />
</a>
<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>
</p>

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

<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>
OpenAI model implementations for Microsoft Teams AI applications.
Supports OpenAI and OpenAI-compatible APIs for chat completions and embeddings.

## Installation

```bash
uv add microsoft-teams-openai
```

## Usage

```python
from microsoft.teams.openai import OpenAICompletionsAIModel
from microsoft.teams.ai import ChatPrompt

model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")
prompt = ChatPrompt(model)
```