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

This version

0.6.1

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.1.tar.gz (10.8 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.1.tar.gz.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.1.tar.gz
Algorithm Hash digest
SHA256 a836c6af3016cfff76fff41545c2bdc28e391519c8d238d0961b9f29f9b71f7f
MD5 684b3ae4c37d91b727b5b1d96c0fefc8
BLAKE2b-256 f4b11fa03d151e86a22732df72de7b5e61c0e7263110978e439f8e41c52c5cc0

See more details on using hashes here.

File details

Details for the file microsoft_agents_hosting_fastapi-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_agents_hosting_fastapi-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b03ef706d5bc4bf9963b6590d9cc1bc23777960d00ab3ee948d9872b08609ba
MD5 5c7bb68b5a429268385f7c5480e12349
BLAKE2b-256 487a27e5582ba3fa7a78747ed4e53fa1555ebff63a5fe91fa3fd404c21543eb2

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