1.0.0b4 (2026-05-21)
Features Added
- Error source classification headers: All HTTP error responses now include
x-platform-error-sourcewith a value ofuser,platform, orupstreamto indicate which component caused the error. Developer handler exceptions and missing handler registrations are classified asupstream. Exceptions tagged with the platform error tag are classified asplatformand additionally includex-platform-error-detailwith truncated exception details (max 2048 characters) for diagnostics. - WebSocket protocol support —
InvocationAgentServerHostnow hosts/invocations_wsalongsidePOST /invocations. Register the handler with the new@app.ws_handlerdecorator. The route is registered lazily on first decoration, so hosts without a registered handler return HTTP 404. - WebSocket Ping/Pong keep-alive — disabled by default; enable by setting the
WS_KEEPALIVE_INTERVALenv var (auto-injected by AgentService into hosted-agent containers; surfaced onapp.config.ws_ping_intervalinazure-ai-agentserver-core>=2.0.0b4).0(or unset) disables keep-alive. Wired through to Hypercorn'swebsocket_ping_intervalbyAgentServerHost._build_hypercorn_config. - WebSocket telemetry — structured close-event log line carrying
azure.ai.agentserver.invocations_ws.session_id,close_code, andduration_ms(via the standardloggingextradict). Session ID honours theFOUNDRY_AGENT_SESSION_IDenv var for HTTP/WS correlation. - New samples:
samples/ws_invoke_agent/(echo) andsamples/ws_bidirectional_streaming_agent/(concurrent token streaming with cancel/bye control messages).
Breaking Changes
- Removed the automatic
invoke_agentserver span that was created on each/invocationsrequest. Trace context propagation is now handled by the coreTraceContextMiddleware, and user-created spans inside handlers are correctly parented without framework-generated spans. - Removed
_safe_set_attrsand_wrap_streaming_responseinternal helpers (no longer needed without framework-level span management).
Other Changes
- Platform header name constants (e.g.
x-platform-error-source,x-platform-error-detail) are now imported fromazure-ai-agentserver-core(_platform_headersmodule) instead of being defined locally. Error source classification helpers remain internal to this package. - Simplified request handling: baggage entries (
invocation_id,session_id) are still set on each request, but span creation and lifecycle management are left to downstream frameworks.