Question 200
A customer deploys an SDK-based agent with shell access and needs evidence every executed command came from an approved task. Which development or architectural response BEST addresses the primary requirement?
Explanation
Correct Answer
Build an Agent SDK workflow using explicitly authorized tools, controlled session state and inspected execution events rather than treating the SDK as automatic policy enforcement. An Agent SDK manages orchestration plumbing but developers still own tool authorization, state scope, and failure handling. Verify the prerequisites with: Inspect available tool registrations, session identifiers, permissions, turn events, and tool-result provenance. Situation: A customer deploys an SDK-based agent with shell access and needs evidence every executed command came from an approved task.
Incorrect Answers
Use deterministic lifecycle hooks for mandatory logging, validation and policy checks instead of relying on a prompt asking the model to remember them. This response is designed for Hooks for non-model lifecycle actions; it is not the controlling fix in the situation. Deterministic hooks are reliable for guardrails only when placed on the relevant execution path with fail-closed semantics. Here the targeted response is: Build an Agent SDK workflow using explicitly authorized tools, controlled session state and inspected execution events rather than treating the SDK as automatic policy enforcement. Situation: A customer deploys an SDK-based agent with shell access and needs evidence every executed command came from an approved task.
Define explicit success checks, maximum tool iterations, spending limits, and stop/escalation reasons before running a goal-directed loop. This response is designed for Agent state and stopping criteria; it is not the controlling fix in the situation. Open-ended loops require observable termination conditions; an assistant saying done is not proof of the external state. Here the targeted response is: Build an Agent SDK workflow using explicitly authorized tools, controlled session state and inspected execution events rather than treating the SDK as automatic policy enforcement. Situation: A customer deploys an SDK-based agent with shell access and needs evidence every executed command came from an approved task.
Evaluate Strands, LangGraph or PydanticAI based on state semantics, async execution, graph control and deployment needs, rather than picking a framework by popularity. This response is designed for Agent framework selection and abstraction leaks; it is not the controlling fix in the situation. Framework selection should follow control-flow and lifecycle requirements; a named framework does not inherently ensure safety or correctness. Here the targeted response is: Build an Agent SDK workflow using explicitly authorized tools, controlled session state and inspected execution events rather than treating the SDK as automatic policy enforcement. Situation: A customer deploys an SDK-based agent with shell access and needs evidence every executed command came from an approved task.

