skillfed

microsoft-agents-hosting-fastapi

Integration library for Microsoft Agents with FastAPI

microsoft-agents-hosting-fastapi v1.3.0 223.0K downloads/30d#9,255 on PyPI1,036
Permissive license MIT Active released

What it is and what it does

Microsoft Agents Hosting FastAPI is a bridge between the Microsoft Agents framework and FastAPI, allowing you to deploy conversational agents as HTTP services. It wraps the core agent runtime with FastAPI-specific bindings, providing middleware for JWT authorization, predefined channel service endpoints, and support for streaming responses. The package is built on fastapi and starlette, so it inherits their async-first design.

You use it by instantiating a CloudAdapter with your connection manager, creating an AgentApplication, and wiring them into a FastAPI route handler via the start_agent_process function. The library handles the protocol translation between HTTP requests and the agent's internal activity model, letting you focus on agent logic rather than web framework plumbing.

Use it for:

  • Host a conversational agent as a REST API endpoint that receives and responds to user messages over HTTP
  • Integrate Microsoft Agents with existing FastAPI applications for multi-turn dialogue handling
  • Deploy agents with JWT-based authorization and channel service compatibility
  • Build streaming-capable agent responses for real-time conversation experiences

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides FastAPI integration for building and hosting conversational agents using the Microsoft Agents framework, including JWT authorization, channel service endpoints, and streaming response support.

Yes, if you are building conversational agents with the Microsoft Agents framework and want to deploy them on FastAPI. The package is actively maintained, has low install friction, carries a permissive MIT license, and integrates cleanly with FastAPI's async model. No known vulnerabilities.

Install

microsoft-agents-hosting-fastapi on PyPI

pip

pip install microsoft-agents-hosting-fastapi

uv

uv add microsoft-agents-hosting-fastapi

poetry

poetry add microsoft-agents-hosting-fastapi

Installing microsoft-agents-hosting-fastapi

Before you install

Low install friction with a pure-Python wheel. Actively maintained with releases every 2–3 weeks; last commit 2026-08-13. Requires Python >=3.10. Depends on microsoft-agents-hosting-core, fastapi, and starlette.

License in practice

MIT license permits commercial and private use with minimal restrictions; suitable for most projects.

Quickstart

pip install microsoft-agents-hosting-fastapi

from fastapi import FastAPI, Request
from microsoft_agents.hosting.fastapi import start_agent_process, CloudAdapter
from microsoft_agents.hosting.core.app import AgentApplication

app = FastAPI()
adapter = CloudAdapter(connection_manager=connection_manager)
agent_app = AgentApplication()

@app.post("/api/messages")
async def messages(request: Request):
    return await start_agent_process(request, agent_app, adapter)

Requires Python >=3.10

Verify before relying

  • Whether the package supports streaming response patterns beyond what the description excerpt shows
  • Specific JWT authorization middleware configuration requirements and defaults
  • Whether CloudAdapter and AgentApplication are fully documented or require external Microsoft Agents docs

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — microsoft-agents-hosting-core, fastapi, starlette
Maintenance actively maintained — 15 days since the last release
Last repo commit
First released
Downloads 222,972/month — #9,255 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: microsoft_agents_hosting_fastapi-1.3.0-py3-none-any.whl

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

fastapi agents frameworkmicrosoft agents hostingconversational agents fastapiagent service endpointsfastapi integration agents
agentsconversational-aifastapi-integration

More Application Frameworks packages

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

textual

Textual is a Python framework for building…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

mcp

Build and connect to Model Context Protocol…

permissive · top 1,000 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

microsoft-agents-authentication-msal

Provides MSAL-based authentication for…

permissive · top 15,000 on PyPI

microsoft-agents-hosting-aiohttp

Provides HTTP hosting integration for Microsoft…

permissive · top 15,000 on PyPI

microsoft-agents-hosting-core

Provides the core hosting infrastructure for…

permissive · top 5,000 on PyPI

microsoft-agents-hosting-teams

Provides Teams-specific handlers and utilities…

permissive · top 15,000 on PyPI

microsoft-agents-activity

Provides core types and schemas implementing…

permissive · top 5,000 on PyPI

agent-framework-azure-ai

Integrates Azure AI Foundry memory capabilities…

permissive · top 15,000 on PyPI

agent-framework-azurefunctions

Hosts Microsoft Agent Framework agents on Azure…

permissive · top 15,000 on PyPI

fastapi-cloudevents

FastAPI plugin that automatically parses and…

permissive · top 15,000 on PyPI

ag_ui_adk

Bridges Google ADK agents to the AG-UI…

permissive · top 15,000 on PyPI

microsoft-agents-copilotstudio-client

Connects Python applications to AI agents…

permissive · top 15,000 on PyPI