{"id":27146,"library":"microsoft-agents-hosting-aiohttp","title":"Microsoft Agents Hosting for aiohttp","description":"Integration library for hosting Microsoft Agents applications using the aiohttp web framework. Version 0.9.0 supports Python >=3.10 and provides middleware and routing for building agent-based HTTP services.","status":"active","version":"0.9.0","language":"python","source_language":"en","source_url":"https://github.com/microsoft/Agents","tags":["microsoft","agents","aiohttp","bot-framework","async"],"install":[{"cmd":"pip install microsoft-agents-hosting-aiohttp","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core agent abstractions and communication protocols","package":"microsoft-agents-core","optional":false},{"reason":"Web framework required for hosting","package":"aiohttp","optional":false}],"imports":[{"note":"Package namespace uses 'microsoft.agents' not 'agents'","wrong":"from agents.hosting.aiohttp import AioHttpHost","symbol":"AioHttpHost","correct":"from microsoft.agents.hosting.aiohttp import AioHttpHost"}],"quickstart":{"code":"import os\nfrom aiohttp import web\nfrom microsoft.agents.hosting.aiohttp import AioHttpHost, CloudAdapter\n\napp = web.Application()\nhost = AioHttpHost(\n    app=app,\n    adapter=CloudAdapter(\n        bot_app_id=os.environ.get('BOT_APP_ID', ''),\n        bot_app_password=os.environ.get('BOT_APP_PASSWORD', '')\n    )\n)\nhost.register_routes()\n\nif __name__ == '__main__':\n    web.run_app(app, port=3978)","lang":"python","description":"Creates an aiohttp web application with Microsoft Agent hosting middleware."},"warnings":[{"fix":"Update import to 'from microsoft.agents.hosting.aiohttp import ...'","message":"The package was renamed from 'agents-hosting-aiohttp' to 'microsoft-agents-hosting-aiohttp' in version 0.9.0. Old import paths will break.","severity":"breaking","affected_versions":"<0.9.0"},{"fix":"Pass adapter=CloudAdapter(...) instead of settings dict.","message":"The 'AioHttpHost' constructor no longer accepts 'settings' parameter directly; use 'CloudAdapter' for configuration.","severity":"deprecated","affected_versions":">=0.9.0"},{"fix":"Set BOT_APP_ID and BOT_APP_PASSWORD environment variables, or use CloudAdapter with app_id='' and password='' for local testing.","message":"Missing BOT_APP_ID or BOT_APP_PASSWORD environment variables will cause runtime authentication failures without clear error messages. Always set them or use local adapter for development.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install microsoft-agents-hosting-aiohttp' and import using 'from microsoft.agents.hosting.aiohttp import ...'","cause":"The package 'microsoft-agents-hosting-aiohttp' is not installed, or installed but import path is wrong.","error":"ModuleNotFoundError: No module named 'microsoft'"},{"fix":"Use CloudAdapter for configuration: AioHttpHost(app=app, adapter=CloudAdapter(...))","cause":"Using old API where AioHttpHost accepted 'settings' dict directly.","error":"TypeError: __init__() got an unexpected keyword argument 'settings'"},{"fix":"After creating AioHttpHost instance, call 'host.register_routes()' before starting the app.","cause":"Agent routes were not registered because 'host.register_routes()' was not called.","error":"RuntimeError: Application not configured for agents"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}