Multiple specialist agents and tools in your Azure multi-agent solution need the same cross-cutting behaviors: structured logging with correlation IDs, authorization checks before tool execution, and consistent exception handling. Duplicating this logic in every agent is causing drift. What should you implement?
Select an answer to reveal the explanation.
Short Explanation
Correct answer: B. Middleware for reusable logging, authorization, and exception handling keeps multi-agent solutions consistent and maintainable. Copy-paste drift (A), no production logs (C), and cluster restarts as error handling (D) are poor practice. Centralize cross-cutting concerns in the orchestration host or shared libraries.
Full Explanation
AI-500 development skills include designing middleware for reusable capabilities across the solution, including logging, authorization, and exception handling. In multi-agent systems, every tool invocation is a security and observability event; middleware can enforce allowlists, inject correlation IDs, redact secrets, translate exceptions into control-flow decisions, and emit metrics. Option A guarantees inconsistent security. Option C blinds operations. Option D is indiscriminate and slow. Implement middleware once, unit-test it, and ensure new agents inherit the same pipeline when registered.