microsoft-agents-copilotstudio-client 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.
@@ -0,0 +1,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: microsoft-agents-copilotstudio-client
3
+ Version: 0.5.0.dev7
4
+ Summary: A client 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: microsoft-agents-hosting-core==0.5.0.dev7
14
+ Dynamic: license-file
15
+ Dynamic: requires-dist
16
+
17
+ # Microsoft Agents Copilot Studio Client
18
+
19
+ [![PyPI version](https://img.shields.io/pypi/v/microsoft-agents-copilotstudio-client)](https://pypi.org/project/microsoft-agents-copilotstudio-client/)
20
+
21
+ The Copilot Studio Client is for connecting to and interacting with agents created in Microsoft Copilot Studio. This library allows you to integrate Copilot Studio agents into your Python applications.
22
+
23
+ This client library provides a direct connection to Copilot Studio agents, bypassing traditional chat channels. It's perfect for integrating AI conversations into your applications, building custom UIs, or creating agent-to-agent communication flows.
24
+
25
+ # What is this?
26
+ 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.
27
+
28
+ ## Packages Overview
29
+
30
+ We offer the following PyPI packages to create conversational experiences based on Agents:
31
+
32
+ | Package Name | PyPI Version | Description |
33
+ |--------------|-------------|-------------|
34
+ | `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. |
35
+ | `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. |
36
+ | `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. |
37
+ | `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. |
38
+ | `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. |
39
+ | `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. |
40
+ | `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. |
41
+
42
+ Additionally we provide a Copilot Studio Client, to interact with Agents created in CopilotStudio:
43
+
44
+ | Package Name | PyPI Version | Description |
45
+ |--------------|-------------|-------------|
46
+ | `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 |
47
+
48
+
49
+ ## Installation
50
+
51
+ ```bash
52
+ pip install microsoft-agents-copilotstudio-client
53
+ ```
54
+
55
+ ## Quick Start
56
+
57
+ ### Basic Setup
58
+
59
+ Code below from the [main.py in the Copilot Studio Client](https://github.com/microsoft/Agents/blob/main/samples/python/copilotstudio-client/src/main.py)
60
+ ```python
61
+ def create_client():
62
+ settings = ConnectionSettings(
63
+ environment_id=environ.get("COPILOTSTUDIOAGENT__ENVIRONMENTID"),
64
+ agent_identifier=environ.get("COPILOTSTUDIOAGENT__SCHEMANAME"),
65
+ cloud=None,
66
+ copilot_agent_type=None,
67
+ custom_power_platform_cloud=None,
68
+ )
69
+ token = acquire_token(
70
+ settings,
71
+ app_client_id=environ.get("COPILOTSTUDIOAGENT__AGENTAPPID"),
72
+ tenant_id=environ.get("COPILOTSTUDIOAGENT__TENANTID"),
73
+ )
74
+ copilot_client = CopilotClient(settings, token)
75
+ return copilot_client
76
+ ```
77
+
78
+ ### Start a Conversation
79
+ The code below is summarized from the [main.py in the Copilot Studio Client](https://github.com/microsoft/Agents/blob/main/samples/python/copilotstudio-client/src/main.py). See that sample for complete & working code.
80
+
81
+ ```python
82
+ copilot_client = create_client()
83
+ act = copilot_client.start_conversation(True)
84
+
85
+ ...
86
+
87
+ replies = copilot_client.ask_question("Who are you?", conversation_id)
88
+ async for reply in replies:
89
+ if reply.type == ActivityTypes.message:
90
+ print(f"\n{reply.text}")
91
+ ```
92
+
93
+ ### Environment Variables
94
+ Set up your `.env` file:
95
+
96
+ ```bash
97
+ # Required
98
+ ENVIRONMENT_ID=your-power-platform-environment-id
99
+ AGENT_IDENTIFIER=your-copilot-studio-agent-id
100
+ APP_CLIENT_ID=your-azure-app-client-id
101
+ TENANT_ID=your-azure-tenant-id
102
+
103
+ # Optional
104
+ CLOUD=PROD
105
+ COPILOT_AGENT_TYPE=PUBLISHED
106
+ CUSTOM_POWER_PLATFORM_CLOUD=your-custom-cloud.com
107
+ ```
108
+
109
+ ## Features
110
+
111
+ ✅ **Real-time streaming** - Server-sent events for live responses
112
+ ✅ **Multi-cloud support** - Works across all Power Platform clouds
113
+ ✅ **Rich content** - Support for cards, actions, and attachments
114
+ ✅ **Conversation management** - Maintain context across interactions
115
+ ✅ **Custom activities** - Send structured data to agents
116
+ ✅ **Async/await** - Modern Python async support
117
+
118
+ ## Troubleshooting
119
+
120
+ ### Common Issues
121
+
122
+ **Authentication failed**
123
+ - Verify your app is registered in Azure AD
124
+ - Check that token has `https://api.powerplatform.com/.default` scope
125
+ - Ensure your app has permissions to the Power Platform environment
126
+
127
+ **Agent not found**
128
+ - Verify the environment ID and agent identifier
129
+ - Check that the agent is published and accessible
130
+ - Confirm you're using the correct cloud setting
131
+
132
+ **Connection timeout**
133
+ - Check network connectivity to Power Platform
134
+ - Verify firewall settings allow HTTPS traffic
135
+ - Try a different cloud region if available
136
+
137
+ ## Requirements
138
+
139
+ - Python 3.9+
140
+ - Valid Azure AD app registration
141
+ - Access to Microsoft Power Platform environment
142
+ - Published Copilot Studio agent
143
+
144
+ # Quick Links
145
+
146
+ - 📦 [All SDK Packages on PyPI](https://pypi.org/search/?q=microsoft-agents)
147
+ - 📖 [Complete Documentation](https://aka.ms/agents)
148
+ - 💡 [Python Samples Repository](https://github.com/microsoft/Agents/tree/main/samples/python)
149
+ - 🐛 [Report Issues](https://github.com/microsoft/Agents-for-python/issues)
150
+
151
+ # Sample Applications
152
+
153
+ |Name|Description|README|
154
+ |----|----|----|
155
+ |Quickstart|Simplest agent|[Quickstart](https://github.com/microsoft/Agents/blob/main/samples/python/quickstart/README.md)|
156
+ |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)|
157
+ |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)|
158
+ |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)|
159
+ |Streaming Agent|Streams OpenAI responses|[azure-ai-streaming](https://github.com/microsoft/Agents/blob/main/samples/python/azureai-streaming/README.md)|
160
+ |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)|
161
+ |Cards Agent|Agent that uses rich cards to enhance conversation design |[cards](https://github.com/microsoft/Agents/blob/main/samples/python/cards/README.md)|
@@ -6,7 +6,8 @@ microsoft_agents/copilotstudio/client/direct_to_engine_connection_settings_proto
6
6
  microsoft_agents/copilotstudio/client/execute_turn_request.py,sha256=Gi8KPODVAaISjMtBbdbHvWSq56VAt_I7D9-U1YyEL00,125
7
7
  microsoft_agents/copilotstudio/client/power_platform_cloud.py,sha256=YrwAmxpeSuWpuQ1VnDc2_4m_r6T6sjbHMugBrIEF4iQ,465
8
8
  microsoft_agents/copilotstudio/client/power_platform_environment.py,sha256=PVKzyx2inaIEBCA5Fh8JsrZ0vYeG6qRza0hEbfrHDpY,6956
9
- microsoft_agents_copilotstudio_client-0.5.0.dev3.dist-info/METADATA,sha256=gUNuPZfQwSne4W0DRMrWqv7NUo8Z1h_yR_y9ja0Tg-U,471
10
- microsoft_agents_copilotstudio_client-0.5.0.dev3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- microsoft_agents_copilotstudio_client-0.5.0.dev3.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
12
- microsoft_agents_copilotstudio_client-0.5.0.dev3.dist-info/RECORD,,
9
+ microsoft_agents_copilotstudio_client-0.5.0.dev7.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
10
+ microsoft_agents_copilotstudio_client-0.5.0.dev7.dist-info/METADATA,sha256=v4Asmsk73fmnqGVuq9E21DBqgDcKZxE0fBAEjk4hKEk,8191
11
+ microsoft_agents_copilotstudio_client-0.5.0.dev7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ microsoft_agents_copilotstudio_client-0.5.0.dev7.dist-info/top_level.txt,sha256=lWKcT4v6fTA_NgsuHdNvuMjSrkiBMXohn64ApY7Xi8A,17
13
+ microsoft_agents_copilotstudio_client-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,12 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: microsoft-agents-copilotstudio-client
3
- Version: 0.5.0.dev3
4
- Summary: A client 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: microsoft-agents-hosting-core==0.5.0.dev3
12
- Dynamic: requires-dist