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 は、Ruby と Rails アプリケーションに AI 機能を統合するための統一フレームワークです。複数の肥大化したプロバイダー固有クライアントや一貫性のない API 形式を管理する必要をなくし、さまざまな LLM プロバイダーに対して単一で一貫したインターフェースを提供します。
How it works
このフレームワークは、幅広い AI モデル(OpenAI、Anthropic、Google、Ollama 経由のローカルモデルなど)とやり取りするための高レベル Ruby API を提供します。モデル固有のロジックを抽象化し、コードを書き直すことなくプロバイダーを切り替えることが可能です。画像、動画、音声、ドキュメントといったマルチモーダル入力をサポートし、エージェント作成、構造化 JSON 出力の処理、ActiveRecord を介した Rails への直接統合用ツールが組み込まれています。
Who it’s for
単一の AI プロバイダーの SDK にロックインされることなく、チャットボット、エージェント、RAG システムなどの AI 機能を Ruby と Rails で構築したい開発者向けです。
Highlights
- Unified Interface: One API for OpenAI, xAI, Anthropic, Gemini, VertexAI, Bedrock, DeepSeek, Mistral, Ollama, and more.
- Multimodal Support: Native handling of images, video, audio transcription, and document extraction (PDFs, CSVs, etc.).
- Agentic Capabilities: Built-in support for creating reusable agents with specific instructions and custom Ruby tools.
- Rails Integration: Includes
acts_as_chatfor ActiveRecord and an optional ready-to-use chat UI. - Advanced AI Features: Support for streaming responses, structured output via schemas, embeddings, and provider-side batch processing.
- Lightweight: Minimal dependencies (Faraday, Zeitwerk, and Marcel).