Agent vs Pipeline
The most valuable judgment in agent design is knowing when not to build one. Most needs that sound agentic are actually a deterministic pipeline β a fixed sequence of steps, a couple of which happen to be model calls. The guiding rule is simple: prefer the simplest thing that works, and reach for a true agent only when nothing simpler can.

What a pipeline is
A pipeline is ordinary application code where you decide the control flow. The steps are known in advance and run the same way every time; the LLM is just one component inside a flow you wrote. LyraLearn's Tutor is the textbook example:
- Embed the learner's question.
- Retrieve the most relevant lesson chunks.
- Call the model once with that context.
- Return the grounded answer.
Every run takes that exact path. Nothing decides its own next step. This is a pipeline with a single model call β and for grounded Q&A it's the right design, not a compromise.
Why pipelines win by default
When the steps are knowable, a pipeline beats an agent on every axis that matters in production:
- Predictable β same path every time, so it's easy to test and reason about.
- Cheap β one or two model calls, not a loop of them.
- Fast β no back-and-forth turns adding latency.
- Debuggable β a fixed flow you can step through, not an emergent path that differs each run.
- Secure β a small, fixed set of actions instead of a model choosing freely.
An agent gives all of this up. You only make that trade when you're getting something real for it.
When you actually need an agent
Reach for a true agent when the task is genuinely open-ended β when the steps honestly can't be enumerated ahead of time and depend on what earlier steps reveal. Signs you've crossed that line:
- The number and order of steps vary wildly per request.
- Each step's result determines what the next step even is.
- No reasonable person could write the flowchart in advance.
A research task that branches based on what it finds qualifies. Answering "which lesson covers temperature?" does not β that's retrieval plus one call.
The honest default: start with a pipeline. Add model calls where you need judgment, keep the control flow in your code, and only escalate to an agentic loop when a real task proves a pipeline can't express it. Most never will β and that, not the loop, is the sign of good design.