Skip to content

LangChain and LangGraph in the browser: how an AI agent builds your workflow

An agent is not one big prompt. It is a graph of steps with branches, loops and a memory of where it paused. Here is how that works, with the real graph behind AWFlow's assistant.

Dannick K.
October 13, 2026 · 3 min read
PresentBoard
The agent's steps from your request through clarify, look for something similar, decide and generate to validate.
Share
On this page
  1. Chain, graph, loop: three shapes of agent
  2. The graph behind Aria
  3. Honest limits of running this in a browser
  4. See it for yourself

When you ask an AI assistant to do something real, such as build an automation from a sentence, it is tempting to picture one very clever prompt doing everything. In practice, reliable agents are built as a graph of small steps: ask a question if the request is unclear, look for something similar, decide what to do, produce a draft, check it, fix what is wrong.

This post explains the vocabulary (LangChain, LangGraph, state, checkpoint), shows the real graph behind AWFlow’s assistant, Aria, and says honestly where running such a graph inside a browser is harder than on a server.

Chain, graph, loop: three shapes of agent

Start with the names. LangChain is a toolkit of building blocks: chat models from different providers, prompts, tools and chains. LangGraph sits on top of it and adds structure for agents: you describe the steps as nodes and the allowed moves between them as edges.

The difference between a chain and a graph is the difference between a recipe and a flowchart:

In the kitchenIn an agent
A recipe: steps in a fixed order
A chain: one fixed sequence
A flowchart: if sticky, add flour
A graph: branches and loops
A bookmark where you stopped
A checkpoint: pause, then resume
"Stop after three tries"
A limit on how many repairs

A limit stops you going round forever.Loops need a bound, or an agent can retry indefinitely.

Analogy split
Text version
  1. In the kitchen: A recipe: steps in a fixed order ≈ In an agent: A chain: one fixed sequence
  2. In the kitchen: A flowchart: if sticky, add flour ≈ In an agent: A graph: branches and loops
  3. In the kitchen: A bookmark where you stopped ≈ In an agent: A checkpoint: pause, then resume
  4. In the kitchen: "Stop after three tries" ≈ In an agent: A limit on how many repairs

The simplest agent is a loop: think, act, look at the result, repeat until the goal is met. Most agents you have read about are this shape.

ThinkActObserve
GoalFind the price on this page
  1. Lap 1ThinkLook for a priceActReads the page textObserveTwo prices: €449 and €389
  2. Lap 2ThinkWhich one is current?ActReads the struck-out oneObserve€449 is the old price
  3. Answer: €389, down from €449

It stops when it has an answer.Termination on a goal check; a real loop also needs a step limit. Example run.

Loop
Text version
  1. 1. Think: Look for a price · Act: Reads the page text · Observe: Two prices: €449 and €389
  2. 2. Think: Which one is current? · Act: Reads the struck-out one · Observe: €449 is the old price
  3. Answer: €389, down from €449

A loop is flexible but loose. When a task has a known structure, such as building a workflow, you get better results by drawing the structure explicitly. That is what a graph is for.

The graph behind Aria

Aria is the assistant in AWFlow: you describe an automation and it drafts the workflow for you to review. Under the surface, that is a LangGraph graph. Here is its happy path, in order:

Your request
Clarify
Look for something similar
Decide
Generate
Validate
checks the draft against the rules

It checks the draft before showing it to you.A validate node runs the same rules as the editor and lists errors.

Pipeline
Text version
  1. Your request: "Email me when this page changes"
  2. Clarify: asks a question if unclear
  3. Look for something similar: finds an existing workflow
  4. Decide: reuse, adapt or build
  5. Generate: writes a draft workflow
  6. Validate: checks the draft against the rules

You describe it

You write what you want in plain words. Nothing has to be a command or a template.

It asks if it is unsure

If something is unclear, the graph stops and asks you a question instead of guessing.

It looks for an existing workflow

Starting from a similar workflow saves work and makes the result more reliable.

It decides how to proceed

Reuse the match, adapt it, or build something new. Reuse goes straight to checking.

It writes the draft

The assistant produces a workflow draft for the chosen route.

It checks its own work

Before you see anything, the draft is validated against the same rules as the editor.

Two parts of this graph are worth a closer look, because they are the reason to use a graph at all.

A loop with a limit

When validation finds errors, the graph does not give up and does not loop forever. It sends the draft to a repair step and validates again, up to a fixed number of times. In AWFlow that limit is three.

