Skip to content

AI Agents · Course resources

Notes: Understand How AI Agents Work (Models, Tools and Memory)

Review the key ideas from Understand How AI Agents Work (Models, Tools and Memory).

How the parts work together

The model interprets information and produces a response. The application determines which files and actions the model can use. Tools let an agent read information or perform a supported action, while permissions determine whether that action is allowed.

An API is the agreed route another program uses to request information or an action and receive a result. In the calendar example, software supplies the appointment details, Google Calendar creates the event when the request and permission are valid, and the returned event details make the result checkable.

Use Look, Think, Do and Check to inspect an agent's work. Look is the information used, Think is the choice made, Do is the action taken, and Check is the evidence compared with the result. These moves can repeat when a check reveals a problem.

Context, memory and an LLM

Context is the information supplied to the model for the answer it is writing now. The context window limits how much the model can work with at once. Text is counted in small pieces called tokens, which may be a word or part of a word.

Compaction shortens earlier conversation material to make room for more work, and an important detail may be omitted. The original source file remains available, so the agent can read it again. Memory keeps information for later use, such as a company instruction that applies to future client replies. A saved instruction becomes part of the current context only when the application supplies it to the model.

A large language model, or LLM, learned patterns from large amounts of language and generates a reply one token at a time using those patterns and its current context. Fluent wording does not prove that a factual claim is correct.

Match the model and application to the job

Start with the information the job needs and the result you want. The information supplied is the input, and the requested result is the output. A receipt total may need an image as input. A meeting summary may use a transcript, while a question about tone needs the audio. The model must support the required input and output, and the application must make those capabilities available.

Choose models by considering performance, the cost or plan usage of the complete job, and the full waiting time. Benchmarks can help you choose candidates, but your own checked task tells you whether a model follows the requirements that matter.

Optional model-comparison practice

For optional practice, use model comparison project and Compare 2 models on the same invoice review from this section's downloadable resources. Run the same request in 2 fresh Claude Code conversations, save both responses in the model comparison results folder inside the project (the second request excludes that folder), and use Invoice comparison answer key after both runs. Compare facts, policy decisions, drafts, waiting, corrections and the plan usage Claude Code reports.

Recognise Look, Think, Do and Check

In Daniel's reminder example, the records supply information, company rules guide the choice, a draft is the action, and the amounts and wording are checked before sending. The companion examples show the same distinctions in other jobs. You can use those worked cases or optionally apply the questions to your own work.