azure-ai-agentserver-invocations
Invocations protocol for Azure AI Hosted Agents
What it is and what it does
This package extends the azure-ai-agentserver-core framework with a complete invocation protocol implementation for Azure AI Hosted Agent containers. It exposes HTTP endpoints (POST /invocations, GET /invocations/{id}, POST /invocations/{id}/cancel) and a WebSocket endpoint (/invocations_ws) for full-duplex streaming, along with OpenAPI and AsyncAPI documentation endpoints. Handlers are registered via decorators (@app.invoke_handler, @app.get_invocation_handler, @app.cancel_invocation_handler, @app.ws_handler) and receive request context including invocation ID, session ID, user ID, and call ID through request.state.
The package manages request/response headers automatically (x-agent-invocation-id, x-agent-session-id) and integrates with distributed tracing. It supports long-running operations with polling, streaming responses, and multi-user sessions on container protocol 2.0.0 by forwarding per-request call IDs to downstream services. Built on aiohttp, it runs as an async application with minimal boilerplate.
Use it for:
- Build an agent that processes POST /invocations requests and returns JSON responses.
- Implement long-running agent operations with polling via GET /invocations/{id} and cancellation.
- Stream agent responses as Server-Sent Events or full-duplex WebSocket messages to clients.
- Handle multi-user sessions by forwarding x-agent-foundry-call-id headers to toolbox services.
- Expose OpenAPI and AsyncAPI documentation for agent discovery and client code generation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides HTTP and WebSocket invocation protocol endpoints for Azure AI Hosted Agent containers, plugging into the azure-ai-agentserver-core framework to handle agent execution requests and streaming responses.
Yes. The package is actively maintained (release 4 days old), has zero known vulnerabilities, uses a permissive MIT license, and requires only two runtime dependencies with low install friction. It is marked Production/Stable and supports Python 3.10, 3.11, 3.12, 3.13, and 3.14. Install it if you are building an Azure AI Hosted Agent container and need standard invocation protocol endpoints.
Install
azure-ai-agentserver-invocations on PyPI
pip
pip install azure-ai-agentserver-invocationsuv
uv add azure-ai-agentserver-invocationspoetry
poetry add azure-ai-agentserver-invocationsInstalling azure-ai-agentserver-invocations
Before you install
Low install friction with two runtime dependencies (azure-ai-agentserver-core and aiohttp). Actively maintained with a release 4 days old and recent commits; marked Production/Stable.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install azure-ai-agentserver-invocations
from azure.ai.agentserver.invocations import InvocationAgentServerHost
app = InvocationAgentServerHost()
@app.invoke_handler
async def handle(request):
data = await request.json()
return {"result": data}
app.run()
Requires Python 3.10 or later.
Verify before relying
- Whether the package is suitable for production workloads beyond the stated Azure AI Hosted Agent container use case.
- Performance characteristics under high concurrency or large message volumes on WebSocket connections.
- Specific behavior and guarantees of the distributed tracing integration with GenAI semantic conventions.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — azure-ai-agentserver-core, aiohttp |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 639,934/month — #5,614 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: azure_ai_agentserver_invocations-1.0.0-py3-none-any.whl
Keywords: azure, azure sdk, agent, agentserver, invocations
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-responsesProvides the Responses protocol endpoints for…
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-azure-aiIntegrates Azure AI Foundry memory capabilities…
permissive · top 15,000 on PyPI
agent-framework-foundry-hostingIntegrates Agent Framework agents and workflows…
permissive · top 15,000 on PyPI
openhands-agent-serverProvides a REST and WebSocket API server for…
unclear · top 5,000 on PyPI
azure-ai-projectsProvides a Python client for Microsoft Foundry…
permissive · top 5,000 on PyPI
agent-framework-foundryProvides Microsoft Foundry integrations for the…
permissive · top 15,000 on PyPI
agent-framework-azurefunctionsHosts Microsoft Agent Framework agents on Azure…
permissive · top 15,000 on PyPI
azure-ai-agentsBuild and deploy AI agents on Azure using…
permissive · top 5,000 on PyPI