Skip to content
GoLangGraph Logo

πŸš€ GoLangGraph

Build Intelligent AI Agent Workflows with Go


  • πŸš€ Quick Start


    Get up and running with GoLangGraph in minutes. Build your first AI agent workflow with just a few lines of code.

    Getting Started

  • πŸ“Š Graph Workflows


    Design AI workflows as directed graphs. Each node represents a computational unit, edges define execution flow.

    Learn More

  • πŸ’Ύ Persistence


    Built-in support for PostgreSQL, Redis, and memory-based persistence. Perfect for stateful applications.

    Persistence Guide

  • πŸ”§ Examples


    Comprehensive examples showing real-world usage patterns with Ollama and other LLM providers.

    View Examples

🎯 What is GoLangGraph?¢

GoLangGraph is a Go framework for building AI agent workflows with graph-based execution. It provides a clean, type-safe API for creating intelligent agents that can reason, use tools, and execute complex workflows.

πŸ’‘ Perfect for: Building AI applications with local LLMs like Ollama, creating RAG systems, and developing intelligent automation tools.

✨ Key Features¢

  • πŸš€ Graph-Based Execution


    Design workflows as directed graphs with nodes and edges. Build complex logic with simple, composable components.

  • πŸ”„ State Management


    Thread-safe state containers with persistence options. Maintain workflow state across executions.

  • πŸ€– AI Agent Framework


    Built-in support for Chat, ReAct, and Tool agents. Easy integration with multiple LLM providers.

  • πŸ—„οΈ Database Integration


    Native support for PostgreSQL, Redis, and memory-based persistence. Checkpointing and session management.

  • πŸ”§ Built-in Tools


    Comprehensive tool library including calculator, web search, file operations, and more.

  • ⚑ High Performance


    Optimized for production workloads with Go's native concurrency and comprehensive testing.

  • πŸ”’ Type Safety


    Full Go type safety with comprehensive error handling. Catch issues at compile time.

  • 🐳 Production Ready


    Docker support, comprehensive testing, and everything you need for production deployment.

πŸƒ Quick ExampleΒΆ

package main

import (
    "context"
    "fmt"
    "log"

    "github.com/piotrlaczkowski/GoLangGraph/pkg/agent"
    "github.com/piotrlaczkowski/GoLangGraph/pkg/llm"
    "github.com/piotrlaczkowski/GoLangGraph/pkg/tools"
)

func main() {
    // Create LLM provider manager
    llmManager := llm.NewProviderManager()

    // Add Ollama provider
    provider, err := llm.NewOllamaProvider(&llm.ProviderConfig{
        Endpoint: "http://localhost:11434",
        Model:    "gemma3:1b",
    })
    if err != nil {
        log.Fatal(err)
    }
    llmManager.RegisterProvider("ollama", provider)

    // Create tool registry
    toolRegistry := tools.NewToolRegistry()

    // Create agent
    config := &agent.AgentConfig{
        Name:         "chat-agent",
        Type:         agent.AgentTypeChat,
        Model:        "gemma3:1b",
        Provider:     "ollama",
        SystemPrompt: "You are a helpful AI assistant.",
        Temperature:  0.7,
    }

    chatAgent := agent.NewAgent(config, llmManager, toolRegistry)

    // Execute
    ctx := context.Background()
    execution, err := chatAgent.Execute(ctx, "Hello! Tell me about Go programming.")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("πŸ€– Agent: %s\n", execution.Output)
}

πŸ—οΈ Architecture OverviewΒΆ

graph TB
    A[πŸ‘€ User Input] --> B[πŸ€– Agent]
    B --> C[πŸ“Š Graph Execution]
    C --> D[πŸ”„ Node Processing]
    D --> E[🌐 LLM Provider]
    D --> F[πŸ”§ Tools]
    D --> G[πŸ’Ύ State Management]
    G --> H[πŸ—„οΈ Persistence Layer]
    H --> I[πŸ“Š Database]
    E --> J[✨ Response]
    F --> J
    J --> K[πŸ‘€ User Output]

    style A fill:#e1f5fe
    style K fill:#e8f5e8
    style B fill:#fff3e0
    style C fill:#f3e5f5
    style G fill:#fce4ec

🎯 Use Cases¢

  • πŸ€– AI Agents


    Build intelligent agents that can reason, plan, and execute tasks using various LLM providers.

  • πŸ” RAG Applications


    Create Retrieval-Augmented Generation systems with database integration for knowledge retrieval.

  • 🀝 Multi-Agent Systems


    Design workflows where multiple specialized agents collaborate to solve complex problems.

  • πŸ“Š Data Processing


    Build intelligent data processing workflows that can adapt and make decisions based on content.

  • πŸ› οΈ Automation


    Create smart automation systems that can handle exceptions and make intelligent decisions.

🌟 Community & Support¢

  • ⭐ GitHub


    Star the project, report issues, and contribute to the codebase. Join our growing community!

    GitHub Repository

  • πŸ“š Documentation


    Comprehensive guides, examples, and API reference to help you build AI workflows.

    Browse Docs

  • πŸ› Issues


    Report bugs, request features, and get help from the community. We're here to help!

    Report Issue

  • πŸ’¬ Discussions


    Join discussions about features, usage patterns, and best practices with other developers.

    Join Discussions

πŸš€ Why Choose GoLangGraph?ΒΆ

  • ⚑ Performance


    Built with Go's performance and concurrency in mind. Optimized for production workloads.

  • πŸ‘¨β€πŸ’» Developer Experience


    Clean, intuitive API with excellent error handling and debugging tools. Comprehensive examples.

  • 🏭 Production Ready


    Comprehensive test coverage, CI/CD pipelines, and production deployment examples.

  • πŸ”§ Extensible


    Easy to extend with custom tools, LLM providers, and persistence backends.

  • πŸ”’ Secure


    Built-in security features including input validation and secure credential handling.

  • 🌍 Open Source


    MIT licensed with an active community. Contribute, customize, and build upon our foundation.


πŸš€ Ready to Build Your First AI Agent?

Get started with GoLangGraph today and build intelligent AI workflows with Go!

[Get Started Now!](getting-started/quick-start.md){ .md-button .md-button--primary } [View Examples](examples/ollama-integration.md){ .md-button } [GitHub Repository](https://github.com/piotrlaczkowski/GoLangGraph){ .md-button }

🌟 Built with ❀️ by the GoLangGraph Team

⭐ Star us on GitHub β€’ πŸ› Report Bug β€’ πŸ’¬ Request Feature