LangGraphGo Examples

January 17, 2026 ยท View on GitHub

This directory contains 85+ examples demonstrating the features of LangGraphGo.

Table of Contents


Basic Concepts

State Management

  • State Schema - Managing complex state updates with Schema and Reducers
  • Custom Reducer - Defining custom state reducers for complex merge logic
  • Smart Messages - Intelligent message merging with ID-based upserts
  • Command API - Dynamic control flow and state updates from nodes
  • Configuration - Using runtime configuration to pass metadata and settings

Graph Structure & Routing

Parallel Execution

Streaming & Events

Persistence (Checkpointing)

Human-in-the-Loop

Pre-built Agents

Core Agent Patterns

Planning & Reasoning Agents

Multi-Agent Systems

  • Supervisor - Multi-agent orchestration using a supervisor pattern
  • Swarm - Multi-agent collaboration using handoffs

Chat Agents

Programmatic Tool Calling (PTC)

Programmatic Tool Calling reduces latency by ~10x by having the LLM generate code instead of structured tool outputs.

Memory

Conversation memory strategies for maintaining context across sessions.

RAG (Retrieval Augmented Generation)

Basic RAG

Advanced RAG

RAG with Vector Stores

GraphRAG (Knowledge Graph)

Tools & Integrations

Search Tools

Other Integrations

Advanced Patterns


Running Examples

Most examples can be run directly:

cd examples/<example_name>
go run main.go

Some examples may require additional setup:

  1. API Keys: Search tools (Tavily, Exa, Brave) require API keys
  2. Databases: FalkorDB examples require FalkorDB to be running
  3. Vector Stores: Chroma examples require Chroma DB to be running
  4. Redis: Some checkpointing examples require Redis

Example Categories

CategoryCountDescription
Basic Concepts3Getting started examples
State Management5State schema and reducers
Graph Structure7Routing, subgraphs, generics
Parallel Execution2Concurrent execution patterns
Streaming & Events7Real-time data flow
Persistence4Checkpointing and recovery
Human-in-the-Loop5Interactive workflows
Pre-built Agents18Ready-to-use agent patterns
PTC4Programmatic tool calling
Memory6Conversation memory strategies
RAG22Retrieval-augmented generation
Tools & Integrations6External service integrations
Advanced1Visualization and debugging
Total85+Comprehensive examples