plugin that enables your teams agent to be used as an a2a agent
Project description
Microsoft Teams A2A
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
pip install microsoft-teams-a2a
Or if using uv:
uv add microsoft-teams-a2a
Usage
A2A Server (Expose Agent)
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)
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])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microsoft_teams_a2a-2.0.0a58.tar.gz.
File metadata
- Download URL: microsoft_teams_a2a-2.0.0a58.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f9e3619ea1ec0a7fda43006db071227b0afa470aa112177273135ffe4a9690b
|
|
| MD5 |
fd91be578860f8bbdedd8a6d00df9252
|
|
| BLAKE2b-256 |
0124de91b83b54e0211ef4a22ae29340201f5be0aa35b77d99c76c2ce9497c21
|
File details
Details for the file microsoft_teams_a2a-2.0.0a58-py3-none-any.whl.
File metadata
- Download URL: microsoft_teams_a2a-2.0.0a58-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: RestSharp/106.13.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7771af22fd00f84cdc280909ed1d728423394d825fc8cd0506f724fda439287f
|
|
| MD5 |
aa8ec339178d599a731b83b4b341ff40
|
|
| BLAKE2b-256 |
c8c4978c0bd9373a851575b170afc8bffe15bc0497a11421da1cb844b4f7f9e9
|