liveBook · Manning

Agent workflow

As explained in AI Agents and Applications

An agentic workflow is a structured, multistep application process in which a large language model orchestrates predefined components within explicit boundaries and managed state.

A request may need several steps: retrieve information, judge whether it is sufficient, and then produce an answer. An agentic workflow gives those steps an explicit structure. A large language model (LLM) can choose among predefined options, while the application manages the sequence and state. This keeps decisions within boundaries that are easier to trace and reproduce. section 5.0 section 5.6

A workflow is not the same as a more autonomous agent. A workflow follows a predetermined structure, even when a condition selects a branch or sends execution back to an earlier step. An agent can dynamically choose and combine tools as its context changes. The distinction is useful, but the two patterns can overlap. section 5.1 section 5.1.3 section 5.6

Figure 5.1 Workflows and agents. Workflows use the LLM to choose the next step from a fixed set of options, such as routing a request to a SQL database or a REST API, and synthesizing the answer with the related results. Agents, however, dynamically select and combine tools to achieve their objectives.
figure

Compare a workflow’s fixed routing options with an agent’s dynamic tool selection. section 5.1

A LangGraph implementation makes the boundaries concrete:

  • Define shared data as a Python TypedDict, then create a StateGraph with that state type. Nodes read the state and return updates that accumulate across the graph. section 5.6
  • Add a node for each discrete task, such as searching, parsing, or summarizing. Connect nodes with edges; use conditional edges when runtime state determines the route. section 5.6
  • Inspect intermediate states and execution history when debugging. Checkpoints allow a run to be replayed or branched from an earlier decision. section 5.6

Research assistant

After a search, a research assistant assesses the retrieved content. If it is insufficient, the workflow routes back to search; otherwise, it proceeds to synthesis. The choice varies, but both routes are defined in advance. section 5.6

Use this pattern when a task benefits from smaller steps, previous results, external data, or persistent context. Explicit state and routing add complexity, so a simple prompt–response exchange does not automatically need a workflow. LangGraph supports stateful, graph-based execution; separating tasks into nodes can also make a workflow easier to test and extend than a linear chain. section 5.1.3 section 5.1.4 section 5.6

How AI Agents and Applications covers it

How deep it goes
Details typed state, nodes, edges, conditional routing, and checkpoint inspection rather than stopping at a definition.
Examples
Illustrates routing to a SQL database or REST API and a research assistant that searches again or synthesizes.
What it assumes
Defines workflows and agents before implementation while relying on Python functions and TypedDict for the LangGraph example.
What you can do after
Build it from scratch with LangGraph StateGraph, TypedDict state, task nodes, and edges; inspect intermediate states and checkpoints.
How it connects
Connects agentic workflows to agents, LangChain chains, LangGraph, and state management.

Also explained in

Compare how 3 books explain agent workflow →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.