Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Microsoft Agents Hosting - Slack

PyPI version

Build Slack agents with the Microsoft 365 Agents SDK using typed message and event handlers, direct Slack Web API calls, and streaming responses.

Release Notes

Version Date Release Notes
1.9.0 2026-10-19 1.9.0 Release Notes

Packages Overview

We offer the following PyPI packages to create conversational experiences based on Agents:

Package Name PyPI Version Description
microsoft-agents-activity PyPI Types and validators implementing the Activity protocol spec.
microsoft-agents-hosting-core PyPI Core library for Microsoft Agents hosting.
microsoft-agents-hosting-aiohttp PyPI Configures aiohttp to run the Agent.
microsoft-agents-hosting-fastapi PyPI Configures fastapi to run the Agent.
microsoft-agents-hosting-msteams PyPI Provides classes to host an Agent for Teams.
microsoft-agents-hosting-dialogs PyPI Dialog system with waterfall dialogs, prompts, and multi-turn conversation management.
microsoft-agents-hosting-slack PyPI Provides classes to host an Agent for Slack.
microsoft-agents-storage-blob PyPI Extension to use Azure Blob as storage.
microsoft-agents-storage-cosmos PyPI Extension to use CosmosDB as storage.
microsoft-agents-authentication-msal PyPI MSAL-based authentication for Microsoft Agents.
microsoft-agents-authentication-entra-auth-sidecar PyPI Credential-free Entra ID Agent ID authentication via the sidecar.

Installation

pip install microsoft-agents-hosting-slack

Usage

Given configured application options (including storage) and a connection manager:

from microsoft_agents.hosting.core.app import AgentApplication
from microsoft_agents.hosting.core.app.state import TurnState
from microsoft_agents.hosting.slack import SlackAgentExtension, SlackTurnContext

app = AgentApplication[TurnState](options, connection_manager=connections)
slack = SlackAgentExtension(app)

@slack.message()
async def on_slack_message(context: SlackTurnContext, state: TurnState) -> None:
    channel_data = context.activity.slack_channel_data
    await slack.call(
        context,
        "chat.postMessage",
        {
            "channel": channel_data.channel,
            "text": f"You said: {context.activity.text}",
        },
        token=channel_data.api_token or "",
    )

Use @slack.message("hello") for a specific message or @slack.event("reaction_added") for a specific event. Both accept a string, a compiled regular expression, or a list of either, and match only Slack activities. When called without a selector, they match every Slack message or event and register at RouteRank.LAST, so more specific routes win. on_message() and on_event() are deprecated aliases.

@slack.conversation_update(...), @slack.members_added(), @slack.members_removed(), and @slack.installation_update() mirror the corresponding AgentApplication route hooks, but match only Slack activities and pass a SlackTurnContext to the handler.

Handlers receive a SlackTurnContext with typed activity.slack_channel_data and access to the per-turn Slack API client through context.client. Envelope, payload, and response models support nested lookups such as envelope.get("event.channel") and typed lookups such as response.get("count", type_=int).

Use slack.create_stream(context, thread_ts=...) to start a SlackStream, then append content and stop the stream. See the API docstrings for routing options, client configuration, streaming requirements, and lookup behavior.

Metadata

Release files for microsoft-agents-hosting-slack 1.10.0.dev10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsoft-agents-hosting-slack 1.10.0.dev10
File Size Uploaded Provenance Actions
microsoft_agents_hosting_slack-1.10.0.dev10.tar.gz 19.0 kB Without provenance Details for microsoft_agents_hosting_slack-1.10.0.dev10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for microsoft-agents-hosting-slack 1.10.0.dev10
File Interpreter ABI Platform Actions
microsoft_agents_hosting_slack-1.10.0.dev10-py3-none-any.whl Python 3 none any Details for microsoft_agents_hosting_slack-1.10.0.dev10-py3-none-any.whl

Total release size: 43.9 kB

Release files / microsoft_agents_hosting_slack-1.10.0.dev10.tar.gz

Download URL microsoft_agents_hosting_slack-1.10.0.dev10.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
79a990ff89ab0df70a29f917cbe0c204357483260c0a53291bae0f5747a001b6
BLAKE2b-256 checksum
How to use checksums
9323d985d0c13fd6a928cb0494e910a185b610fab3e74b317dbebd78bc21de46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / microsoft_agents_hosting_slack-1.10.0.dev10-py3-none-any.whl

Download URL microsoft_agents_hosting_slack-1.10.0.dev10-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7fda8591f2f8ea2c27ecad3f3f7e0af3337d3d66690b804181a2b8411b25d86
BLAKE2b-256 checksum
How to use checksums
dd4f473ebb1ffb4de2e9785f9c09315d386e1f7b27acad8e1c79b1a9d10eb272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for microsoft-agents-hosting-slack 1.10.0.dev10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page