mruby-llm

The llm.rb runtime for standalone mruby applications, small static binaries, terminal tools, and services.

Ruby gemstone

Runtime

mruby-llm brings the llm.rb execution model to mruby so standalone applications can talk to model providers, run tools, stream output, and keep state without depending on a full Ruby installation.

It began as a fork of llm.rb. The two projects now share design work and portable features where that makes sense.

It makes it practical to build small self-contained AI applications that ship as standalone binaries measured in megabytes, not hundreds of megabytes.

$ git clone https://github.com/llmrb/mruby-llm.git

What it provides

Area Use
Providers OpenAI, OpenAI-compatible endpoints, Anthropic, Gemini, DeepSeek, xAI, Z.ai, Ollama, and llama.cpp.
Agents Tool loops, confirmation hooks, loop guards, and streaming terminal output.
Tools Typed tool definitions that can be composed with local tools, MCP tools, and A2A skills.
Embedding Applications can link the runtime into small self-contained mruby binaries.
Distribution Static terminal applications can ship as standalone binaries around 3MB.

Built with mruby-llm

Matz and Robert prove the runtime is small enough to embed in terminal applications, but capable enough to run tools, stream output, and back public SSH services.

Matz

Matz is an mruby expert for the terminal. It uses mruby-llm to answer from the mruby guide repository, indexed mruby source code, and mrbgem metadata.

$ ssh matz@r.uby.dev

Robert

Robert is a FreeBSD expert for the terminal. It uses mruby-llm to work from manual pages, Handbook material, ports, packages, and local system tools.

$ ssh robert@4.4bsd.dev