Skip to main content

Azure Cosmos DB history provider integration for Microsoft Agent Framework.

Project description

Get Started with Microsoft Agent Framework Azure Cosmos DB

Please install this package via pip:

pip install agent-framework-azure-cosmos --pre

Azure Cosmos DB History Provider

The Azure Cosmos DB integration provides CosmosHistoryProvider for persistent conversation history storage.

Basic Usage Example

from azure.identity.aio import DefaultAzureCredential
from agent_framework.azure import CosmosHistoryProvider

provider = CosmosHistoryProvider(
    endpoint="https://<account>.documents.azure.com:443/",
    credential=DefaultAzureCredential(),
    database_name="agent-framework",
    container_name="chat-history",
)

Credentials follow the same pattern used by other Azure connectors in the repository:

  • Pass a credential object (for example DefaultAzureCredential)
  • Or pass a key string directly
  • Or set AZURE_COSMOS_KEY in the environment

Container naming behavior:

  • Container name is configured on the provider (container_name or AZURE_COSMOS_CONTAINER_NAME)
  • session_id is used as the Cosmos partition key for reads/writes

See the conversation samples for runnable examples, including cosmos_history_provider.py.

Import Paths

from agent_framework.azure import CosmosHistoryProvider
# or directly:
from agent_framework_azure_cosmos import CosmosHistoryProvider

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_framework_azure_cosmos-1.0.0b260402.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file agent_framework_azure_cosmos-1.0.0b260402.tar.gz.

File metadata

  • Download URL: agent_framework_azure_cosmos-1.0.0b260402.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_framework_azure_cosmos-1.0.0b260402.tar.gz
Algorithm Hash digest
SHA256 23d0e80639d2fe62c5d26c08a1cce92777528a79bf80d5572bb4096ce5386b27
MD5 ded7b72354cba0ec6c5f98ecc4511b8a
BLAKE2b-256 f7255fd1827e4c6caac638c4e3a64e0dc2ef56f9038346f41204a826dd42fc42

See more details on using hashes here.

File details

Details for the file agent_framework_azure_cosmos-1.0.0b260402-py3-none-any.whl.

File metadata

  • Download URL: agent_framework_azure_cosmos-1.0.0b260402-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agent_framework_azure_cosmos-1.0.0b260402-py3-none-any.whl
Algorithm Hash digest
SHA256 61affb7548c70a478a068977c91aa13d5212b27cc6e954b63d0236d850ea391f
MD5 016ff37c6ec0466bffa67d34397fefad
BLAKE2b-256 b5038b4d5d2c4a19b9ed1247ec84e692cd1b8d88789d5087a2b86ef3f6bb8473

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page