Comparison
Rails Agent vs RubyLLM
RubyLLM is a great client library. Rails Agent is an engine, a runtime, and a cloud. Here is when each one is the right call.
TL;DR
Use RubyLLM when you need a `client.chat.create` for a script. Use Rails Agent when you need agents, tools, memory, background jobs, streaming, traces, evals, deploys, and a dashboard — all mounted at `/agents` in your existing Rails app.
Feature matrix
- DSL for defining agents, tools, and schemas — Rails Agent only
- Sidekiq-native `AgentJob` runtime — Rails Agent only
- ActionCable token streaming — Rails Agent only
- Traces, evals, and cost dashboards — Rails Agent only
- Managed Vercel deployment — Rails Agent only
- Raw provider API access — both
- MIT-licensed gem — both
Migration
# Before: RubyLLM
response = RubyLLM.chat(model: "gpt-4o").ask("Summarise this ticket")
# After: Rails Agent
class SupportTriage < RailsAgents::Base
model "gpt-4o"
instructions "Summarise the ticket and tag urgency."
end
SupportTriage.call(ticket: params[:ticket])