# ruby_llm

> ruby_llm is an open-source AI tool for developer tools. Ruby library with one API for 23 AI providers, tools and Rails conventions. It is available on API and self-hosted.

- **Kind:** Tool
- **Pricing:** Open source
- **Platforms:** API, self-hosted
- **Website:** https://rubyllm.com
- **Repository:** https://github.com/crmne/ruby_llm
- **GitHub stars:** 4,516
- **License:** MIT
- **Categories:** developer tools, AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## 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

- [ECC](https://ai-powered.com/tools/ecc): ECC is a freemium AI tool for ai models and llm tooling.
- [firecrawl](https://ai-powered.com/tools/firecrawl-2): firecrawl is a freemium AI tool for web search and scraping.
- [ponytail](https://ai-powered.com/tools/ponytail): ponytail is an open-source AI tool for ai models and llm tooling.
- [graphify](https://ai-powered.com/tools/graphify-2): graphify is a freemium AI tool for knowledge and memory.
- [orca](https://ai-powered.com/tools/orca): orca is an open-source AI tool for coding.
- [archify](https://ai-powered.com/tools/archify): archify is an open-source AI tool for design and media.
- [ragflow](https://ai-powered.com/tools/ragflow): ragflow is a freemium AI tool for knowledge and memory.
- [Agent-Reach](https://ai-powered.com/tools/agent-reach): Agent-Reach is an open-source AI tool for ai models and llm tooling.

---
Source: https://ai-powered.com/tools/ruby-llm
