LyraLearn AI Learning Platform
Exams
← Module 9 Β· Agent Design Patterns
🎧 Listen

What Is an Agent

The word "agent" gets stretched to mean almost anything that uses an LLM. A precise definition keeps you out of trouble: an agent is an LLM running in a loop, given a goal and a set of tools, that decides its own next steps instead of following a script you wrote in advance.

Diagram defining an agent as a model in a loop combining a goal and tools, contrasted with a scripted fixed path.

The three ingredients

Strip away the hype and an agent is just three things working together:

Remove any one and it stops being an agent. No tools and it's just a chat completion. No loop and it's a single call. No goal β€” just a fixed sequence β€” and it's a pipeline (more on that later).

Who decides the steps

The defining trait is who chooses the next action. In ordinary application code, you decide the control flow: your C# determines what happens after each step. In an agent, the model decides β€” it might call one tool, then decide based on the result whether to call another, retry, or declare the goal met. The path through the work isn't known until it runs.

That flexibility is the whole point and the whole risk. An agent can handle tasks whose steps you couldn't enumerate ahead of time. It can also wander, loop, burn tokens, or take an action you never intended β€” because you handed control flow to a probabilistic component.

Where LyraLearn lands

It's worth being honest about your own system. LyraLearn's AI Tutor is not an agent. When a learner asks a question, the flow is fixed and known in advance: embed the question, retrieve the most relevant lesson chunks, call the model once with that context, return the grounded answer. The model never chooses the next step β€” we wrote the steps. That makes it a deterministic pipeline with one model call, which is exactly the right design for grounded Q&A: predictable, cheap, and easy to reason about.

Knowing this distinction is the real skill. Most enterprise needs look agentic but are better served by a pipeline. Reach for a true agent only when the task is genuinely open-ended β€” when the steps honestly cannot be known until the work is underway.

🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.