--- id: azure-ai-agentserver-responses version: "2.0.0" license: MIT license_treatment: permissive maintenance: active --- # azure-ai-agentserver-responses — Python SDK for building servers implementing the Azure AI Responses protocol License: permissive · Maintenance: active · Downloads: 382.4K/mo ## 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 above — 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 pip install azure-ai-agentserver-responses uv add azure-ai-agentserver-responses poetry add azure-ai-agentserver-responses ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 382.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure ai agent server responses, agent response streaming sse, azure hosted agent framework, response lifecycle management, async agent request handler, azure ai protocol endpoints, agent cancellation and recovery, azure-ai, async-streaming, agent-framework [View on SkillFed](https://skillfed.io/packages/azure-ai-agentserver-responses) · [View on PyPI](https://pypi.org/project/azure-ai-agentserver-responses/)