You need reusable cross-cutting capabilities across many agents: correlation logging, authorization checks before tool calls, and normalized exception handling. Which design best implements this?
Select an answer to reveal the explanation.
Short Explanation
B is middleware for reusable capabilities—logging, authorization, exception handling—across the multi-agent solution. Central hooks beat copy-pasted prompt fragments and one-off prints. A drifts and cannot enforce auth uniformly. C removes security. D isn’t enterprise telemetry. Implement middleware once, apply to every agent/tool path, and emit correlation IDs.
Full Explanation
B is correct because multi-agent development includes middleware for reusable capabilities such as logging, authorization, and exception handling. Shared pipelines ensure consistent security and observability. A is incorrect: prompt-only duplication is inconsistent and unenforceable. C is incorrect: removing authorization increases risk. D is incorrect: local console logging lacks retention, access control, and cross-service correlation. Place authz checks before tool execution and map exceptions to orchestrator-safe error types.