Skip to main content

Integration library for Microsoft Agents with FastAPI

Project description

Microsoft Agents Hosting FastAPI

This library provides FastAPI integration for Microsoft Agents, enabling you to build conversational agents using the FastAPI web framework.

Features

  • FastAPI integration for Microsoft Agents
  • JWT authorization middleware
  • Channel service API endpoints
  • Streaming response support
  • Cloud adapter for processing agent activities

Installation

pip install microsoft-agents-hosting-fastapi

Usage

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()
agent_app = AgentApplication()

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

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

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_fastapi-0.7.0.dev6.tar.gz.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.7.0.dev6.tar.gz
Algorithm Hash digest
SHA256 d8b3fae1992b09d4dc2c113aa5354011c405f4e1c5417dd6d8b1ba87b8b7b5a3
MD5 0fbbff078bea09f2a7736f9755b5067c
BLAKE2b-256 b51ef4533932beebee85c47010a94431ebf2367962e5358fdc03ab809c983f3b

See more details on using hashes here.

File details

Details for the file microsoft_agents_hosting_fastapi-0.7.0.dev6-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.7.0.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 02a2db50995d19571a7814cd32bd2e5165ac97bfef4e37d7bbd25b5ea858e1f4
MD5 391ec89ddae520f235a6b3c325ef433e
BLAKE2b-256 5d330e2106a33accf12991026d34d71a008927f82204ad2c264ee8b1776edb7f

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