Build Stateful, Multi-Agent
LLM Applications

Built on LangChainGo, a Go library for developing stateful, multi-actor LLM applications.

Simple Yet Powerful

Build powerful AI Agents with just a few lines of code

main.go
package main

import (
    "context"
    "fmt"
    "github.com/smallnest/langgraphgo/graph"
)

func main() {
    // Create state graph
    g := graph.NewStateGraph[string]()

    // Add processing node
    g.AddNode("process", "process", func(ctx context.Context, input string) (string, error) {
        return fmt.Sprintf("processed_%s", input), nil
    })

    // Add edge and end point
    g.AddEdge("process", graph.END)
    g.SetEntryPoint("process")

    // Compile and execute
    runnable, _ := g.Compile()
    result, _ := runnable.Invoke(context.Background(), "input")

    fmt.Printf("Result: %s\n", result)
    // Output: Result: processed_input
}

Why Choose LangGraphGo?

Everything you need to build production-grade agents.

Graph Workflows

Define your application flow as a graph of nodes and edges, supporting cycles and complex interactions.

State Management

Built-in persistence layer for saving and restoring state, enabling long conversations and memory.

Multi-Agent Support

Easily orchestrate multiple agents working together to solve complex tasks.

Go Native

Idiomatic Go implementation leveraging goroutines and channels for high-performance concurrent execution.

Time Travel

Inspect, modify, and replay agent actions with advanced checkpointing capabilities.

Streaming Support

Stream agent outputs in real-time for responsive user interfaces.

Generic Types

Type-safe state management with compile-time error checking.

Programmatic Tool Calling (PTC)

LLM generates code to call tools directly, reducing latency and token usage by 10x.

MCP Protocol Support

Supports Model Context Protocol, integrates with Claude Skills ecosystem.

File Checkpointing

Lightweight file-based persistence without external dependencies.

RAG Support

Built-in Retrieval Augmented Generation with vector stores and knowledge graphs (GraphRAG).

17+ Agent Architectures

ReAct, Supervisor, Planning, Reflection, Tree of Thoughts, and more prebuilt patterns.

9 Memory Strategies

Buffer, sliding window, summarization, hierarchical, graph-based, and more.

Search Tool Integration

Built-in support for Tavily, Exa, Brave, and other major search engines.

Human-in-the-Loop

Supports interrupts, approvals, time travel, and other human-in-the-loop workflows.

Subgraph Orchestration

Supports graph nesting for modular, multi-level workflow composition.