Exam Room · AI Practitioner

Pop Quiz: One Prompt or an Agent

· 6 min read

Exam-style

A logistics company emails depot managers a nightly summary at 06:00. The job reads yesterday's bookings, calculates three figures (total deliveries, average delivery window, percentage on time), and writes them up with a covering paragraph. The steps have not changed in two years. A team proposes an AI agent with tools for the database, the calculations and the mailer. What should be built?

Reveal the answer

B. Fixed workflow orchestration: query the bookings, compute the three figures in code, one model call for the covering paragraph, then email it

Every step of this job is known before it starts. Workflow orchestration runs a scheduled query, three calculations in code, one model call for the covering paragraph, one send. The model call count is fixed, so the nightly bill is too. The arithmetic comes from a database. A wrong figure can be traced step by step. Agents suit the other situation, where nobody can write the steps down in advance. An agent is a foundation model given a goal and tool definitions. It emits a tool request, the loop invokes that tool and returns the result, and the sequence emerges as it goes. Amazon Bedrock AgentCore is the managed platform for running one. Over a settled sequence the loop still runs, at a bill that varies. Two agents add a second loop. A night of bookings in the context window means paying input tokens for what a SUM does, and it hands the arithmetic to the least reliable component available. Sending needs a tool, and once that tool exists the job is the workflow. Retrieval Augmented Generation finds passages nobody could name in advance. Last night’s bookings are the rows a date-filtered query returns.

AI Fundamentals · part of The Exam Room

Q. A nightly report pulls yesterday’s bookings, works out three fixed figures, writes them up and emails them at 06:00, unchanged for two years. Build it as an agent?

A. No. Build it as ordinary workflow orchestration: a scheduled query, the three calculations in code, one model call for the covering paragraph, one send.

Why? AI agents are for tasks whose steps nobody can write down before the request arrives. The model emits a tool request. The loop invokes it, and the sequence emerges from what each step returned. Amazon Bedrock AgentCore is the managed platform for running one, with a runtime, a gateway that turns existing APIs into tools, memory and traces. Point it at a job settled two years ago and the loop still runs, adding model calls to reach an order the schedule already fixed, at a bill that varies night to night. A fixed sequence costs the same every run, and code and a database get the arithmetic right. One long prompt with the bookings in context means paying input tokens for what a SUM does, and sending still needs a tool, which is the workflow. Retrieval Augmented Generation finds the passages nobody could name in advance; a date-filtered query over last night’s rows is not a search.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.