skillfed

azure-ai-agentserver-invocations

Invocations protocol for Azure AI Hosted Agents

azure-ai-agentserver-invocations v1.0.0 639.9K downloads/30d#5,614 on PyPI5,588
Permissive license MIT Active released

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

uv

uv add azure-ai-agentserver-invocations

poetry

poetry add azure-ai-agentserver-invocations

Installing 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

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 agent server invocationsagent invocation protocol http websocketazure hosted agent endpointsagent request handling frameworkazure ai agent container protocol
azure-sdkagent-frameworkasync-http

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

Provides the Responses protocol endpoints for…

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

Integrates Azure AI Foundry memory capabilities…

permissive · top 15,000 on PyPI

agent-framework-foundry-hosting

Integrates Agent Framework agents and workflows…

permissive · top 15,000 on PyPI

openhands-agent-server

Provides a REST and WebSocket API server for…

unclear · top 5,000 on PyPI

azure-ai-projects

Provides a Python client for Microsoft Foundry…

permissive · top 5,000 on PyPI

agent-framework-foundry

Provides Microsoft Foundry integrations for the…

permissive · top 15,000 on PyPI

agent-framework-azurefunctions

Hosts Microsoft Agent Framework agents on Azure…

permissive · top 15,000 on PyPI

azure-ai-agents

Build and deploy AI agents on Azure using…

permissive · top 5,000 on PyPI

Further reading