Microsoft.Agents.Storage.CosmosDb 1.0.1

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Microsoft.Agents.Storage.CosmosDb --version 1.0.1
                    
NuGet\Install-Package Microsoft.Agents.Storage.CosmosDb -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.Agents.Storage.CosmosDb" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Agents.Storage.CosmosDb" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Agents.Storage.CosmosDb" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.Agents.Storage.CosmosDb --version 1.0.1
                    
#r "nuget: Microsoft.Agents.Storage.CosmosDb, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Microsoft.Agents.Storage.CosmosDb&version=1.0.1
                    
Install Microsoft.Agents.Storage.CosmosDb as a Cake Addin
#tool nuget:?package=Microsoft.Agents.Storage.CosmosDb&version=1.0.1
                    
Install Microsoft.Agents.Storage.CosmosDb as a Cake Tool

Microsoft.Agents.Storage.CosmosDb

About

  • An Agent is inherently stateless. Once your Agent is deployed, it may not run in the same process or on the same machine from one turn to the next. However, your Agent may need to track the context of a conversation so that it can manage its behavior and remember answers to previous questions. The state and storage features of the Agents SDK allow you to add state to your Agent.
  • Microsoft.Agents.State use Storage to persist state to memory, Azure Blobs, or CosmosDb.

Main Types

  • CosmosDbPartitionedStorage
  • CosmosDbPartitionedStorageOptions

Registering CosmosDbPartitionedStorage

appsettings.json

{
  "CosmosDbPartitionedStorageOptions": {
    "CosmosDbEndpoint": "{db_endpoint}",
    "DatabaseId": "{db_id}",
    "ContainerId": "{container_id}"
  }
}

Program.cs

builder.Services.AddSingleton<IStorage>((sp) => new CosmosDbPartitionedStorage(
    builder.Configuration.GetSection(nameof(CosmosDbPartitionedStorageOptions))
        .Get<CosmosDbPartitionedStorageOptions>()));

CosmosDbPartitionedStorageOptions.AuthKey or CosmosDbPartitionedStorageOptions.TokenCredential should be defined.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.40-beta 26 5/8/2025
1.1.32-beta 49 5/7/2025
1.1.30-beta 49 5/6/2025
1.1.28-beta 54 5/4/2025
1.1.25-beta 57 5/3/2025
1.1.18-beta 94 5/2/2025
1.1.17-beta 131 5/1/2025
1.1.10-beta-g85ab16e4d9 128 4/30/2025
1.1.1-beta 149 4/24/2025
1.0.1 156 4/24/2025
0.2.361-alpha 148 4/23/2025
0.2.358-alpha 144 4/22/2025
0.2.346-alpha 78 4/19/2025
0.2.343-alpha 134 4/18/2025
0.2.339-alpha 172 4/17/2025
0.2.315-alpha 173 4/16/2025
0.2.314-alpha 82 4/12/2025
0.2.308-alpha 153 4/10/2025
0.2.295-alpha 154 4/9/2025
0.2.290-alpha 149 4/8/2025
0.2.287-alpha 85 4/5/2025
0.2.286-alpha 117 4/4/2025
0.2.282-alpha 154 4/3/2025
0.2.277-alpha 147 4/1/2025
0.2.271-alpha 95 3/29/2025
0.2.267-alpha 119 3/28/2025
0.2.257-alpha 131 3/27/2025
0.2.180-alpha 461 3/26/2025
0.2.171-alpha 109 3/21/2025
0.2.162-alpha 139 3/19/2025
0.2.154-alpha 137 3/18/2025
0.2.153-alpha 66 3/15/2025
0.2.151-alpha 105 3/14/2025
0.2.146-alpha 151 3/12/2025
0.2.141-alpha 163 3/8/2025
0.2.137-alpha 201 3/7/2025