Building an end-to-end Coding Agent with LangGraph

Introduction

May 3, 2026 · 2 min read

This series teaches how to build a coding agent using LangGraph. I called it Axon, a terminal-native coding agent like Claude Code, Manus, Codex, etc.

The aim is to make end to end coding agent design: state, nodes, edges, tool-calling mechanism, the ReAct loop, planning, sub-agent orchestration, memory, self-correction. Each chapter implements one of these as a working feature.

What we build: Axon#

Axon is a CLI coding agent. By the end of the series it will:

  • Use tools such as: read, write, edit, and search files in any repo.
  • Ask for confirmation before destructive changes.
  • Plan multi-step tasks and execute them.
  • Spawn sub-agents that work in parallel.
  • Persist project-scoped memory across sessions.
  • Self-correct on failed tool calls.
  • Run on any consumer or a local model

Each chapter ships a runnable feature on top of a real codebase, not a notebook toy.

This is the machine we end up with a few chapters in. Click around; by chapter 3 you will have built every box yourself:

graphA preview of what we build. Click a node for role, contract, code.

Why build it from scratch?#

It's about maximum control over the state. You can use LangGraph's create_deep_agent or create_agent helper for a standard agent, but if you need your own logic inside the graph custom nodes, you need to build from scratch. LangGraph is a low-level orchestration framework and runtime for building, managing, and deploying long-running, stateful agents so it allows us to maximum control for our domain specific agent.

The stack#

  • LangGraph: state machine, everything we need to build AI agents
  • LM Studio: local LLMs to serve

Chapter map#

#ChapterWhat Axon gains
0Introduction (this post)Series scope, rules, stack
1State & GraphMinimal REPL, the agent skeleton
2Tools & ReAct LoopFilesystem read, write, search
3Human-in-the-LoopApproval question for destructive operations
4PlanningMulti-step tasks via plan-and-execute
5Sub-agents & OrchestrationParallel research and multi-file edits
6MemoryLong-term project-scoped memory across sessions
7Self-correctionReflexion + critic loop
8EvaluationTrajectory eval harness, cost dashboard

Up next: State & Graph#

Chapter 1 builds the smallest LangGraph that compiles: one node, one edge, a typed config, a working REPL. The four primitives introduced there - State, Reducer, Node, Edge - are what every later chapter extends.