microsoft-agents-storage-blob 0.5.0.dev5__tar.gz → 0.5.0.dev10__tar.gz
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-storage-blob might be problematic. Click here for more details.
- microsoft_agents_storage_blob-0.5.0.dev10/PKG-INFO +133 -0
- microsoft_agents_storage_blob-0.5.0.dev10/microsoft_agents_storage_blob.egg-info/PKG-INFO +133 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents_storage_blob.egg-info/SOURCES.txt +1 -0
- microsoft_agents_storage_blob-0.5.0.dev10/microsoft_agents_storage_blob.egg-info/requires.txt +3 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/pyproject.toml +1 -0
- microsoft_agents_storage_blob-0.5.0.dev10/readme.md +115 -0
- microsoft_agents_storage_blob-0.5.0.dev5/PKG-INFO +0 -16
- microsoft_agents_storage_blob-0.5.0.dev5/microsoft_agents_storage_blob.egg-info/PKG-INFO +0 -16
- microsoft_agents_storage_blob-0.5.0.dev5/microsoft_agents_storage_blob.egg-info/requires.txt +0 -3
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/LICENSE +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents/storage/blob/__init__.py +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents/storage/blob/blob_storage.py +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents/storage/blob/blob_storage_config.py +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents_storage_blob.egg-info/dependency_links.txt +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/microsoft_agents_storage_blob.egg-info/top_level.txt +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/setup.cfg +0 -0
- {microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/setup.py +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: microsoft-agents-storage-blob
|
|
3
|
+
Version: 0.5.0.dev10
|
|
4
|
+
Summary: A blob storage 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.dev10
|
|
14
|
+
Requires-Dist: azure-core
|
|
15
|
+
Requires-Dist: azure-storage-blob
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
Dynamic: requires-dist
|
|
18
|
+
|
|
19
|
+
# Microsoft Agents Storage - Blob
|
|
20
|
+
|
|
21
|
+
[](https://pypi.org/project/microsoft-agents-storage-blob/)
|
|
22
|
+
|
|
23
|
+
Azure Blob Storage integration for Microsoft 365 Agents SDK. This library provides persistent storage for conversation state, user data, and custom agent information using Azure Blob Storage.
|
|
24
|
+
|
|
25
|
+
This library implements the storage interface for the Microsoft 365 Agents SDK using Azure Blob Storage as the backend. It enables your agents to persist conversation state, user preferences, and custom data across sessions. Perfect for production deployments where you need reliable, scalable cloud storage.
|
|
26
|
+
|
|
27
|
+
# What is this?
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
## Packages Overview
|
|
31
|
+
|
|
32
|
+
We offer the following PyPI packages to create conversational experiences based on Agents:
|
|
33
|
+
|
|
34
|
+
| Package Name | PyPI Version | Description |
|
|
35
|
+
|--------------|-------------|-------------|
|
|
36
|
+
| `microsoft-agents-activity` | [](https://pypi.org/project/microsoft-agents-activity/) | Types and validators implementing the Activity protocol spec. |
|
|
37
|
+
| `microsoft-agents-hosting-core` | [](https://pypi.org/project/microsoft-agents-hosting-core/) | Core library for Microsoft Agents hosting. |
|
|
38
|
+
| `microsoft-agents-hosting-aiohttp` | [](https://pypi.org/project/microsoft-agents-hosting-aiohttp/) | Configures aiohttp to run the Agent. |
|
|
39
|
+
| `microsoft-agents-hosting-teams` | [](https://pypi.org/project/microsoft-agents-hosting-teams/) | Provides classes to host an Agent for Teams. |
|
|
40
|
+
| `microsoft-agents-storage-blob` | [](https://pypi.org/project/microsoft-agents-storage-blob/) | Extension to use Azure Blob as storage. |
|
|
41
|
+
| `microsoft-agents-storage-cosmos` | [](https://pypi.org/project/microsoft-agents-storage-cosmos/) | Extension to use CosmosDB as storage. |
|
|
42
|
+
| `microsoft-agents-authentication-msal` | [](https://pypi.org/project/microsoft-agents-authentication-msal/) | MSAL-based authentication for Microsoft Agents. |
|
|
43
|
+
|
|
44
|
+
Additionally we provide a Copilot Studio Client, to interact with Agents created in CopilotStudio:
|
|
45
|
+
|
|
46
|
+
| Package Name | PyPI Version | Description |
|
|
47
|
+
|--------------|-------------|-------------|
|
|
48
|
+
| `microsoft-agents-copilotstudio-client` | [](https://pypi.org/project/microsoft-agents-copilotstudio-client/) | Direct to Engine client to interact with Agents created in CopilotStudio |
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install microsoft-agents-storage-blob
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Benefits:**
|
|
57
|
+
- ✅ No secrets in code
|
|
58
|
+
- ✅ Managed Identity support
|
|
59
|
+
- ✅ Automatic token renewal
|
|
60
|
+
- ✅ Fine-grained access control via Azure RBAC
|
|
61
|
+
|
|
62
|
+
### Configuration Parameters
|
|
63
|
+
|
|
64
|
+
| Parameter | Type | Required | Description |
|
|
65
|
+
|-----------|------|----------|-------------|
|
|
66
|
+
| `container_name` | `str` | Yes | Name of the blob container to use |
|
|
67
|
+
| `connection_string` | `str` | No* | Storage account connection string |
|
|
68
|
+
| `url` | `str` | No* | Blob service URL (e.g., `https://account.blob.core.windows.net`) |
|
|
69
|
+
| `credential` | `TokenCredential` | No** | Azure credential for authentication |
|
|
70
|
+
|
|
71
|
+
*Either `connection_string` OR (`url` + `credential`) must be provided
|
|
72
|
+
**Required when using `url`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Azure Managed Identity
|
|
76
|
+
|
|
77
|
+
When running in Azure (App Service, Functions, Container Apps), use Managed Identity:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from azure.identity import ManagedIdentityCredential
|
|
81
|
+
|
|
82
|
+
config = BlobStorageConfig(
|
|
83
|
+
container_name="agent-storage",
|
|
84
|
+
url="https://myaccount.blob.core.windows.net",
|
|
85
|
+
credential=ManagedIdentityCredential()
|
|
86
|
+
)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Azure RBAC Roles Required:**
|
|
90
|
+
- `Storage Blob Data Contributor` - For read/write access
|
|
91
|
+
- `Storage Blob Data Reader` - For read-only access
|
|
92
|
+
|
|
93
|
+
**Benefits of switching to BlobStorage:**
|
|
94
|
+
- ✅ Data persists across restarts
|
|
95
|
+
- ✅ Scalable to millions of items
|
|
96
|
+
- ✅ Multi-instance support (load balancing)
|
|
97
|
+
- ✅ Automatic backups and geo-replication
|
|
98
|
+
- ✅ Built-in monitoring and diagnostics
|
|
99
|
+
|
|
100
|
+
## Best Practices
|
|
101
|
+
|
|
102
|
+
1. **Use Token Authentication in Production** - Avoid storing connection strings; use Managed Identity or DefaultAzureCredential
|
|
103
|
+
2. **Initialize Once** - Call `storage.initialize()` during app startup, not on every request
|
|
104
|
+
3. **Implement Retry Logic** - Handle transient failures with exponential backoff
|
|
105
|
+
4. **Monitor Performance** - Use Azure Monitor to track storage operations
|
|
106
|
+
5. **Set Lifecycle Policies** - Configure automatic cleanup of old data in Azure Portal
|
|
107
|
+
6. **Use Consistent Naming** - Establish key naming conventions (e.g., `user:{id}`, `conversation:{id}`)
|
|
108
|
+
7. **Batch Operations** - Read/write multiple items together when possible
|
|
109
|
+
|
|
110
|
+
## Key Classes Reference
|
|
111
|
+
|
|
112
|
+
- **`BlobStorage`** - Main storage implementation using Azure Blob Storage
|
|
113
|
+
- **`BlobStorageConfig`** - Configuration settings for connection and authentication
|
|
114
|
+
- **`StoreItem`** - Base class for data models (inherit to create custom types)
|
|
115
|
+
|
|
116
|
+
# Quick Links
|
|
117
|
+
|
|
118
|
+
- 📦 [All SDK Packages on PyPI](https://pypi.org/search/?q=microsoft-agents)
|
|
119
|
+
- 📖 [Complete Documentation](https://aka.ms/agents)
|
|
120
|
+
- 💡 [Python Samples Repository](https://github.com/microsoft/Agents/tree/main/samples/python)
|
|
121
|
+
- 🐛 [Report Issues](https://github.com/microsoft/Agents-for-python/issues)
|
|
122
|
+
|
|
123
|
+
# Sample Applications
|
|
124
|
+
|
|
125
|
+
|Name|Description|README|
|
|
126
|
+
|----|----|----|
|
|
127
|
+
|Quickstart|Simplest agent|[Quickstart](https://github.com/microsoft/Agents/blob/main/samples/python/quickstart/README.md)|
|
|
128
|
+
|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)|
|
|
129
|
+
|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)|
|
|
130
|
+
|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)|
|
|
131
|
+
|Streaming Agent|Streams OpenAI responses|[azure-ai-streaming](https://github.com/microsoft/Agents/blob/main/samples/python/azureai-streaming/README.md)|
|
|
132
|
+
|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)|
|
|
133
|
+
|Cards Agent|Agent that uses rich cards to enhance conversation design |[cards](https://github.com/microsoft/Agents/blob/main/samples/python/cards/README.md)|
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: microsoft-agents-storage-blob
|
|
3
|
+
Version: 0.5.0.dev10
|
|
4
|
+
Summary: A blob storage 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.dev10
|
|
14
|
+
Requires-Dist: azure-core
|
|
15
|
+
Requires-Dist: azure-storage-blob
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
Dynamic: requires-dist
|
|
18
|
+
|
|
19
|
+
# Microsoft Agents Storage - Blob
|
|
20
|
+
|
|
21
|
+
[](https://pypi.org/project/microsoft-agents-storage-blob/)
|
|
22
|
+
|
|
23
|
+
Azure Blob Storage integration for Microsoft 365 Agents SDK. This library provides persistent storage for conversation state, user data, and custom agent information using Azure Blob Storage.
|
|
24
|
+
|
|
25
|
+
This library implements the storage interface for the Microsoft 365 Agents SDK using Azure Blob Storage as the backend. It enables your agents to persist conversation state, user preferences, and custom data across sessions. Perfect for production deployments where you need reliable, scalable cloud storage.
|
|
26
|
+
|
|
27
|
+
# What is this?
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
## Packages Overview
|
|
31
|
+
|
|
32
|
+
We offer the following PyPI packages to create conversational experiences based on Agents:
|
|
33
|
+
|
|
34
|
+
| Package Name | PyPI Version | Description |
|
|
35
|
+
|--------------|-------------|-------------|
|
|
36
|
+
| `microsoft-agents-activity` | [](https://pypi.org/project/microsoft-agents-activity/) | Types and validators implementing the Activity protocol spec. |
|
|
37
|
+
| `microsoft-agents-hosting-core` | [](https://pypi.org/project/microsoft-agents-hosting-core/) | Core library for Microsoft Agents hosting. |
|
|
38
|
+
| `microsoft-agents-hosting-aiohttp` | [](https://pypi.org/project/microsoft-agents-hosting-aiohttp/) | Configures aiohttp to run the Agent. |
|
|
39
|
+
| `microsoft-agents-hosting-teams` | [](https://pypi.org/project/microsoft-agents-hosting-teams/) | Provides classes to host an Agent for Teams. |
|
|
40
|
+
| `microsoft-agents-storage-blob` | [](https://pypi.org/project/microsoft-agents-storage-blob/) | Extension to use Azure Blob as storage. |
|
|
41
|
+
| `microsoft-agents-storage-cosmos` | [](https://pypi.org/project/microsoft-agents-storage-cosmos/) | Extension to use CosmosDB as storage. |
|
|
42
|
+
| `microsoft-agents-authentication-msal` | [](https://pypi.org/project/microsoft-agents-authentication-msal/) | MSAL-based authentication for Microsoft Agents. |
|
|
43
|
+
|
|
44
|
+
Additionally we provide a Copilot Studio Client, to interact with Agents created in CopilotStudio:
|
|
45
|
+
|
|
46
|
+
| Package Name | PyPI Version | Description |
|
|
47
|
+
|--------------|-------------|-------------|
|
|
48
|
+
| `microsoft-agents-copilotstudio-client` | [](https://pypi.org/project/microsoft-agents-copilotstudio-client/) | Direct to Engine client to interact with Agents created in CopilotStudio |
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install microsoft-agents-storage-blob
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Benefits:**
|
|
57
|
+
- ✅ No secrets in code
|
|
58
|
+
- ✅ Managed Identity support
|
|
59
|
+
- ✅ Automatic token renewal
|
|
60
|
+
- ✅ Fine-grained access control via Azure RBAC
|
|
61
|
+
|
|
62
|
+
### Configuration Parameters
|
|
63
|
+
|
|
64
|
+
| Parameter | Type | Required | Description |
|
|
65
|
+
|-----------|------|----------|-------------|
|
|
66
|
+
| `container_name` | `str` | Yes | Name of the blob container to use |
|
|
67
|
+
| `connection_string` | `str` | No* | Storage account connection string |
|
|
68
|
+
| `url` | `str` | No* | Blob service URL (e.g., `https://account.blob.core.windows.net`) |
|
|
69
|
+
| `credential` | `TokenCredential` | No** | Azure credential for authentication |
|
|
70
|
+
|
|
71
|
+
*Either `connection_string` OR (`url` + `credential`) must be provided
|
|
72
|
+
**Required when using `url`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Azure Managed Identity
|
|
76
|
+
|
|
77
|
+
When running in Azure (App Service, Functions, Container Apps), use Managed Identity:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from azure.identity import ManagedIdentityCredential
|
|
81
|
+
|
|
82
|
+
config = BlobStorageConfig(
|
|
83
|
+
container_name="agent-storage",
|
|
84
|
+
url="https://myaccount.blob.core.windows.net",
|
|
85
|
+
credential=ManagedIdentityCredential()
|
|
86
|
+
)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Azure RBAC Roles Required:**
|
|
90
|
+
- `Storage Blob Data Contributor` - For read/write access
|
|
91
|
+
- `Storage Blob Data Reader` - For read-only access
|
|
92
|
+
|
|
93
|
+
**Benefits of switching to BlobStorage:**
|
|
94
|
+
- ✅ Data persists across restarts
|
|
95
|
+
- ✅ Scalable to millions of items
|
|
96
|
+
- ✅ Multi-instance support (load balancing)
|
|
97
|
+
- ✅ Automatic backups and geo-replication
|
|
98
|
+
- ✅ Built-in monitoring and diagnostics
|
|
99
|
+
|
|
100
|
+
## Best Practices
|
|
101
|
+
|
|
102
|
+
1. **Use Token Authentication in Production** - Avoid storing connection strings; use Managed Identity or DefaultAzureCredential
|
|
103
|
+
2. **Initialize Once** - Call `storage.initialize()` during app startup, not on every request
|
|
104
|
+
3. **Implement Retry Logic** - Handle transient failures with exponential backoff
|
|
105
|
+
4. **Monitor Performance** - Use Azure Monitor to track storage operations
|
|
106
|
+
5. **Set Lifecycle Policies** - Configure automatic cleanup of old data in Azure Portal
|
|
107
|
+
6. **Use Consistent Naming** - Establish key naming conventions (e.g., `user:{id}`, `conversation:{id}`)
|
|
108
|
+
7. **Batch Operations** - Read/write multiple items together when possible
|
|
109
|
+
|
|
110
|
+
## Key Classes Reference
|
|
111
|
+
|
|
112
|
+
- **`BlobStorage`** - Main storage implementation using Azure Blob Storage
|
|
113
|
+
- **`BlobStorageConfig`** - Configuration settings for connection and authentication
|
|
114
|
+
- **`StoreItem`** - Base class for data models (inherit to create custom types)
|
|
115
|
+
|
|
116
|
+
# Quick Links
|
|
117
|
+
|
|
118
|
+
- 📦 [All SDK Packages on PyPI](https://pypi.org/search/?q=microsoft-agents)
|
|
119
|
+
- 📖 [Complete Documentation](https://aka.ms/agents)
|
|
120
|
+
- 💡 [Python Samples Repository](https://github.com/microsoft/Agents/tree/main/samples/python)
|
|
121
|
+
- 🐛 [Report Issues](https://github.com/microsoft/Agents-for-python/issues)
|
|
122
|
+
|
|
123
|
+
# Sample Applications
|
|
124
|
+
|
|
125
|
+
|Name|Description|README|
|
|
126
|
+
|----|----|----|
|
|
127
|
+
|Quickstart|Simplest agent|[Quickstart](https://github.com/microsoft/Agents/blob/main/samples/python/quickstart/README.md)|
|
|
128
|
+
|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)|
|
|
129
|
+
|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)|
|
|
130
|
+
|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)|
|
|
131
|
+
|Streaming Agent|Streams OpenAI responses|[azure-ai-streaming](https://github.com/microsoft/Agents/blob/main/samples/python/azureai-streaming/README.md)|
|
|
132
|
+
|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)|
|
|
133
|
+
|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,6 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
name = "microsoft-agents-storage-blob"
|
|
7
7
|
dynamic = ["version", "dependencies"]
|
|
8
8
|
description = "A blob storage library for Microsoft Agents"
|
|
9
|
+
readme = {file = "readme.md", content-type = "text/markdown"}
|
|
9
10
|
authors = [{name = "Microsoft Corporation"}]
|
|
10
11
|
license = "MIT"
|
|
11
12
|
license-files = ["LICENSE"]
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Microsoft Agents Storage - Blob
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/microsoft-agents-storage-blob/)
|
|
4
|
+
|
|
5
|
+
Azure Blob Storage integration for Microsoft 365 Agents SDK. This library provides persistent storage for conversation state, user data, and custom agent information using Azure Blob Storage.
|
|
6
|
+
|
|
7
|
+
This library implements the storage interface for the Microsoft 365 Agents SDK using Azure Blob Storage as the backend. It enables your agents to persist conversation state, user preferences, and custom data across sessions. Perfect for production deployments where you need reliable, scalable cloud storage.
|
|
8
|
+
|
|
9
|
+
# What is this?
|
|
10
|
+
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.
|
|
11
|
+
|
|
12
|
+
## Packages Overview
|
|
13
|
+
|
|
14
|
+
We offer the following PyPI packages to create conversational experiences based on Agents:
|
|
15
|
+
|
|
16
|
+
| Package Name | PyPI Version | Description |
|
|
17
|
+
|--------------|-------------|-------------|
|
|
18
|
+
| `microsoft-agents-activity` | [](https://pypi.org/project/microsoft-agents-activity/) | Types and validators implementing the Activity protocol spec. |
|
|
19
|
+
| `microsoft-agents-hosting-core` | [](https://pypi.org/project/microsoft-agents-hosting-core/) | Core library for Microsoft Agents hosting. |
|
|
20
|
+
| `microsoft-agents-hosting-aiohttp` | [](https://pypi.org/project/microsoft-agents-hosting-aiohttp/) | Configures aiohttp to run the Agent. |
|
|
21
|
+
| `microsoft-agents-hosting-teams` | [](https://pypi.org/project/microsoft-agents-hosting-teams/) | Provides classes to host an Agent for Teams. |
|
|
22
|
+
| `microsoft-agents-storage-blob` | [](https://pypi.org/project/microsoft-agents-storage-blob/) | Extension to use Azure Blob as storage. |
|
|
23
|
+
| `microsoft-agents-storage-cosmos` | [](https://pypi.org/project/microsoft-agents-storage-cosmos/) | Extension to use CosmosDB as storage. |
|
|
24
|
+
| `microsoft-agents-authentication-msal` | [](https://pypi.org/project/microsoft-agents-authentication-msal/) | MSAL-based authentication for Microsoft Agents. |
|
|
25
|
+
|
|
26
|
+
Additionally we provide a Copilot Studio Client, to interact with Agents created in CopilotStudio:
|
|
27
|
+
|
|
28
|
+
| Package Name | PyPI Version | Description |
|
|
29
|
+
|--------------|-------------|-------------|
|
|
30
|
+
| `microsoft-agents-copilotstudio-client` | [](https://pypi.org/project/microsoft-agents-copilotstudio-client/) | Direct to Engine client to interact with Agents created in CopilotStudio |
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install microsoft-agents-storage-blob
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Benefits:**
|
|
39
|
+
- ✅ No secrets in code
|
|
40
|
+
- ✅ Managed Identity support
|
|
41
|
+
- ✅ Automatic token renewal
|
|
42
|
+
- ✅ Fine-grained access control via Azure RBAC
|
|
43
|
+
|
|
44
|
+
### Configuration Parameters
|
|
45
|
+
|
|
46
|
+
| Parameter | Type | Required | Description |
|
|
47
|
+
|-----------|------|----------|-------------|
|
|
48
|
+
| `container_name` | `str` | Yes | Name of the blob container to use |
|
|
49
|
+
| `connection_string` | `str` | No* | Storage account connection string |
|
|
50
|
+
| `url` | `str` | No* | Blob service URL (e.g., `https://account.blob.core.windows.net`) |
|
|
51
|
+
| `credential` | `TokenCredential` | No** | Azure credential for authentication |
|
|
52
|
+
|
|
53
|
+
*Either `connection_string` OR (`url` + `credential`) must be provided
|
|
54
|
+
**Required when using `url`
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Azure Managed Identity
|
|
58
|
+
|
|
59
|
+
When running in Azure (App Service, Functions, Container Apps), use Managed Identity:
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
from azure.identity import ManagedIdentityCredential
|
|
63
|
+
|
|
64
|
+
config = BlobStorageConfig(
|
|
65
|
+
container_name="agent-storage",
|
|
66
|
+
url="https://myaccount.blob.core.windows.net",
|
|
67
|
+
credential=ManagedIdentityCredential()
|
|
68
|
+
)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Azure RBAC Roles Required:**
|
|
72
|
+
- `Storage Blob Data Contributor` - For read/write access
|
|
73
|
+
- `Storage Blob Data Reader` - For read-only access
|
|
74
|
+
|
|
75
|
+
**Benefits of switching to BlobStorage:**
|
|
76
|
+
- ✅ Data persists across restarts
|
|
77
|
+
- ✅ Scalable to millions of items
|
|
78
|
+
- ✅ Multi-instance support (load balancing)
|
|
79
|
+
- ✅ Automatic backups and geo-replication
|
|
80
|
+
- ✅ Built-in monitoring and diagnostics
|
|
81
|
+
|
|
82
|
+
## Best Practices
|
|
83
|
+
|
|
84
|
+
1. **Use Token Authentication in Production** - Avoid storing connection strings; use Managed Identity or DefaultAzureCredential
|
|
85
|
+
2. **Initialize Once** - Call `storage.initialize()` during app startup, not on every request
|
|
86
|
+
3. **Implement Retry Logic** - Handle transient failures with exponential backoff
|
|
87
|
+
4. **Monitor Performance** - Use Azure Monitor to track storage operations
|
|
88
|
+
5. **Set Lifecycle Policies** - Configure automatic cleanup of old data in Azure Portal
|
|
89
|
+
6. **Use Consistent Naming** - Establish key naming conventions (e.g., `user:{id}`, `conversation:{id}`)
|
|
90
|
+
7. **Batch Operations** - Read/write multiple items together when possible
|
|
91
|
+
|
|
92
|
+
## Key Classes Reference
|
|
93
|
+
|
|
94
|
+
- **`BlobStorage`** - Main storage implementation using Azure Blob Storage
|
|
95
|
+
- **`BlobStorageConfig`** - Configuration settings for connection and authentication
|
|
96
|
+
- **`StoreItem`** - Base class for data models (inherit to create custom types)
|
|
97
|
+
|
|
98
|
+
# Quick Links
|
|
99
|
+
|
|
100
|
+
- 📦 [All SDK Packages on PyPI](https://pypi.org/search/?q=microsoft-agents)
|
|
101
|
+
- 📖 [Complete Documentation](https://aka.ms/agents)
|
|
102
|
+
- 💡 [Python Samples Repository](https://github.com/microsoft/Agents/tree/main/samples/python)
|
|
103
|
+
- 🐛 [Report Issues](https://github.com/microsoft/Agents-for-python/issues)
|
|
104
|
+
|
|
105
|
+
# Sample Applications
|
|
106
|
+
|
|
107
|
+
|Name|Description|README|
|
|
108
|
+
|----|----|----|
|
|
109
|
+
|Quickstart|Simplest agent|[Quickstart](https://github.com/microsoft/Agents/blob/main/samples/python/quickstart/README.md)|
|
|
110
|
+
|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)|
|
|
111
|
+
|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)|
|
|
112
|
+
|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)|
|
|
113
|
+
|Streaming Agent|Streams OpenAI responses|[azure-ai-streaming](https://github.com/microsoft/Agents/blob/main/samples/python/azureai-streaming/README.md)|
|
|
114
|
+
|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)|
|
|
115
|
+
|Cards Agent|Agent that uses rich cards to enhance conversation design |[cards](https://github.com/microsoft/Agents/blob/main/samples/python/cards/README.md)|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: microsoft-agents-storage-blob
|
|
3
|
-
Version: 0.5.0.dev5
|
|
4
|
-
Summary: A blob storage 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
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: microsoft-agents-hosting-core==0.5.0.dev5
|
|
13
|
-
Requires-Dist: azure-core
|
|
14
|
-
Requires-Dist: azure-storage-blob
|
|
15
|
-
Dynamic: license-file
|
|
16
|
-
Dynamic: requires-dist
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: microsoft-agents-storage-blob
|
|
3
|
-
Version: 0.5.0.dev5
|
|
4
|
-
Summary: A blob storage 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
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: microsoft-agents-hosting-core==0.5.0.dev5
|
|
13
|
-
Requires-Dist: azure-core
|
|
14
|
-
Requires-Dist: azure-storage-blob
|
|
15
|
-
Dynamic: license-file
|
|
16
|
-
Dynamic: requires-dist
|
{microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/setup.cfg
RENAMED
|
File without changes
|
{microsoft_agents_storage_blob-0.5.0.dev5 → microsoft_agents_storage_blob-0.5.0.dev10}/setup.py
RENAMED
|
File without changes
|