microsoft-agents-activity
A protocol library for Microsoft Agents
What it is and what it does
Microsoft Agents Activity is a protocol library that defines the core types and schemas for building conversational AI agents on Microsoft 365 platforms. It implements the Activity protocol—a messaging standard used across Teams, Copilot Studio, and web chat—providing Pydantic-validated data structures for different communication types (messages, typing indicators, conversation updates, events, invokes, and end-of-conversation signals). The library is the foundational layer of the Microsoft 365 Agents SDK; it does not itself host agents or manage conversation state, but rather supplies the type definitions that other packages in the SDK ecosystem (hosting, storage, authentication) build upon.
Developers use this package when they need to work with agent activities programmatically—parsing incoming messages, constructing outgoing responses with cards and attachments, or integrating custom logic into an agent pipeline. It is typically installed as a dependency of higher-level hosting packages, but can also be used standalone for activity validation or schema-driven development. The library requires Python 3.10 or later and depends only on pydantic.
Use it for:
- Define and validate incoming and outgoing agent messages when building a custom agent handler or middleware.
- Construct rich message cards (animations, attachments, interactive elements) to send from an agent to Teams or Copilot Studio.
- Parse activity types (message, typing, conversation update, invoke, event) to route and handle different communication patterns.
- Integrate a custom agent with the Microsoft 365 Agents SDK by using Activity types as the contract between your logic and the hosting layer.
- Validate agent payloads in a testing or integration layer without deploying a full hosting stack.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides core types and schemas implementing the Activity protocol for building conversational AI agents across Microsoft 365 platforms like Teams, Copilot Studio, and web chat.
Yes. This is a lightweight, actively maintained protocol library with no security vulnerabilities, permissive licensing, and a single well-known dependency. Install it if you are building agents for Microsoft 365 platforms or integrating with the Microsoft Agents SDK ecosystem. It is also safe to install as a transitive dependency of higher-level hosting packages.
Install
microsoft-agents-activity on PyPI
pip
pip install microsoft-agents-activityuv
uv add microsoft-agents-activitypoetry
poetry add microsoft-agents-activityInstalling microsoft-agents-activity
Before you install
Low install friction with a single pure-Python dependency (pydantic). Active maintenance with a release 15 days ago and regular updates since first release in July 2025.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects.
Quickstart
pip install microsoft-agents-activity
from microsoft_agents_activity import Activity, ActivityTypes
# Create a message activity
message = Activity(
type=ActivityTypes.message,
text="Hello from agent"
)
Requires Python 3.10 or later.
Verify before relying
- Whether the Activity protocol implementation is fully compatible with all Microsoft 365 platforms mentioned or if some require additional hosting packages.
- Whether pydantic version constraints exist that might conflict with other dependencies in a larger project.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pydantic |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 937,638/month — #4,689 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: microsoft_agents_activity-1.3.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
microsoft-agents-copilotstudio-clientConnects Python applications to AI agents…
permissive · top 15,000 on PyPI
microsoft-agents-hosting-coreProvides the core hosting infrastructure for…
permissive · top 5,000 on PyPI
microsoft-agents-hosting-aiohttpProvides HTTP hosting integration for Microsoft…
permissive · top 15,000 on PyPI
microsoft-teams-cardsProvides Pydantic-based models for building…
permissive · top 5,000 on PyPI
microsoft-agents-hosting-teamsProvides Teams-specific handlers and utilities…
permissive · top 15,000 on PyPI
microsoft-teams-appsFramework for building Microsoft Teams…
permissive · top 15,000 on PyPI
microsoft-teams-apiHTTP client library for Microsoft Teams Bot…
permissive · top 5,000 on PyPI
unique-toolkitProvides high-level abstractions and services…
unclear · top 15,000 on PyPI
microsoft-agents-hosting-fastapiProvides FastAPI integration for building and…
permissive · top 15,000 on PyPI
agent-framework-copilotstudioIntegrates Microsoft Copilot Studio published…
permissive · top 15,000 on PyPI