About this tool
What
is RubyLLM RubyLLM is an open-source library for Ruby and Rails developers to build applications that chat with AI models, use tools, and run agents.
Key capabilities
- Chatting with AI models: the conversational core that tools plug into, with streaming support.
- Tools: tools must inherit from
RubyLLM::Tool; a tool withdef executereceives an empty object schema. - Agents: an agent configures your persisted chat when you load it in another process, and can run in background jobs.
- Structured output: generate structured data, or remove the schema for free-form responses.
- Model resolution: turns a model name into a concrete model and provider, covering aliases, the registry, provider preference, and unlisted models.
- Chat event handlers: hook into the chat lifecycle for UI updates, logging, and analytics.
Who
it is for Rails developers, AI application developers, and Ruby developers.
Features & use cases
Chatting with AI modelsStreaming responsesTools (inherit RubyLLM::Tool)Agents and background jobsStructured output generationModel name resolutionChat event handlersAPI available
Quick facts
Public API available