{"data":{"slug":"tmc-langchaingo","name":"langchaingo","tagline":"LangChain for Go, the easiest way to write LLM-based programs in Go","github_url":"https://github.com/tmc/langchaingo","owner":"tmc","repo":"langchaingo","owner_avatar_url":"https://avatars.githubusercontent.com/u/3977?v=4","primary_language":"Go","stars":9527,"forks":1118,"topics":["ai","go","golang","langchain"],"archived":false,"github_pushed_at":"2026-01-11T16:59:56+00:00","maintenance_label":"Slowing","url":"https://www.graphcanon.com/tools/tmc-langchaingo","markdown_url":"https://www.graphcanon.com/tools/tmc-langchaingo.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/tmc-langchaingo","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=tmc-langchaingo","description":"LangChain for Go, the easiest way to write LLM-based programs in Go","homepage_url":"https://tmc.github.io/langchaingo/","license":"MIT","open_issues":404,"watchers":76,"ai_summary":"A Go language implementation of LangChain that simplifies the process of incorporating Large Language Model (LLM) applications into Go projects through composability.","readme_excerpt":"> 🎉 **Join our new official Discord community!** Connect with other LangChain Go developers, get help and contribute: [Join Discord](https://discord.gg/t9UbBQs2rG)\n\n# 🦜️🔗 LangChain Go\n\n\n\n\n\n[<img src=\"https://github.com/codespaces/badge.svg\" title=\"Open in Github Codespace\" width=\"150\" height=\"20\">](https://codespaces.new/tmc/langchaingo)\n\n⚡ Building applications with LLMs through composability, with Go! ⚡\n\n## 🤔 What is this?\n\nThis is the Go language implementation of [LangChain](https://github.com/langchain-ai/langchain).\n\n## 📖 Documentation\n\n- [Documentation Site](https://tmc.github.io/langchaingo/docs/)\n- [API Reference](https://pkg.go.dev/github.com/tmc/langchaingo)\n\n\n## 🎉 Examples\n\nSee [./examples](./examples) for example usage.\n\n```go\npackage main\n\nimport (\n  \"context\"\n  \"fmt\"\n  \"log\"\n\n  \"github.com/tmc/langchaingo/llms\"\n  \"github.com/tmc/langchaingo/llms/openai\"\n)\n\nfunc main() {\n  ctx := context.Background()\n  llm, err := openai.New()\n  if err != nil {\n    log.Fatal(err)\n  }\n  prompt := \"What would be a good company name for a company that makes colorful socks?\"\n  completion, err := llms.GenerateFromSinglePrompt(ctx, llm, prompt)\n  if err != nil {\n    log.Fatal(err)\n  }\n  fmt.Println(completion)\n}\n```\n\n```shell\n$ go run .\nSocktastic\n```\n\n# Resources\n\nJoin the Discord server for support and discussions: [Join Discord](https://discord.gg/8bHGKzHBkM)\n\nHere are some links to blog posts and articles on using Langchain Go:\n\n- [Using Gemini models in Go with LangChainGo](https://eli.thegreenplace.net/2024/using-gemini-models-in-go-with-langchaingo/) - Jan 2024\n- [Using Ollama with LangChainGo](https://eli.thegreenplace.net/2023/using-ollama-with-langchaingo/) - Nov 2023\n- [Creating a simple ChatGPT clone with Go](https://sausheong.com/creating-a-simple-chatgpt-clone-with-go-c40b4bec9267?sk=53a2bcf4ce3b0cfae1a4c26897c0deb0) - Aug 2023\n- [Creating a ChatGPT Clone that Runs on Your Laptop with Go](https://sausheong.com/creating-a-chatgpt-clone-that-runs-on-your-laptop-with-go-bf9d41f1cf88?sk=05dc67b60fdac6effb1aca84dd2d654e) - Aug 2023\n\n\n# Contributors\n\nThere is a momentum for moving the development of langchaingo to a more community effort, if you are interested in being a maintainer or you are a contributor please join our [Discord](https://discord.gg/8bHGKzHBkM) and let us know.\n\n<a href=\"https://github.com/tmc/langchaingo/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=tmc/langchaingo\" />\n</a>","github_created_at":"2023-02-18T20:04:54+00:00","created_at":"2026-07-11T10:43:13.076003+00:00","updated_at":"2026-07-11T16:03:01.276611+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"go","name":"go"},{"slug":"golang","name":"golang"},{"slug":"langchain","name":"langchain"}],"trust":{"provenance":{"is_fork":false,"github_id":603535454,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T10:43:13.963Z","maintenance":{"label":"Slowing","score":36,"methodology":"github_public_v1","releases_90d":0,"days_since_push":180,"last_release_at":"2025-10-20T05:25:26Z"},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":22,"high_count":0,"last_scan_at":"2026-07-11T10:43:15.568Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T16:02:40.664Z"},"languages":{"value":["go"],"source":"github.language","observed_at":"2026-07-11T16:02:40.664Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T16:02:40.664Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["- You are working on a project that requires LLM-based capabilities, but prefer to code in Go.","- Your team is already proficient in Go and you want to incorporate state-of-the-art language models without switching languages or frameworks."],"when_not_to_use":["- If your project strictly adheres to another programming language where other implementations of LangChain are available.","- When your application requires heavy customization at the framework level that might not be directly supported within LangChainGo’s current implementation."],"source":"enrich:decision_facts","observed_at":"2026-07-11T16:03:00.963Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"LangChainGo simplifies the integration of Large Language Models into Go projects through easy-to-use APIs and composability."}]}}