# Chains, Agents and Workflows — LangGraph Agents & Multi-Agent Systems

Source: https://www.geekswithgeeks.com/en/langgraph-agents/i-why

> Place graphs between rigid chains and free-running agents.

## Control versus autonomy

A **chain** runs fixed steps in a fixed order: predictable but unable to loop or adapt. A fully **autonomous agent** lets the model decide every step: flexible but hard to predict, test and bound. Most real applications need something in between: mostly known structure with a few decisions, loops and pauses. A **workflow graph** gives exactly that: you define the possible steps and transitions, and the model (or plain code) chooses among them at runtime. Anthropic's and others' guidance is to prefer the simplest design that works, and add agent-style autonomy only where the path genuinely cannot be fixed in advance.

## State flows through nodes

A graph makes an agent's control flow explicit: nodes do work, edges decide what is next, state carries data.

![Four parts: state, nodes, edges, runtime.](assets/figures/langgraph-agents/section-1-map.svg) — Figure 1.1 — State, nodes, edges and runtime.

## Where graphs fit

A rough spectrum from rigid to free.

```text
Chain            fixed steps A -> B -> C                    predictable, no loops
Workflow graph   known nodes, model/code picks the edge    loops, branches, pauses, resumable
Autonomous agent model picks every action in a loop         flexible, hardest to bound and test

Start at the left; move right only when the task truly needs it.
```

## Ask: could this be a chain?

If you can write the steps down in order without "it depends", use a chain. Reach for a graph when you find loops, branches or approvals.

**Quiz:** What does a workflow graph offer over a plain chain?

- [ ] Free tokens
- [ ] A bigger model
- [x] Branches, loops and pauses with explicit control flow
- [ ] No need for state

*Answer:* Branches, loops and pauses with explicit control flow. Graphs express non-linear flows while keeping them inspectable.
