From prompt
to production.
One gem.

Agents are just classes now.

Riffer is the all-in-one Ruby framework for AI agents — typed tools, structured output, streaming, and adapters for all major providers.

gem install riffer

weather_agent.rb
class WeatherTool < Riffer::Tool
  description 'Current weather for a city'

  params do
    required :city, String, description: 'City name'
  end

  def call(context:, city:)
    text WeatherAPI.fetch(city).summary
  end
end

class WeatherAgent < Riffer::Agent
  model 'openai/gpt-5-mini'
  uses_tools [WeatherTool]
end

puts WeatherAgent.generate('Raining in Vancouver?')

Everything an agent needs

One gem covers the full lifecycle — from defining agents and tools to evaluating, guarding, and tracing them in production.

Core

Agents

Declarative classes carry the model, instructions, tools, and output schema.

Core

Tools

Typed params with automatic validation before your code runs.

Core

Structured output

Schema-validated JSON responses, parsed into Ruby data for you.

Runtime

Providers

OpenAI, Azure OpenAI, Amazon Bedrock, Anthropic — plus a mock for tests.

Runtime

Streaming

Typed stream events from text deltas to web-search progress.

Production

Evals & guardrails

Measure agent quality and validate input and output at the boundary.

The guides

Read them in order, or jump straight to your topic.

Start here The fundamentals Going further Providers