AIP-C01 practice question: Agent safeguards (stopping conditions, timeouts, IAM boundaries, AgentCore Policy)
Implementation and Integration A free question from our original AIP-C01 practice exam. Try it, then open the answer to see why each option is right or wrong.
A logistics company runs an agent that resolves shipment exception tickets. For each ticket, the agent loops between a model and tools for carrier status, rerouting and refunds, until it decides the ticket is resolved.
Last month a carrier API began returning errors, and the agent retried for over an hour on a single ticket. Its refund tool was also called twice for the same shipment, because a retry repeated a call that had already succeeded.
The company needs two guarantees. No run may make more than eight model calls, and a run that reaches that limit must pass the ticket to a human queue with its history. No shipment may receive a refund more than once, even when the agent retries.
Which TWO actions meet these requirements? (Choose two.)
Choose two answers.
AA. Raise the AWS Lambda timeout for the agent function to 15 minutes, so that retries against the carrier API have time to succeed before the run ends.
BB. Add a counter to the agent loop that stops the run after eight model calls, and send the ticket and its full history to a human review queue.
CC. Enable model invocation logging to Amazon CloudWatch Logs, so that the team can find runaway loops and duplicate refunds after they happen and fix them.
DD. Give the refund tool an idempotency key built from the shipment ID, store processed keys, and return the earlier result for any repeat request.
EE. Increase the model's maximum output tokens so each reply can carry the full resolution plan, which lets the agent finish a ticket in a single model call.
Show the answer and explanation
Answers: B, D
A. Wrong: A longer timeout lets the loop keep retrying for longer, which increases cost and does not stop it. It also does nothing to prevent a duplicate refund.
B. Right: A hard iteration limit in the loop is a stopping condition that the model cannot override. Handing off the ticket with its history meets the escalation requirement.
C. Wrong: Invocation logs record what happened but do not stop a loop or block a duplicate call while it runs. Detection after the fact does not meet either guarantee.
D. Right: Retries that send the same key cannot create a second refund, because the tool recognizes the request it already processed. This meets the rule that no shipment is refunded more than once.
E. Wrong: Larger output limits change how much text a reply can hold, not how many calls the loop makes. The agent would still retry and could still repeat a refund.
Explanation
A hard counter in the loop stops the agent after a fixed number of model calls and escalates the ticket with its history. An idempotency key on the refund tool makes repeated requests harmless, because the second call is recognized and rejected. Longer timeouts, invocation logs and larger output limits do not stop loops or duplicate refunds.
Want more on Agent safeguards (stopping conditions, timeouts, IAM boundaries, AgentCore Policy)? The 5 full-length practice sets have 5 more Agent safeguards (stopping conditions, timeouts, IAM boundaries, AgentCore Policy) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →