Course menuAIP-C01

Exams / AIP-C01 / Building agents (Strands Agents, AgentCore Runtime, multi-agent patterns) / Question 2

AIP-C01 practice question: Building agents (Strands Agents, AgentCore Runtime, multi-agent patterns) (2 of 2)

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.

Last verified against current AWS documentation ·How we write our questions

A travel company's booking assistant helps customers plan trips that can span several weeks. Within one conversation, the assistant tracks the current trip's flights, hotels and dates. Customers also return days later and expect the assistant to remember durable preferences, such as seat type and dietary needs.

The company's requirements are three. Trip details must persist for the length of each conversation, preferences must be remembered for each customer across conversations, and no customer's preferences may ever appear in another customer's session. The team wants to write as little custom storage code as possible.

Which approach meets these requirements with the LEAST custom code?

Choose one answer.

  1. A. Use Amazon Bedrock AgentCore Memory, with short-term memory for each session's trip events and a long-term preference strategy in a per-customer namespace.
  2. B. Send the full chat transcript with every model call and trim the oldest messages once the transcript passes 4,000 words, so the model always sees recent context.
  3. C. Save each customer's preferences in one shared Amazon DynamoDB table keyed by trip ID, and scan the table at the start of each session to find matching records.
  4. D. Keep each customer's preferences in the memory of the Lambda function that handles the session, so that the function reads them on every turn without a database.
Show the answer and explanation

Answer: A

  • A. Right: Short-term memory holds the events of each session, and a long-term strategy stores preferences that persist across sessions. Namespaces per customer keep one customer's preferences out of another customer's sessions. Learn more: Amazon Bedrock AgentCore Memory (opens in a new tab)
  • B. Wrong: Trimming removes old messages, so preferences stated weeks earlier disappear. Transcripts also do not carry over to new conversations, which misses the cross-session requirement.
  • C. Wrong: Keying by trip rather than customer means preferences do not follow the customer to a new trip. Scanning a shared table also risks returning another customer's records, which breaks the isolation rule.
  • D. Wrong: Lambda memory is discarded when the execution environment is recycled, so preferences disappear unpredictably. Environments are also shared across requests, so the isolation rule is not guaranteed.

Explanation

AgentCore Memory separates short-term session events from long-term memory strategies, so trip details last for the conversation and preferences last across conversations. Namespaces per customer keep the preferences isolated, and the team writes little storage code. Transcripts, trip-keyed tables and in-process memory each fail one of the three requirements.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Building agents (Strands Agents, AgentCore Runtime, multi-agent patterns)? The 5 full-length practice sets have 6 more Building agents (Strands Agents, AgentCore Runtime, multi-agent patterns) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets