Riffer
The all-in-one Ruby framework for building AI-powered applications and agents.
Requirements
- Ruby 3.2 or later
Installation
Install the released gem:
gem install rifferOr add to your application's Gemfile:
gem 'riffer'Quick Start
require 'riffer'
# Configure your provider
Riffer.configure do |config|
config.openai.api_key = ENV['OPENAI_API_KEY']
end
# Define an agent
class EchoAgent < Riffer::Agent
model 'openai/gpt-4o'
instructions 'You are an assistant that repeats what the user says.'
end
# Use the agent
agent = EchoAgent.new
puts agent.generate('Hello world')Documentation
For comprehensive documentation, see the docs directory:
- Overview - Core concepts and architecture
- Getting Started - Installation and first steps
- Agents - Building AI agents
- Tools - Creating tools for agents
- Messages - Message types and formats
- Stream Events - Streaming responses
- Configuration - Framework configuration
- Providers - LLM provider adapters
API Reference
Generate the full API documentation with:
bundle exec rake docsThen open doc/index.html in your browser.
Development
After checking out the repo, run:
bin/setupRun the test suite:
bundle exec rake testCheck and fix code style:
bundle exec rake standard
bundle exec rake standard:fixRun the interactive console:
bin/consoleContributing
- Fork the repository and create your branch:
git checkout -b feature/foo - Run tests and linters locally:
bundle exec rake - Submit a pull request with a clear description of the change
Please follow the Code of Conduct.
Changelog
All notable changes to this project are documented in CHANGELOG.md.
License
Licensed under the MIT License. See LICENSE.txt for details.
Maintainers
- Jake Bottrall - https://github.com/bottrall