RubyGems Navigation menu

llm.rb 4.11.1

llm.rb is a Ruby-centric toolkit for building real LLM-powered systems — where LLMs are part of your architecture, not just API calls. It gives you explicit control over contexts, tools, concurrency, and providers, so you can compose reliable, production-ready workflows without hidden abstractions. Built for engineers who want to understand and control their LLM systems. No frameworks, no hidden magic — just composable primitives for building real applications, from scripts to full systems like Relay. ## Key Features - **Contexts are central** — Hold history, tools, schema, usage, cost, persistence, and execution state - **Tool execution is explicit** — Run local, provider-native, and MCP tools sequentially or concurrently - **One API across providers** — Unified interface for OpenAI, Anthropic, Google, xAI, zAI, DeepSeek, Ollama, and LlamaCpp - **Thread-safe where it matters** — Providers are shareable, while contexts stay isolated and stateful - **Production-ready** — Cost tracking, observability, persistence, and performance tuning built in - **Stdlib-only by default** — Runs on Ruby standard library, with optional features loaded only when used ## Capabilities - Chat & Contexts with persistence - Streaming responses - Tool calling with JSON Schema validation - Concurrent execution (threads, fibers, async tasks) - Agents with auto-execution - Structured outputs - MCP (Model Context Protocol) support - Multimodal inputs (text, images, audio, documents) - Audio generation, transcription, translation - Image generation and editing - Files API for document processing - Embeddings and vector stores - Local model registry for capabilities, limits, and pricing

Gemfile:
=

install:
=

Versions:

  1. 4.11.1 April 06, 2026 (98.5 KB)
  2. 4.11.0 April 04, 2026 (98 KB)
  3. 4.10.0 April 02, 2026 (88.5 KB)
  4. 4.9.0 March 30, 2026 (86.5 KB)
  5. 4.8.0 March 16, 2026 (70.5 KB)
Show all versions (55 total)

Development Dependencies (13):

dotenv ~> 2.8
kramdown ~> 2.4
logger ~> 1.7
rake ~> 13.0
rspec ~> 3.0
standard ~> 1.50
test-cmd.rb ~> 0.12.0
vcr ~> 6.0
webmock ~> 3.24.0
webrick ~> 1.8
yard ~> 0.9.37

Owners:

Pushed by:

Authors:

  • Antar Azri, 0x1eef, Christos Maris, Rodrigo Serrano

SHA 256 checksum:

=

Total downloads 70,005

For this version 473

Version Released:

License:

0BSD

Required Ruby Version: >= 3.2.0

Links: