The agent loop is powerful and expensive. An agentic workflow is the production compromise: a mostly explicit pipeline (Vol. 14 Haystack / LangChain / LangGraph) with agentic nodes only where the next hop is genuinely unknown. This lecture is how AI engineers stop turning every FAQ into an unbounded ReAct spiral.
It also sets up the last three lectures: when one single agent node is enough, when a multi-agent subgraph helps, and where HITL gates live on the graph.
Learning Objectives
By the end of this lesson, students should be able to:
- Define agentic workflow vs fully free agent vs fully deterministic pipeline.
- Choose the control style using risk, variability, and SLA constraints.
- Sketch a hybrid graph: retrieve → (optional agent) → validate → write.
- Explain why most enterprise “agents” should be workflows with agentic pockets.
- Map Haystack/LangChain DAGs and LangGraph cycles onto this spectrum.
- Avoid marketing “agentic” as a synonym for “uses an LLM.”
An agentic workflow is an application whose overall control flow is an explicit graph or pipeline, but one or more nodes may invoke an LLM agent loop (plan, tools, limited steps) before returning structured results to the next deterministic step. Agency is localized, not global.
Three Control Styles
| Style | Who routes? | Predictability | Example |
|---|---|---|---|
| Deterministic workflow | Developer DAG | Highest | Haystack RAG FAQ |
| Agentic workflow | Graph + local agent nodes | Medium | Retrieve → research agent → schema check → ticket |
| Free agent | Model + halt rules only | Lowest | Open-ended coding assistant |
Hybrid Graph Sketch
Keep writes and schema validation outside the free loop. Let the agent only explore (search, compare, draft). That preserves autonomy bounds while still using tools.
How to Choose
Stay deterministic
- Stable FAQ / RAG
- Hard latency SLAs
- Regulated exact wording
Agentic pocket
- Variable research hops
- Need tools, then a schema
- Writes stay outside the loop
Free agent
- Open-ended goals
- Sandbox only
- Human watching or tight caps
Strengths
- Debuggable topology
- Lower average cost than free loops
- Fits Vol. 14 skills
- Natural HITL edges
Tradeoffs
- More design up front
- Can over-graph simple chats
- Agent nodes still need budgets
- Classification errors route wrong
“Agentic means we deleted the workflow and let the model run the company.” In serious systems, agentic means the opposite: you kept the workflow and leased a few steps to a bounded loop. If you cannot draw the graph, you do not have a workflow—you have a hope.
Knowledge Check
- Short Answer: Define agentic workflow in one sentence. Answer: An explicit pipeline/graph with localized agent loops at some nodes.
- True/False: Every LLM app is an agentic workflow. Answer: False.
- Multiple Choice: Writes in the sketch happen: (a) inside unbounded ReAct, (b) after validate / maybe_ticket, (c) in CSS. Answer: (b).
- Short Answer: When should you stay fully deterministic? Answer: Stable RAG/FAQ, hard SLAs, regulated wording (any fair answer).
- True/False: Haystack pipelines are closer to deterministic workflows than free agents. Answer: True.
- Multiple Choice: LangGraph is especially useful here because: (a) it themes HTML, (b) it can mix deterministic edges with cyclic agent nodes, (c) it trains CNNs. Answer: (b).
- Short Answer: Why classify before the agent node? Answer: Avoid paying for a free loop on simple questions.
- Short Answer: Name a risk of hybrid graphs. Answer: Mis-routing, leftover unbounded nodes, or over-engineering (any).
- Multiple Choice: Free agents fit best when: (a) goals are open-ended and sandboxed, (b) invoices must match a template exactly, (c) you need 20ms p99. Answer: (a).
- True/False: Agentic nodes still need step budgets. Answer: True.
Key Takeaways
- Agentic workflows localize agency inside an explicit graph—usually the right production shape.
- Deterministic RAG remains best for stable Q&A; free agents for open sandbox goals.
- Keep writes and validators outside unbounded loops.
- Vol. 14 orchestration + Vol. 15 loops combine here.
- Next: single-agent design for those agentic nodes.
Whiteboard: Take an internal “research then file Jira” process. Draw deterministic vs agentic vs free. Circle the write.
Lab: Add a classifier feature flag: force needs_agent=False and compare cost/quality on 20 FAQ prompts.
Recap: Prefer workflows with agentic pockets. Continue with Single Agent.