The way I draw the line is to focus on the "agency" aspect.
In workflows/pipelines the "agency" belongs to the coder/creator of the workflow. It usually resembles something like a "list of steps" or "ittt". Examples include traditional "research" flows like 1. create search terms for query; 2. search; 3. fetch_urls; 4. summarise; 5. answer
In agents the "agency" belongs, at one point or another, to the LLM. It gets to decide what to do at some steps, based on context, tools available, and actions taken. It usually resembles a loop, without predefined steps (or with vague steps like "if this looks like a bad answer, retry" - where bad answer can be another LLM invocation w/ a specific prompt). Example: Fix this ticket in this codebase -> ok, first I need to read_files -> read_files tool call ... and so on.
In the research workflow example, what if the first set of search queries don’t return good results. If the LLM tool loop decides to refine the queries, would this be “agency”?
I'd say so, yeah. If the LLM "decides" what steps to take, that's an agent. If the flow is "hardcoded" then it's a workflow/pipeline. It often gets confused because early frameworks called these workflows/pipelines "agents".
I see, that's a good way to think about it