crmne/ruby_llm

One delightful Ruby framework for every major AI provider. Build AI agents, chatbots, RAG apps, and multimodal workflows in beautiful, expressive code.

What it solves

RubyLLM is a native Ruby framework designed to simplify the integration of AI capabilities into Ruby and Rails applications. It provides a single, consistent API to interact with multiple AI providers (such as OpenAI, Anthropic, Google, and local models via Ollama) without needing to write provider-specific code for every feature.

How it works

The framework acts as an abstraction layer that allows developers to use the same Ruby methods to perform various AI tasks across different providers. It integrates deeply with Ruby on Rails, supporting Active Record for persistence, Active Storage for file attachments, and Hotwire for streaming responses. It handles the complexities of model registries, tool calling, usage tracking, and batch processing behind the scenes.

Who it’s for

It is built for Ruby and Rails developers who want to build AI-powered features—such as chatbots, agents, and multimodal AI—into their existing applications using a clean, Ruby-native syntax.

Highlights

  • Multimodal Support: Handles text, images, audio, video, and PDFs through a unified interface.
  • Agentic Capabilities: Supports the creation of reusable agents with specific instructions and tools, including human-in-the-loop approval for tool execution.
  • Extensive Provider Ecosystem: Built-in support for 17+ providers including OpenAI, Azure, xAI, Anthropic, Gemini, Bedrock, and DeepSeek.
  • Rails Integration: Provides generators for installation, database migrations, and an optional ready-to-use chat UI.
  • Advanced AI Tooling: Includes features for embeddings, reranking, OCR, moderation, and structured output via Ruby schemas.
  • Operational Tools: Built-in cost tracking, token counting, prompt caching, and fiber-based async concurrency.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project