llm.rb is Ruby's most capable AI runtime. It runs on Ruby's standard library by default. loads optional pieces only when needed, and offers a single runtime for providers, agents, tools, skills, MCP, A2A (Agent2Agent), RAG (vector stores & embeddings), streaming, files, and persisted state. As a bonus, llm.rb is also available for mruby. It supports OpenAI, OpenAI-compatible endpoints, Anthropic, Google Gemini, DeepSeek, xAI, Z.ai, AWS Bedrock, Ollama, and llama.cpp. It also includes built-in ActiveRecord and Sequel support, plus concurrent tool execution through threads, tasks (via async gem), fibers, ractors, and fork (via xchan.rb gem).
RailsLLM integrates the llm.rb runtime and its features into Rails. RailsLLM extends the builtin ActiveRecord support available to the llm.rb runtime with a Rails integration that includes generators for getting set up quickly, and an engine for a stream-capable chat interface that can be extended with your own tools. The llm.rb runtime runs on Ruby's standard library by default. loads optional pieces only when needed, and offers a single runtime for providers, agents, tools, skills, MCP, A2A (Agent2Agent), RAG (vector stores & embeddings), streaming, files, and persisted state.