Langchain.rb
Langchain.rb is an MIT-licensed Ruby gem for building LLM-powered applications: a unified interface across providers such as OpenAI, Anthropic, Google Gemini, AWS Bedrock, Mistral and Ollama, plus prompt management, output parsers, retrieval-augmented generation over vector stores, tool-using Assistants and evaluations. A companion langchainrb_rails gem adds deep Rails integration.
Updated
✨ Try AgentScout's free AI image generator →Good for: building AI agents, evaluating agents
Use cases
About Langchain.rb
Langchain.rb is listed in our frameworks category and is aimed at builders. Langchain.rb is an MIT-licensed Ruby gem for building LLM-powered applications: a unified interface across providers such as OpenAI, Anthropic, Google Gemini, AWS Bedrock, Mistral and Ollama, plus prompt management, output parsers, retrieval-augmented generation over vector stores, tool-using Assistants and evaluations. A companion langchainrb_rails gem adds deep Rails integration. Pricing, as the maker states it: Open source. Maturity: Active. We last checked the official link on 2026-12-01.
What is Langchain.rb?
Langchain.rb brings LLM application building to Ruby. Its Langchain::LLM module gives one interface for embeddings, completions and chat across Anthropic, AWS Bedrock, Azure OpenAI, Cohere, Google Gemini and Vertex AI, Hugging Face, Mistral, Ollama, OpenAI and Replicate, so you can switch providers without rewriting code.
On top it adds prompt management, output parsers, RAG over many vector stores, Assistants with tool calling and built-in evaluations. A companion langchainrb_rails gem adds deep Rails integration. Installed with bundle add langchainrb; MIT-licensed.
Sources: the official README and our directory listing, checked 2026-10-31. Official site: rubydoc.info/gems/langchainrb.
Who is Langchain.rb for?
Ruby and Rails developers adding LLM features, RAG or assistants to their apps.
Langchain.rb at a glance
- Open source: Yes (MIT)
- GitHub: patterns-ai-core/langchainrb · 2,006 stars (as of Dec 2, 2026)
Key features
- Unified API across a dozen LLM providers
- RAG with vector search
- Assistants with tool calling
- Prompt templates and output parsers
- Rails integration gem
Langchain.rb FAQ
What is Langchain.rb?
Langchain.rb brings LLM application building to Ruby. Its Langchain::LLM module gives one interface for embeddings, completions and chat across Anthropic, AWS Bedrock, Azure OpenAI, Cohere, Google Gemini and Vertex AI, Hugging Face, Mistral, Ollama, OpenAI and Replicate, so you can switch providers without rewriting code.
Who is Langchain.rb for?
Ruby and Rails developers adding LLM features, RAG or assistants to their apps.
Is Langchain.rb free?
Langchain.rb's pricing, as the maker states it: Open source. Open-source tools are free to use, though you may still pay for model API usage or a hosted plan. Check the official site for current plans.
Is Langchain.rb open source?
Yes. Langchain.rb is released under MIT, according to its GitHub repository.
Is there Rails support?
Yes, through the companion langchainrb_rails gem.
What are alternatives to Langchain.rb?
Similar tools include Pydantic AI, AgentScope, smolagents, Agents CLI, Dapr and MCP-Nest.
Langchain.rb ratings and reviews
Be the first to rate Langchain.rb: tap 1 to 5 stars below. A written review is optional.
Langchain.rb alternatives
Other frameworks tools in our directory. See all frameworks tools →
Pydantic AI
Pydantic AI is the Pydantic team's free, MIT-licensed Python framework for building typed AI agents. Swapping the model is a one-line change, and the same agent can run behind a website, in a terminal, on a voice call, or in a background job. It also covers image generation and embeddings.
AgentScope
Framework for building and running transparent multi-agent applications with visual debugging.
smolagents
smolagents is Hugging Face's Apache-2.0 Python library for agents that think in code: its CodeAgent writes each action as a Python snippet rather than a JSON tool call, and the core agent logic fits in about 1,000 lines. Generated code can run in sandboxes such as E2B, Modal, Blaxel or Docker, tools and agents can be shared to and pulled from the Hugging Face Hub, and it works with any model, from local transformers or Ollama to OpenAI, Anthropic and other providers via LiteLLM.
Agents CLI
Google's CLI and skills that teach coding assistants to build, evaluate and deploy agents on Google Cloud and the Gemini platform.
Dapr
Dapr is a portable runtime for building distributed applications across cloud and edge, combining event-driven architecture with workflow orchestration
MCP-Nest
MCP-Nest is an MIT-licensed NestJS module for building Model Context Protocol servers. You use it to expose tools, resources and prompts from a NestJS app to an MCP client. The repository does not list a separate marketing site.