← Table of Contents · Page 510 of 868

SURVEY OF AGENT FRAMEWORKS

Part 3 of 11

GRAPH-BASED ORCHESTRATION FRAMEWORKS FOR STATEFUL, CYCLIC AGENTS The first family describes an agent as a graph. A graph, in this sense, is not a chart with bars and lines. It is a drawing made of boxes connected by arrows. Each box is called a node, and each node is one step of work, such as calling the model, running a tool, or checking a result. Each arrow is called an edge, and it shows which step can come next. Think of a subway map. The stations are nodes, the tracks are edges, and a train can follow different routes depending on where it needs to go. Some edges are conditional, which means the next step is chosen based on what just happened. For example, after the model replies, one edge might lead to a tool-running node if the model asked for a tool, and another edge might lead to the finish if the model gave a final answer. Graphs are well suited to agents because agents need two features that simple straight-line programs lack. The first feature is cycles, which are loops where an arrow leads back to an earlier node. An agent loop is naturally a cycle, because after using a tool the agent returns to ask the model again. The second feature is state, which is the information carried along from step to step, such as the messages so far and the results gathered. A graph-based framework usually defines a shared state object that every node can read and update. Many such frameworks can also save that state at checkpoints, which are snapshots taken during a run. Checkpoints connect to the lifecycle ideas of Part Six, because they let a run pause for a human decision and later resume exactly where it stopped. One widely known example of this family is LangGraph, which lets a developer describe agent logic as nodes and edges with persistent state. The main strength of this family is explicitness. You can see the control flow in the graph, and you can test each node separately. The main cost is that you must think in terms of graphs, which takes some learning, and a simple agent may feel over-engineered when drawn this way.
Advertisement
Read Aloud:
0:00 / 0:00