LangGraph — Local Codebase Study
Repository: langchain-ai/langgraph
Local Path: C:\Users\Adam\Desktop\agent2\langgraph\
Language: Python | License: MIT
Overview
Low-level orchestration framework for building stateful agents. The dominant graph-based agent framework as of June 2026. Used by Klarna, Replit, Elastic, and more.
Architecture
Directory Structure
langgraph/
├── docs/ — Documentation
├── examples/ — Example implementations
├── libs/ — Core library packages
├── AGENTS.md — Agent instructions (also CLAUDE.md)
└── Makefile — Build targets
Core Concepts
- Graph-based execution — Agents defined as directed graphs (nodes = functions, edges = transitions)
- Durable execution — Agents persist through failures, resume from exactly where they left off
- Human-in-the-loop — First-class interrupts at any point in execution
- Comprehensive memory — Short-term working memory + long-term persistent memory
- Subgraphs — Composable graph nesting for multi-agent architectures
Ecosystem Integration
- Deep Agents — Higher-level package for planning, subagents, filesystem use
- LangChain — Composable components and model integrations
- LangSmith — Debugging, evaluation, observability
- LangSmith Deployment — Production deployment platform
Inspirations
- Google's Pregel (graph processing)
- Apache Beam (data pipeline)
- NetworkX (public API)
Key Design Principles
- State is first-class — Every node receives and returns state
- Explicit transitions — No implicit state changes
- Checkpoint everything — Automatic persistence at every node
- Composable — Graphs can contain other graphs
Relevance to Harness Research
- Reference implementation for: graph-based state management, durable execution, human-in-the-loop interrupts
- Key patterns to adopt: checkpointing at state transitions, composable agent graphs
- Important caveat: Graph-based may be over-engineered for simple agent loops — consider as a v2 feature