--- id: azure-ai-agentserver-invocations version: "1.0.0" license: MIT license_treatment: permissive maintenance: active --- # azure-ai-agentserver-invocations — Invocations protocol for Azure AI Hosted Agents License: permissive · Maintenance: active · Downloads: 639.9K/mo ## 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 above — 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 pip install azure-ai-agentserver-invocations uv add azure-ai-agentserver-invocations 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_current - Install friction: low - Maintenance: active - Downloads: 639.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags azure agent server invocations, agent invocation protocol http websocket, azure hosted agent endpoints, agent request handling framework, azure ai agent container protocol, azure-sdk, agent-framework, async-http [View on SkillFed](https://skillfed.io/packages/azure-ai-agentserver-invocations) · [View on PyPI](https://pypi.org/project/azure-ai-agentserver-invocations/)