microsoft-agents-activity 0.5.0.dev3__py3-none-any.whl → 0.5.0.dev7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of microsoft-agents-activity might be problematic. Click here for more details.

@@ -13,7 +13,7 @@ class SemanticAction(AgentsModel):
13
13
  :param entities: Entities associated with this action
14
14
  :type entities: dict[str, :class:`microsoft_agents.activity.entity.Entity`]
15
15
  :param state: State of this action. Allowed values: `start`, `continue`, `done`
16
- :type state: str or :class:`microsoft_agents.activity.semantic_action_states.SemanticActionStates`
16
+ :type state: str or :class:`microsoft_agents.activity.semantic_actions_states.SemanticActionsStates`
17
17
  """
18
18
 
19
19
  id: NonEmptyString
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-agents-activity
3
+ Version: 0.5.0.dev7
4
+ Summary: A protocol library for Microsoft Agents
5
+ Author: Microsoft Corporation
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/microsoft/Agents
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: pydantic>=2.10.4
14
+ Dynamic: license-file
15
+
16
+ # Microsoft Agents Activity
17
+
18
+ [![PyPI version](https://img.shields.io/pypi/v/microsoft-agents-activity)](https://pypi.org/project/microsoft-agents-activity/)
19
+
20
+ Core types and schemas for building conversational AI agents that work across Microsoft 365 platforms like Teams, Copilot Studio, and Webchat.
21
+
22
+ # What is this?
23
+
24
+ This library is part of the **Microsoft 365 Agents SDK for Python** - a comprehensive framework for building enterprise-grade conversational AI agents. The SDK enables developers to create intelligent agents that work across multiple platforms including Microsoft Teams, M365 Copilot, Copilot Studio, and web chat, with support for third-party integrations like Slack, Facebook Messenger, and Twilio.
25
+
26
+ ## Packages Overview
27
+
28
+ We offer the following PyPI packages to create conversational experiences based on Agents:
29
+
30
+ | Package Name | PyPI Version | Description |
31
+ |--------------|-------------|-------------|
32
+ | `microsoft-agents-activity` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-activity)](https://pypi.org/project/microsoft-agents-activity/) | Types and validators implementing the Activity protocol spec. |
33
+ | `microsoft-agents-hosting-core` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-hosting-core)](https://pypi.org/project/microsoft-agents-hosting-core/) | Core library for Microsoft Agents hosting. |
34
+ | `microsoft-agents-hosting-aiohttp` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-hosting-aiohttp)](https://pypi.org/project/microsoft-agents-hosting-aiohttp/) | Configures aiohttp to run the Agent. |
35
+ | `microsoft-agents-hosting-teams` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-hosting-teams)](https://pypi.org/project/microsoft-agents-hosting-teams/) | Provides classes to host an Agent for Teams. |
36
+ | `microsoft-agents-storage-blob` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-storage-blob)](https://pypi.org/project/microsoft-agents-storage-blob/) | Extension to use Azure Blob as storage. |
37
+ | `microsoft-agents-storage-cosmos` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-storage-cosmos)](https://pypi.org/project/microsoft-agents-storage-cosmos/) | Extension to use CosmosDB as storage. |
38
+ | `microsoft-agents-authentication-msal` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-authentication-msal)](https://pypi.org/project/microsoft-agents-authentication-msal/) | MSAL-based authentication for Microsoft Agents. |
39
+
40
+ Additionally we provide a Copilot Studio Client, to interact with Agents created in CopilotStudio:
41
+
42
+ | Package Name | PyPI Version | Description |
43
+ |--------------|-------------|-------------|
44
+ | `microsoft-agents-copilotstudio-client` | [![PyPI](https://img.shields.io/pypi/v/microsoft-agents-copilotstudio-client)](https://pypi.org/project/microsoft-agents-copilotstudio-client/) | Direct to Engine client to interact with Agents created in CopilotStudio |
45
+
46
+ ## Architecture
47
+
48
+ The SDK follows a modular architecture:
49
+ - **Activity Layer**: Protocol definitions for cross-platform messaging
50
+ - **Hosting Layer**: Core agent lifecycle, middleware, and web hosting
51
+ - **Storage Layer**: Persistent state management with Azure backends
52
+ - **Authentication Layer**: Secure identity and token management
53
+ - **Integration Layer**: Platform-specific adapters (Teams, Copilot Studio)
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install microsoft-agents-activity
59
+ ```
60
+
61
+ ## Quick Start
62
+ Code below taken from the [Quick Start](https://github.com/microsoft/Agents/tree/main/samples/python/quickstart) sample.
63
+ ```python
64
+ @AGENT_APP.conversation_update("membersAdded")
65
+ async def on_members_added(context: TurnContext, _state: TurnState):
66
+ await context.send_activity(
67
+ "Welcome to the empty agent! "
68
+ "This agent is designed to be a starting point for your own agent development."
69
+ )
70
+ return True
71
+
72
+
73
+ @AGENT_APP.message(re.compile(r"^hello$"))
74
+ async def on_hello(context: TurnContext, _state: TurnState):
75
+ await context.send_activity("Hello!")
76
+
77
+
78
+ @AGENT_APP.activity("message")
79
+ async def on_message(context: TurnContext, _state: TurnState):
80
+ await context.send_activity(f"you said: {context.activity.text}")
81
+ ```
82
+
83
+ ## Common Use Cases
84
+
85
+ ### Rich Messages with Cards
86
+ Code below taken from the [Cards](https://github.com/microsoft/Agents/tree/main/samples/python/cards) sample.
87
+
88
+
89
+ ```python
90
+ @staticmethod
91
+ async def send_animation_card(context: TurnContext):
92
+ card = CardFactory.animation_card(
93
+ AnimationCard(
94
+ title="Microsoft Agents Framework",
95
+ image=ThumbnailUrl(
96
+ url="https://i.giphy.com/Ki55RUbOV5njy.gif", alt="Cute Robot"
97
+ ),
98
+ media=[MediaUrl(url="https://i.giphy.com/Ki55RUbOV5njy.gif")],
99
+ subtitle="Animation Card",
100
+ text="This is an example of an animation card using a gif.",
101
+ aspect="16:9",
102
+ duration="PT2M",
103
+ )
104
+ )
105
+ await CardMessages.send_activity(context, card)
106
+
107
+ @staticmethod
108
+ async def send_activity(context: TurnContext, card: Attachment):
109
+ activity = Activity(type=ActivityTypes.message, attachments=[card])
110
+ await context.send_activity(activity)
111
+ ```
112
+
113
+ ## Activity Types
114
+
115
+ The library supports different types of communication:
116
+
117
+ - **Message** - Regular chat messages with text, cards, attachments
118
+ - **Typing** - Show typing indicators
119
+ - **ConversationUpdate** - People joining/leaving chats
120
+ - **Event** - Custom events and notifications
121
+ - **Invoke** - Direct function calls
122
+ - **EndOfConversation** - End chat sessions
123
+
124
+ ## Key Features
125
+
126
+ ✅ **Type-safe** - Built with Pydantic for automatic validation
127
+ ✅ **Rich content** - Support for cards, images, videos, and interactive elements
128
+ ✅ **Teams ready** - Full Microsoft Teams integration
129
+ ✅ **Cross-platform** - Works across all Microsoft 365 chat platforms
130
+ ✅ **Migration friendly** - Easy upgrade from Bot Framework
131
+
132
+ # Quick Links
133
+
134
+ - 📦 [All SDK Packages on PyPI](https://pypi.org/search/?q=microsoft-agents)
135
+ - 📖 [Complete Documentation](https://aka.ms/agents)
136
+ - 💡 [Python Samples Repository](https://github.com/microsoft/Agents/tree/main/samples/python)
137
+ - 🐛 [Report Issues](https://github.com/microsoft/Agents-for-python/issues)
138
+
139
+ # Sample Applications
140
+ Explore working examples in the [Python samples repository](https://github.com/microsoft/Agents/tree/main/samples/python):
141
+
142
+ |Name|Description|README|
143
+ |----|----|----|
144
+ |Quickstart|Simplest agent|[Quickstart](https://github.com/microsoft/Agents/blob/main/samples/python/quickstart/README.md)|
145
+ |Auto Sign In|Simple OAuth agent using Graph and GitHub|[auto-signin](https://github.com/microsoft/Agents/blob/main/samples/python/auto-signin/README.md)|
146
+ |OBO Authorization|OBO flow to access a Copilot Studio Agent|[obo-authorization](https://github.com/microsoft/Agents/blob/main/samples/python/obo-authorization/README.md)|
147
+ |Semantic Kernel Integration|A weather agent built with Semantic Kernel|[semantic-kernel-multiturn](https://github.com/microsoft/Agents/blob/main/samples/python/semantic-kernel-multiturn/README.md)|
148
+ |Streaming Agent|Streams OpenAI responses|[azure-ai-streaming](https://github.com/microsoft/Agents/blob/main/samples/python/azureai-streaming/README.md)|
149
+ |Copilot Studio Client|Console app to consume a Copilot Studio Agent|[copilotstudio-client](https://github.com/microsoft/Agents/blob/main/samples/python/copilotstudio-client/README.md)|
150
+ |Cards Agent|Agent that uses rich cards to enhance conversation design |[cards](https://github.com/microsoft/Agents/blob/main/samples/python/cards/README.md)|
@@ -56,7 +56,7 @@ microsoft_agents/activity/receipt_card.py,sha256=tHoG7Lzpr82o2WhP2oBcZyy_-uidOdv
56
56
  microsoft_agents/activity/receipt_item.py,sha256=t2JyzseVHE97EzalICJLfjBb4kTqqzwpHkV8oRZLOUg,1202
57
57
  microsoft_agents/activity/resource_response.py,sha256=Ft3SHgpkRSIqRoIGtXhuMB4UrI-CIoJscM0d8OKWpCs,350
58
58
  microsoft_agents/activity/role_types.py,sha256=DH39jBc-xjB_y0vCOvROtujIBOi9DTZf1ABtELrzZZQ,280
59
- microsoft_agents/activity/semantic_action.py,sha256=cXfsqoD9FD5pzcoFCAYVBdxdjVzbhRnAbeXkPWS6wag,736
59
+ microsoft_agents/activity/semantic_action.py,sha256=A4ek2zMvBHzNpuKymSmH3k6WxlVDCZH0WB2dtMIlQ8U,738
60
60
  microsoft_agents/activity/semantic_actions_states.py,sha256=8uD9w9Za-ZUGnhol63LGkzhPyCbF0VSzQ3qlbTlhjAc,244
61
61
  microsoft_agents/activity/sign_in_constants.py,sha256=3juR-nSfP0vr3TvFPhQ2foEivt1lLgWxsG6LQmWhhkc,534
62
62
  microsoft_agents/activity/sign_in_resource.py,sha256=7aT7m7eSLVuW6veD3OxAM_IcSxVqFaK3zu31SSSEE1w,541
@@ -192,7 +192,8 @@ microsoft_agents/activity/teams/teams_member.py,sha256=vRcLRHy6wTfH7DP6k6QbrKkOR
192
192
  microsoft_agents/activity/teams/teams_paged_members_result.py,sha256=cG4eKHjA0u1EMioC2ErVpydnoPJrtTDcdhdzYET9xto,555
193
193
  microsoft_agents/activity/teams/tenant_info.py,sha256=h8OxMd6LD5lWVj_LK2ut8z7SB0I7Gx74W1wwEiYOzXk,296
194
194
  microsoft_agents/activity/teams/user_meeting_details.py,sha256=tvk2CWYf7Bo-DhK8NSojhanJDXEOGVrKXxJDca03CAo,467
195
- microsoft_agents_activity-0.5.0.dev3.dist-info/METADATA,sha256=qlnuf4zLJx4797H6I8ttC0qI3aAY8QKqNfxFdIRsfpY,413
196
- microsoft_agents_activity-0.5.0.dev3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
197
- microsoft_agents_activity-0.5.0.dev3.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
198
- microsoft_agents_activity-0.5.0.dev3.dist-info/RECORD,,
195
+ microsoft_agents_activity-0.5.0.dev7.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
196
+ microsoft_agents_activity-0.5.0.dev7.dist-info/METADATA,sha256=NUzhzxJk5QVqwEHYL8gk27tcvlvyLwFiQZN7ICpe66I,8070
197
+ microsoft_agents_activity-0.5.0.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
198
+ microsoft_agents_activity-0.5.0.dev7.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
199
+ microsoft_agents_activity-0.5.0.dev7.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -1,11 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: microsoft-agents-activity
3
- Version: 0.5.0.dev3
4
- Summary: A protocol library for Microsoft Agents
5
- Author: Microsoft Corporation
6
- Project-URL: Homepage, https://github.com/microsoft/Agents
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.9
11
- Requires-Dist: pydantic>=2.10.4