skillfed

azure-ai-agentserver-responses

Python SDK for building servers implementing the Azure AI Responses protocol

azure-ai-agentserver-responses v2.0.0 382.4K downloads/30d#7,089 on PyPI5,588
Permissive license MIT Active released

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-responses

uv

uv add azure-ai-agentserver-responses

poetry

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 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

Development Status :: 5 - Production/StableProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

azure ai agent server responsesagent response streaming sseazure hosted agent frameworkresponse lifecycle managementasync agent request handlerazure ai protocol endpointsagent cancellation and recovery
azure-aiasync-streamingagent-framework

More Application Frameworks packages

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

textual

Textual is a Python framework for building…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

mcp

Build and connect to Model Context Protocol…

permissive · top 1,000 on PyPI

Werkzeug

Werkzeug is a WSGI utility library providing…

permissive · top 1,000 on PyPI

azure-ai-agentserver-core

Provides the host framework and infrastructure…

permissive · top 5,000 on PyPI

azure-ai-agentserver-invocations

Provides HTTP and WebSocket invocation protocol…

permissive · top 15,000 on PyPI

clarifai-protocol

Provides the protocol layer for Clarifai's…

permissive · top 15,000 on PyPI

azure-ai-agentserver-agentframework

Wraps an Agent-framework agent to host it on…

unclear · top 15,000 on PyPI

agent-framework-azurefunctions

Hosts Microsoft Agent Framework agents on Azure…

permissive · top 15,000 on PyPI

agent-framework-openai

Provides OpenAI and Azure OpenAI integration…

permissive · top 5,000 on PyPI

azure-ai-projects

Provides a Python client for Microsoft Foundry…

permissive · top 5,000 on PyPI

agent-framework-azure-ai

Integrates Azure AI Foundry memory capabilities…

permissive · top 15,000 on PyPI

agent-framework-azure-ai-search

Provides RAG (Retrieval Augmented Generation)…

permissive · top 15,000 on PyPI

agent-framework-foundry-hosting

Integrates Agent Framework agents and workflows…

permissive · top 15,000 on PyPI

Further reading