← all repositories
crmne/ruby_llm

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.

ruby_llm
Velocity · 7d
+2.1
★ / day
Trend
steady
star history

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::Tool subclasses for the model to invoke, then bundle them into RubyLLM::Agent assistants with pinned models and instructions
  • Structured JSON output via declarative RubyLLM::Schema classes
  • Fiber-based async support and a registry of 800+ models with capability detection and pricing
  • Optional Rails integration that adds acts_as_chat to 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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.