--- id: microsoft-agents-hosting-core version: "1.3.0" license: MIT license_treatment: permissive maintenance: active --- # microsoft-agents-hosting-core — Core library for Microsoft Agents License: permissive · Maintenance: active · Downloads: 938.5K/mo ## What it is and what it does microsoft-agents-hosting-core is the foundational library for the Microsoft 365 Agents SDK, providing the orchestration engine for building production-grade conversational agents. It supplies the core classes (AgentApplication, TurnContext, TurnState) and infrastructure for activity routing, multi-turn conversation state, and channel communication. The library handles the complex plumbing of agent lifecycle management, state persistence across conversation turns, and integration with authentication systems. Developers use it to build agents that respond to messages through decorator-based routing, manage conversation state across turns, and handle errors consistently. It depends on microsoft-agents-activity for the Activity protocol types, pyjwt for token handling, python-dotenv for configuration, and opentelemetry for observability. The library is designed to work with hosting adapters (aiohttp, FastAPI, Teams, Slack) that you install separately depending on your deployment target. Use it for: - Build a Teams bot that maintains conversation state and routes messages to handler functions based on content patterns - Create a multi-platform agent that handles the same business logic across Teams, Slack, and web chat with unified state management - Implement enterprise-grade error handling and observability for production agents using OpenTelemetry integration - Develop agents with role-based authorization and authentication using the built-in Authorization and ClaimsIdentity classes - Manage complex multi-turn conversations with ConversationState, UserState, and TempState across different scopes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides the core hosting infrastructure for building conversational AI agents that work across Microsoft 365 platforms, handling activity processing, state management, authentication, and channel communication. Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides low-friction installation. It is the required foundation for any Microsoft 365 agent development in Python. Install it if you are building agents for Teams, M365 Copilot, or other Microsoft platforms; skip it if you need agents for non-Microsoft channels only. ## Install pip install microsoft-agents-hosting-core uv add microsoft-agents-hosting-core poetry add microsoft-agents-hosting-core ## Installing microsoft-agents-hosting-core Before you install: Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (15 days old) and steady commit activity. Dependencies are standard (JWT, ISO date parsing, environment config, observability) with no compiled components. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install microsoft-agents-hosting-core from microsoft_agents_hosting_core import AgentApplication, TurnContext, TurnState from microsoft_agents_activity import MemoryStorage STORAGE = MemoryStorage() AGENT_APP = AgentApplication[TurnState](storage=STORAGE) @AGENT_APP.activity("message") async def on_message(context: TurnContext, state: TurnState): await context.send_activity(f"You said: {context.activity.text}") Requires Python 3.10 or later; also requires a hosting adapter (aiohttp, FastAPI, or Teams) and authentication configuration to run a complete agent. Verify before relying: - Whether the package requires Azure credentials or Microsoft 365 tenant setup to function beyond basic examples - Performance characteristics and scalability limits for concurrent agent instances - Compatibility with third-party channel integrations (Slack, Facebook, Twilio) mentioned in description but not detailed in core library scope ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 938.5K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags microsoft agents sdk python, conversational ai agent framework, teams bot hosting library, multi-turn conversation state management, activity-based agent routing, enterprise agent orchestration, microsoft 365 agent platform, conversational-ai, microsoft-365, multi-turn-state [View on SkillFed](https://skillfed.io/packages/microsoft-agents-hosting-core) · [View on PyPI](https://pypi.org/project/microsoft-agents-hosting-core/)