Jorge ManrubiaPrincipal Programmer, 37signalsWe are using OpenAI API using the fantastic RubyLLM gem from @paolino.
RubyLLM is the Ruby-native AI framework. Work with models, tools, and agents through one consistent API, in plain Ruby or Rails.
Coming soon
Build with the models you want. Move between hosted and local providers without rewriting your application, or connect an OpenAI-compatible endpoint.
chat = RubyLLM.chat(model: "claude-opus-5")
chat.ask "Hello!"
Browse models and pricing · Track usage and costs
Connect another AI service to Ruby and Rails. Generate a provider gem with configuration, tests, and release setup, then adapt it to the service's API.
Provider gem guideAsk about an image, a recording, or a PDF. Pass your files with with: and RubyLLM prepares them for the model.
Pass a block to display the response as it arrives, in your terminal or a Rails view.
Streaming guideDescribe a tool in a Ruby class and implement execute. RubyLLM runs the tool calls and sends the results back to the model.
Define the fields you want in a Ruby schema. Read the result as a Hash with response.parsed.
Give an agent its model, instructions, and tools in a Ruby class. Create an instance whenever you need it.
Agents guideAgents, workflows, RAG, images, audio, and video. Built in, with usage tracking and Rails integration to bring them into your app.
class IssueRefund < RubyLLM::Tool
description "Issues a refund for an order"
requires_approval
def execute(order_id:) = Refunds.issue!(order_id)
end
chats = documents.map do |doc|
RubyLLM.chat(model: "claude-sonnet-5")
.with_instructions("Summarize in one paragraph.")
.ask_later(doc.text)
end
batch = RubyLLM.batch(chats)
chat = RubyLLM.chat.with_caching
chat.with_instructions "You are a careful code reviewer."
chat.ask "Review this diff", with: "large_diff.patch"
response = RubyLLM.chat
.with_server_tools(:web_search)
.ask "What's the latest stable Ruby? Cite sources."
response.citations
documents = ["Ruby is expressive", "Python uses indentation"]
embeddings = RubyLLM.embed(documents)
ranked = RubyLLM.rerank("Ruby language", documents, model: "rerank-v3.5")
response = chat.ask "Explain embeddings"
response.tokens.output
response.cost.total
transcript = RubyLLM.transcribe "meeting.wav"
RubyLLM.speak(transcript.text).save "transcript.mp3"
document = RubyLLM.ocr "scanned-contract.pdf"
puts document.markdown
RubyLLM.paint "a sunset over mountains in watercolor style"
RubyLLM.animate "a paper boat sailing down a rainy gutter"
RubyLLM.moderate("Some user-generated content").flagged?
Coordinate agents with workflows, give them memory, and resume their work across jobs and deploys. Use separate configurations for each tenant and retries and fallbacks when requests fail. Follow requests with instrumentation, or explore community gems for MCP and monitoring dashboards.
Save conversations with Active Record and stream replies with Hotwire. The generators give you a working chat UI. Watch the two-minute demo.
chat = Chat.create! model: "claude-opus-5"
chat.ask "What's in this file?", with: "report.pdf"
bin/rails generate ruby_llm:agent Support
bin/rails generate ruby_llm:tool Weather
bin/rails generate ruby_llm:schema Product
Keep your agents, tools, and schemas in app/. Store files with Active Storage and write your prompts in ERB templates. Use Turbo Streams to show replies and Active Job to run agents in the background.
Used in production by the teams behind these products.
Using RubyLLM? Get featured or Sponsor us
Their support helps fund RubyLLM's development. Thank you for investing in AI for Ruby.
Jorge ManrubiaPrincipal Programmer, 37signalsWe are using OpenAI API using the fantastic RubyLLM gem from @paolino.
Nick WarwickFounding Engineer, Nodal NetworksOur Langgraph agent was failing. I took a gamble and rebuilt it using RubyLLM. Not only was it far simpler, it performed better.
Brendan SamekFounding Software Engineer, Build CanadaIt feels natural. At Yuma, serving over 100,000 end users, our unified AI interface had accumulated so much cruft. RubyLLM is so much nicer than all of that.
Aaron SnyderCTO / Co-founder, CorepilotWe got our proof of concept up in one day and the first beta in about a week. Really impressive.
Joe LeoFounder/CEO, Def MethodMost tools add layers. This one removes them. It keeps the mental load low.
Cole RobertsonCo-founder and CTO, dScribe AIThe speed of development and the closest thing to the AI SDK in JavaScript land. Easiest Rails integration.
Philippe LehouxCEO, MissiveMulti-provider support. Agentic loop support. Can we sponsor?
Hamid SiddiquiFounder, ReelMoneyI replaced my internal provider implementation with RubyLLM and it just worked nicely. Deleted a lot of code.
Marc KöhlbruggeFounder/CEO, Startup JobsRuby-esque DSL and the right level of abstraction: composable, flexible on architecture, opinionated on lower-level implementation.
Kieran KlaassenFounder, CoraLove deleting code when adding a library, and love the thought that goes into the gem.
Elvinas PredkelisCEO, PrimeviseRubyLLM is pretty much the devise of this generation. Adding it to any application is pretty much a no-brainer.
Axel GrubbaFounder, CrevioLove how Ruby-like it feels. The DSL is incredibly intuitive and follows all the conventions I would expect.
Luis EzcurdiaSoftware EngineerRubyLLM is awesome, easy and intuitive. You should try it, even if you don’t work with Ruby.
Chris SonnierRuby/Rails EngineerIf you can find a better Ruby AI library than RubyLLM, I will only write JavaScript for the rest of the year!
Mauro EldritchFounder, BCA LTDWe built our own quick and dirty wrapper, then your project came up and rocked it.
Ruslan LeteyskiCEO, ZipchatImplementation-agnostic access to models helps us simplify our flow and experiment with agentic systems.
Jonathan SatovskyCEO, FinDashWhen a tool removes noise instead of adding it, you get to stay focused on the real work.
Rich ChetwyndGeneralist, Bunny IncSuper easy way to start adding magic to our app. Love the speed of improvements.
Ale SolanoSoftware Engineer, OpenRegulatoryJust having a framework to structure all our LLM processes is gigantic value. Tool integration works like a charm.
Eric WrightChief Content Officer, GTM DeltaIt just works. I do not want to keep dealing with wrappers and fast-moving provider changes.
Hadrien BlancFreelancer, Hadrien Blanc InnovationI delivered a lot of value to my customers because of your work.
Dewayne VanHoozerThe MadBomber, MadBomber SoftwareLetting someone else manage the fast-moving infrastructure of the LLM API landscape allowed me to focus on applications.
John DeSilvaChief Architect, RevelaReally solid overall, well thought out, and seamless across Rails model-backed chats and one-off chats.
Angel MendezCEO, YatoMy clients and my clients' clients are very happy because we can iterate and improve our system quickly.
Nina RevkoSenior Software Engineer, InstrumentlRubyLLM made the future of Ruby and AI feel easier, more accessible, and completely within reach.
Daniel FriisCreator, SchematistFoundational tooling for working with AI in Ruby and Rails applications.
Giovanni PanasitiCo-founder, ConsultalaI’m kinda fitting RubyLLM into all of my projects.
Using RubyLLM? Share your story! Takes 5 minutes.