A universal Ruby remote for the LLM zoo
RubyLLM unifies a dozen-plus AI providers behind a single, expressive Ruby interface so you can stop juggling SDKs.
What it does
RubyLLM is a Ruby framework that wraps the major large-language-model providers—OpenAI, Anthropic, Google, AWS, and others—into one consistent API. You can chat, stream responses, generate images, build embeddings, transcribe audio, and define tools and agents without switching client libraries. It also ships with Rails integration via acts_as_chat and a registry of over 800 models with capability and pricing metadata.
The interesting bit
The entire library leans on just three runtime dependencies—Faraday, Zeitwerk, and Marcel—making it notably lean compared to the vendor SDKs it replaces. That minimal footprint, combined with a DSL that lets AI invoke your Ruby methods directly, suggests the author actually uses Ruby rather than simply porting Python patterns.
Key highlights
- Single interface for chat, vision, audio, documents, image generation, embeddings, and moderation across a dozen-plus providers
- Native tool-calling and reusable agents: define
RubyLLM::Toolsubclasses for the model to invoke, then bundle them intoRubyLLM::Agentassistants with pinned models and instructions - Structured JSON output via declarative
RubyLLM::Schemaclasses - Fiber-based async support and a registry of 800+ models with capability detection and pricing
- Optional Rails integration that adds
acts_as_chatto ActiveRecord and can generate a ready-made chat UI
Caveats
- “Extended thinking” is touted but unexplained in the README; how you control or persist deliberation is left to the reader’s imagination (or docs site)
- The framework is “battle tested” solely at the author’s commercial product, Chat with Work; broader production war stories aren’t shared
Verdict
Rubyists building chatbots, RAG pipelines, or internal AI tools should look here first; Python-first ML engineers or teams wedded to official vendor SDKs probably won’t switch.
Frequently asked
- What is crmne/ruby_llm?
- RubyLLM unifies a dozen-plus AI providers behind a single, expressive Ruby interface so you can stop juggling SDKs.
- Is ruby_llm open source?
- Yes — crmne/ruby_llm is open source, released under the MIT license.
- What language is ruby_llm written in?
- crmne/ruby_llm is primarily written in Ruby.
- How popular is ruby_llm?
- crmne/ruby_llm has 4.3k stars on GitHub and is currently holding steady.
- Where can I find ruby_llm?
- crmne/ruby_llm is on GitHub at https://github.com/crmne/ruby_llm.