Back to directory

Langchain.rb

A Ruby framework for building LLM-powered applications, providing a unified interface across providers such as Anthropic, AWS Bedrock, Google Gemini and OpenAI for embeddings, prompt completions, chat and retrieval-augmented generation.

Langchain.rb

Langchain.rb is a Ruby framework for building applications powered by large language models, covering use cases such as retrieval-augmented generation with vector search and chat-bot style assistants. Its LLM classes all inherit from a common base and expose a consistent interface for generating embeddings, prompt completions and chat completions, so switching between supported providers, including Anthropic, AWS Bedrock, Azure OpenAI, Cohere, Google Gemini, Google Vertex AI, Hugging Face, Mistral AI, Ollama, OpenAI and Replicate, needs minimal code changes.

Beyond the unified LLM interface, it provides prompt management helpers, output parsers for structuring model responses, tools for building retrieval-augmented generation pipelines, an assistants abstraction for chat-bot-style applications, and evaluation utilities. A companion gem, langchainrb_rails, adds deeper integration for Ruby on Rails applications.

It installs as a Ruby gem through Bundler or directly, and is released under the MIT license.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.