Skip to main content

Dialog system for Microsoft Agents (waterfall dialogs, prompts, choices)

Project description

Microsoft Agents Hosting - Dialogs

PyPI version

Dialog system for the Microsoft 365 Agents SDK. Provides waterfall dialogs, prompts, choice recognition, and multi-turn conversation management.

This library is a port of the botbuilder-dialogs library to the new Microsoft 365 Agents SDK. It provides the same dialog primitives (WaterfallDialog, ComponentDialog, DialogSet, DialogContext) and prompts (TextPrompt, NumberPrompt, ChoicePrompt, ConfirmPrompt, DateTimePrompt, OAuthPrompt, etc.) with updated imports and patterns for the new SDK.

What is this?

This library is part of the Microsoft 365 Agents SDK for Python - a comprehensive framework for building enterprise-grade conversational AI agents. The dialogs library enables developers to structure multi-turn conversations with reusable, composable dialog primitives.

Key Features

  • WaterfallDialog: Sequential step-by-step conversation flows
  • ComponentDialog: Composable, encapsulated dialog components
  • Prompts: Built-in prompts for text, numbers, choices, confirmations, dates, attachments, and OAuth
  • Choice recognition: Locale-aware choice matching and recognition
  • Dialog memory: Scoped memory management (conversation, user, dialog, class, settings)
  • DialogManager: High-level dialog orchestration with state management

Installation

pip install microsoft-agents-hosting-dialogs

Quick Start

from microsoft_agents.hosting.dialogs import (
    WaterfallDialog,
    WaterfallStepContext,
    DialogSet,
    DialogTurnStatus,
)
from microsoft_agents.hosting.dialogs.prompts import TextPrompt, PromptOptions
from microsoft_agents.hosting.core import ConversationState, MemoryStorage

storage = MemoryStorage()
conversation_state = ConversationState(storage)
dialog_state = conversation_state.create_property("DialogState")
dialogs = DialogSet(dialog_state)

async def step1(step: WaterfallStepContext):
    return await step.prompt(
        "text_prompt",
        PromptOptions(prompt=MessageFactory.text("What is your name?"))
    )

async def step2(step: WaterfallStepContext):
    await step.context.send_activity(f"Hello, {step.result}!")
    return await step.end_dialog()

dialogs.add(TextPrompt("text_prompt"))
dialogs.add(WaterfallDialog("main", [step1, step2]))

Release Notes

Version Date Release Notes
1.1.0 2026-06-19 1.1.0 Release Notes
1.0.0 2026-05-22 1.0.0 Release Notes

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

microsoft_agents_hosting_dialogs-1.2.0.dev4.tar.gz (60.3 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 microsoft_agents_hosting_dialogs-1.2.0.dev4.tar.gz.

File metadata

File hashes

Hashes for microsoft_agents_hosting_dialogs-1.2.0.dev4.tar.gz
Algorithm Hash digest
SHA256 2b58cd2b303a301ed01795d10cddd22bf15bdf77906f874d84d7019cb82fc1d4
MD5 9f73b58da56b1234aae09306aa27fc5a
BLAKE2b-256 bfdfa87b226c304d4dfdbf2c7e555629404d421c323506f5f9f1d1e3b33d0859

See more details on using hashes here.

File details

Details for the file microsoft_agents_hosting_dialogs-1.2.0.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_agents_hosting_dialogs-1.2.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 a27a4f4518ad04d1201176dfccbd70ec30f6c27f5331103550342eeae9a56f74
MD5 33841ae10e96b4b57763bc88dc0263d5
BLAKE2b-256 3a4444ac3e59e8afc239ba43a26f9ebbefb188adc57948cc39e98572440f5963

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