Every agent in a multi-agent Azure solution must emit structured logs, enforce the caller’s authorization before tool calls, and translate certain tool exceptions into user-safe messages. The team wants these capabilities applied consistently without duplicating code inside each agent’s prompt or business logic. What should they design?
Select an answer to reveal the explanation.
Short Explanation
You should put cross-cutting concerns in middleware or shared pipeline hooks—logging, authz checks before tools, and safe exception translation—so every agent gets the same behavior without copy-paste. Natural-language-only prompt instructions, portal screenshots, and disabling controls aren't reliable enforcement or observability.
Full Explanation
Middleware or shared pipeline hooks that implement reusable logging, authorization, and exception handling across agent and tool invocations is correct. Multi-agent solutions should centralize cross-cutting capabilities so logging, authorization, and exception handling are applied consistently rather than per agent.
Unique one-off logging code pasted into each agent's system prompt in natural language only is incorrect because prompt text is not dependable enforcement for authorization or structured logging.
Manual screenshot capture of the Azure portal whenever an error might have occurred is incorrect because it does not provide automated structured observability.
Disabling logging and authorization to reduce latency under all circumstances is incorrect because removing logging and authorization trades safety and operability for latency and is not an acceptable default.
Exam focus: middleware centralizes cross-cutting multi-agent concerns.