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

microsoft_agents_hosting_fastapi-0.6.0.dev16.tar.gz (10.6 kB view details)

Uploaded Source

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.6.0.dev16.tar.gz.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.0.dev16.tar.gz
Algorithm Hash digest
SHA256 b1a83f172078bd76cf8f52a58e5601f0fd37249228ba75fce10628bce90e5764
MD5 116b7590e0767bfb077c7822f82a0428
BLAKE2b-256 f0aa2f9cc839406451c7e9a5b4a842c3677640d83f35f3ecc453b6122da76bd6

See more details on using hashes here.

File details

Details for the file microsoft_agents_hosting_fastapi-0.6.0.dev16-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.0.dev16-py3-none-any.whl
Algorithm Hash digest
SHA256 b3d9a6df66cd46903a2c2bd49b9ea443fb3c7255142b0c661e3ba51c35bf09c2
MD5 caef2dec98639e014a96a054fbe583c9
BLAKE2b-256 639ba16b5a656e21533fcbcb4a8dc998df7e0219acfe973d4c042d7f8f57b6f9

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