azure-ai-agentserver-responses
Python SDK for building servers implementing the Azure AI Responses protocol
What it is and what it does
This package extends azure-ai-agentserver-core by adding a complete Responses protocol implementation for Azure AI Hosted Agent containers. It handles the full lifecycle of agent responses—creation, streaming via Server-Sent Events (SSE), cancellation, deletion, and replay—through REST endpoints and async handler decorators.
Developers register async handlers using the @app.response_handler decorator to process incoming requests. The package manages response state transitions (created → in_progress → completed/failed/cancelled), handles client disconnections and cancellation signals independently from server shutdown, and provides utilities like TextResponse for simple text replies and ResponseEventStream for complex multi-type outputs with function calls and reasoning items. It supports streaming, background execution, and opt-in crash recovery for stored responses.
Use it for:
- Building conversational AI agents that stream token-by-token responses in real-time to clients over SSE.
- Implementing multi-user agent sessions where per-request call IDs route tool invocations to user-scoped results.
- Creating agents that emit function calls, reasoning traces, and structured outputs alongside text in a single response stream.
- Handling graceful cancellation and server shutdown independently—observing client cancellation via a signal while tracking server drain separately.
- Recovering from crashes in background response handlers by replaying persisted stream events when resilient_background mode is enabled.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides the Responses protocol endpoints for Azure AI Hosted Agent containers, enabling handlers to create, stream, cancel, delete, and replay agent responses with full lifecycle management.
Yes. This is a production-ready (Development Status 5) framework extension from Microsoft's official Azure SDK with no known vulnerabilities, low install friction, and active maintenance. Install it if you are building an agent server on the Azure AI Hosted Agent platform and need to implement the Responses protocol.
Install
azure-ai-agentserver-responses on PyPI
pip
pip install azure-ai-agentserver-responsesuv
uv add azure-ai-agentserver-responsespoetry
poetry add azure-ai-agentserver-responsesInstalling azure-ai-agentserver-responses
Before you install
Low friction installation with a pure-Python wheel. Actively maintained with a recent release (3 days old) and strong repository signals (5588 stars, last commit 2026-08-14). Requires Python 3.10 or later.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install azure-ai-agentserver-responses
from azure.ai.agentserver.responses import ResponsesAgentServerHost, TextResponse, ResponseContext, CreateResponse
import asyncio
app = ResponsesAgentServerHost()
@app.response_handler
async def handler(request: CreateResponse, context: ResponseContext, cancellation_signal: asyncio.Event):
text = await context.get_input_text()
return TextResponse(context, request, text=f"Echo: {text}")
app.run()
Python 3.10 or later required; handlers must be async def with exactly three positional parameters (request, context, cancellation_signal).
Verify before relying
- Whether the crash-recovery feature (resilient_background=True) has been tested in production environments.
- Performance characteristics under high concurrency or large streaming payloads.
- Compatibility guarantees with specific Azure AI platform versions beyond container protocol 2.0.0.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — azure-ai-agentserver-core, azure-core, isodate, aiohttp |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 382,360/month — #7,089 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_ai_agentserver_responses-2.0.0-py3-none-any.whl
Keywords: azure, azure sdk
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
azure-ai-agentserver-coreProvides the host framework and infrastructure…
permissive · top 5,000 on PyPI
azure-ai-agentserver-invocationsProvides HTTP and WebSocket invocation protocol…
permissive · top 15,000 on PyPI
clarifai-protocolProvides the protocol layer for Clarifai's…
permissive · top 15,000 on PyPI
azure-ai-agentserver-agentframeworkWraps an Agent-framework agent to host it on…
unclear · top 15,000 on PyPI
agent-framework-azurefunctionsHosts Microsoft Agent Framework agents on Azure…
permissive · top 15,000 on PyPI
agent-framework-openaiProvides OpenAI and Azure OpenAI integration…
permissive · top 5,000 on PyPI
azure-ai-projectsProvides a Python client for Microsoft Foundry…
permissive · top 5,000 on PyPI
agent-framework-azure-aiIntegrates Azure AI Foundry memory capabilities…
permissive · top 15,000 on PyPI
agent-framework-azure-ai-searchProvides RAG (Retrieval Augmented Generation)…
permissive · top 15,000 on PyPI
agent-framework-foundry-hostingIntegrates Agent Framework agents and workflows…
permissive · top 15,000 on PyPI