# tmc/langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go

Repository: https://github.com/tmc/langchaingo
Canonical: https://ross.abutalabs.com/products/langchaingo
Homepage: https://tmc.github.io/langchaingo/
Language: Go
License: MIT
License Family: permissive
Topics: ai, go, golang, langchain
Last push: 2026-01-11T16:59:56+00:00

## Health v2 (maintenance only)
Score: 53/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 61, release rhythm 21, longevity 92
- inputs: {"age_days": 1292, "days_push": 234, "days_rel": 317, "gap_med": 245, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9637, forks 1139 (observed 2026-08-28T04:10:36.477960+00:00)

## What it is
Langchaingo is the Go language port of LangChain, providing composable building blocks for writing LLM-powered applications in Go. It offers integrations with providers like OpenAI, Gemini, and Ollama for generation, chains, agents, and retrieval workflows.

## Use cases
- build llm apps in go
- create a chatgpt clone in golang
- call openai from go
- use ollama with go
- build rag pipelines in go
- write llm agents in go
- use gemini models from go

## When to choose
- you are building LLM-based applications in Go and want composable abstractions
- you need multi-provider LLM support (OpenAI, Gemini, Ollama) behind one API
- you want a LangChain-style ecosystem (chains, agents, embeddings) natively in Go

## When to avoid
- you are working in Python or JavaScript where the original LangChain has a larger ecosystem
- you need only a single provider's SDK with no abstraction layer
- you need cutting-edge LangChain features that may lag behind the Python version

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, agent-framework, rag, chatbot, prompt-engineering, sdk
- domain: large-language-models, artificial-intelligence, developer-tools
- platform: go, cross-platform
- tags: langchain, llm, golang, composable-llm-apps, openai, ollama, gemini, ai-agents, retrieval-augmented-generation

## Member repositories
- tmc/langchaingo (main) score 53

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:36.477960+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:21:20.744494+00:00, confidence not recorded.
  - readme: https://github.com/tmc/langchaingo (fetched 2026-08-28T04:10:36.477960+00:00, sha 318b5ee3f932)
- Data as of 2026-08-30T08:39:29.467469+00:00.
