AI Primer

Agentic AI · Module 20

From language model to agent

An agent is an LLM wrapped in a loop that can use tools, maintain memory, plan, and execute multi-step work.

Tools

The agent can call code: search the web, run a SQL query, send an email, control a browser, edit files.

Memory

Short-term scratchpad for the current task; long-term store of prior decisions and learned patterns.

Planning

The agent decomposes a goal into steps, executes, observes the result, and revises the plan as needed.

Applied frame

Convert capability into a bounded work loop with tools, memory, permits, review, and audit.

Diagram cue

The diagram keeps autonomy wrapped in observable control points.

Language-model agent loop connecting model, tools, memory, and feedback
Tools and feedback turn language generation into bounded action.
From language model to agent animated explainer
Owned Edwy animated explainer for From language model to agent.

A language model becomes an agent when connected to tools and feedback. Key motion beats: model, tools, memory, feedback.

From model to agent loop demo

A local toy loop that logs the plan, act, observe, and review steps named in this module.

const steps = ['plan', 'act', 'observe', 'review'];
for (const step of steps) {
  console.log('agent loop:', step);
}
Run the demo to see sandboxed console output.

Agent loop check

0 of 1 questions completed locally.

1. Name one failure mode when an agent skips the observe or review step.

Answer feedback appears here.

Reader progress is stored locally in this browser.

Source slide 21