ValidateRepair
GoalA valid draft
  1. Lap 1Validate2 errors foundRepairFix the 2 errors
  2. Lap 2ValidateNo errorsRepairNothing to fix
  3. Valid draft, or 3 repairs used

It stops when the draft is valid, or after three repairs.The repair count is bounded so the graph always terminates. Example laps.

Loop
Text version
  1. 1. Validate: 2 errors found · Repair: Fix the 2 errors
  2. 2. Validate: No errors · Repair: Nothing to fix
  3. Valid draft, or 3 repairs used

A pause that remembers

When the graph needs an answer from you, it pauses. A checkpoint stores where it was, so that when you reply it continues from the same place instead of starting over.

You
Aria's graph
"Tell me when this page changes"
"Which page?" (paused)
"This one."
Draft ready to review

It carries on from where it stopped and shows a draft.Execution continues from the checkpoint, through validation to the proposal.

Conversation
Text version
  1. You → Aria's graph: "Tell me when this page changes"
  2. Aria's graph → You: "Which page?" (paused)
  3. You → Aria's graph: "This one."
  4. Aria's graph → You: Draft ready to review

You stay in control at the end: Aria proposes the change and you review it before anything is saved.

Tell me when the price on this page drops.
PlanCheck which page you meanFind a similar price-watch workflowAdapt it to this pageCheck the draft against the rules
I adapted a price-watch workflow to this page. Review it before saving.
Price watch · draft ready for reviewReview

You review the change before it is saved.A proposed change, applied only on approval. Example conversation.

Aria chat replay
Text version
  1. Tell me when the price on this page drops.
  2. Check which page you mean · Find a similar price-watch workflow · Adapt it to this page · Check the draft against the rules
  3. I adapted a price-watch workflow to this page. Review it before saving.
  4. Price watch · draft ready for review

Honest limits of running this in a browser

An agent graph in a browser works, and it is a good fit for AWFlow because the workflow, the data and the assistant live on your device. It is not free of trade-offs:

  • Small local models need help with tools. Cloud models have built-in tool calling. On-device models often do not, so AWFlow describes the tools in the prompt and parses the calls out of the reply. It works, but it is less robust, and it is why a graph with validation and repair matters more for local models.
  • Memory is per session. The checkpointer that lets a run pause lives in the page’s memory, so a paused run does not survive a reload.
  • Small models get structure, not freedom. For local models the generate step prefers schema-guided output, which constrains the draft to valid shapes.
Myth

A better agent just needs a bigger prompt.

Fact

Reliable agents are structure: steps, routes, a bounded repair loop and a place to pause.

The fact. Reliability comes from the graph around the model.Explicit nodes, conditional edges, bounded loops and checkpoints.

Myth vs fact
Text version
  1. A better agent just needs a bigger prompt.
  2. Reliable agents are structure: steps, routes, a bounded repair loop and a place to pause.

See it for yourself

You can watch this graph work. Switch Aria to Build mode, describe what you want, and read the draft it proposes.

The Assistant page with the composer switched to Build: the message box holds “When I press a keyboard shortcut, take the text I selected on the page, translate it into French with an on-device model, and show the translation.”, with the Chat | Build switch, the context meter and the model picker under it, and suggestion cards below. The left rail lists recent chats.The Assistant page with the composer switched to Build: the message box holds “When I press a keyboard shortcut, take the text I selected on the page, translate it into French with an on-device model, and show the translation.”, with the Chat | Build switch, the context meter and the model picker under it, and suggestion cards below. The left rail lists recent chats.

That is the whole loop: describe, review, save.Nothing is saved until you approve the proposed change.

Guided screenshot
Text version
  1. 1. Describe it: Plain words are enough.
  2. 2. Switch to Build: Aria drafts a workflow.
  3. 3. Pick the model: In your browser, or a cloud model.

Step-by-step instructions are in the Build with Aria guide.

What we covered

  1. Agents are graphs, not prompts
  2. A bounded loop repairs the draft
  3. A checkpoint lets it pause and resume

Three. A pause remembers where it stopped.An in-memory checkpointer, so a paused run lasts as long as the page.

Recap
Text version
  1. What we covered
  2. Agents are graphs, not prompts
  3. A bounded loop repairs the draft
  4. A checkpoint lets it pause and resume

Automate the web you're on. Free, in your browser.