
ruby_llm
Ruby library with one API for 23 AI providers, tools and Rails conventions
- Pricing
- Open source
- Platforms
- API, self-hosted
- GitHub stars
- 4.5K
- Last commit
- 1 day ago
- Language
- Ruby
- License
- MIT
About ruby_llm
ruby_llm is an open-source AI tool for developer tools. It is available on API and self-hosted.
RubyLLM presents a single interface across 23 providers, hosted or local, plus any OpenAI-compatible endpoint, with 40 shared features checked against provider documentation. A chat takes one line and the model can be switched without application rewrites.
Beyond chat it lets a model write Ruby, Python, JavaScript or shell that runs in a sandbox on your servers, unable to read app code or secrets, with created files returned as attachments. Wider sandboxes require a person's approval for each call and never become standing access. It also loads Agent Skills folders, describes MCP servers as Ruby classes with encrypted OAuth credentials, and tracks usage and costs.
A scaffold command generates a provider gem. Licence is MIT.
What it does
- 23 providers
- One API across hosted and local models.
- Sandboxed code execution
- Model-written code runs on your servers in isolation.
- Approval for escalation
- Wider sandboxes wait for human approval.
- Agent Skills
- Load skills only when a task needs them.
- MCP as Ruby classes
- Connect MCP servers with encrypted credentials.
- Provider gem scaffold
- Generate gems for missing providers.
Good for
- Adding chat to a Rails app
- Letting a model chart a CSV safely
- Switching providers without rewriting
- Connecting Linear or other MCP servers
Pricing
Open source
Free, MIT
Prices change. Check rubyllm.com before you buy.
ruby_llm FAQ
How many providers?
23, plus OpenAI-compatible endpoints.
Is code execution safe?
It runs in a sandbox that cannot read the app or secrets.
Install?
bundle add ruby_llm.
Is ruby_llm free?
Yes. ruby_llm is open source, so you can use and self-host it for free.
What are the best alternatives to ruby_llm?
The closest alternatives to ruby_llm are ECC, firecrawl, ponytail, graphify and orca.
Alternatives to ruby_llm

Skills, hooks, memory and security layer for coding agent harnesses
- Freemium
- Open-source agent
- 305K GitHub stars
- AI models and LLM tooling

Web search, scraping and page interaction API for AI agents and developers
- Freemium
- Agent framework
- 202K GitHub stars
- Web search and scraping

Ruleset that makes AI coding agents write less code that still works
- Open source
- Open-source agent
- 192K GitHub stars
- AI models and LLM tooling

Code knowledge graph that gives coding assistants shared, source-linked context
- Freemium
- Open-source agent
- 149K GitHub stars
- Knowledge and memory

Desktop environment for running several coding agents in parallel worktrees
- Open source
- Open-source agent
- 127K GitHub stars
- Coding

Agent skill that turns questions or code into validated HTML diagrams and one-page answers
- Open source
- Open-source agent
- 97.2K GitHub stars
- Design and media