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

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.0.dev10.tar.gz
Algorithm Hash digest
SHA256 cffa562335a709e67790038dd438cff0b191cd3c675a2f32f3fd62acd43d4f9b
MD5 aa9e2c32d4cbfcf158e4d48a715a8f03
BLAKE2b-256 3e3853a7313b9a4bf24bb6c9c6ddfdd99bdb384e4cdb31659656bf9eb070cbae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.0.dev10-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce71cc569fd793efe0d08a6f8a324151165f889eca8c31cdb1f030a712c1933
MD5 e0ba04f958a4367f3d1bd9f0a3bfc019
BLAKE2b-256 bca2202336e1e9e9f8af16b0554e74076dd170629619d4ffb99fb21c019b01f7

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