crmne/ruby_llm
The Ruby AI framework.
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 unified API to interact with 19 different AI providers, allowing developers to switch between hosted and local models without rewriting their application logic.
How it works
The framework acts as an abstraction layer over various AI providers (such as OpenAI, Anthropic, Gemini, and Ollama). It allows developers to use a single consistent interface for tasks like chatting, image and video generation, audio transcription, and OCR. It supports advanced AI patterns including tool use (function calling), agentic loops, and structured output via Ruby schemas.
Who it’s for
Ruby and Rails developers who want to build AI-powered features—such as conversational agents, document analysis, and multimodal AI—without being locked into a specific provider's SDK.
Highlights
- Unified Provider API: Support for 19 providers including OpenAI, Azure, xAI, Anthropic, Gemini, VertexAI, Bedrock, Cohere, DeepSeek, and Ollama.
- Multimodal Capabilities: Built-in support for analyzing images, videos, and audio, as well as generating images and videos.
- Agentic Framework: Tools for creating reusable agents with specific instructions and tools, including human-in-the-loop approval workflows.
- Rails Integration: Deep integration with Active Record for persistence, Active Storage for attachments, and Hotwire for streaming responses.
- Evaluation Suite: A system for testing agent correctness using datasets and model-based evaluators.
- Developer Tooling: Includes prompt templates (ERB), cost tracking, token counting, and prompt caching.
Related
- Dispatch
- Project
- Project
- Project
- Project