The all-in-one Ruby framework for building AI-powered applications and agents.
- Ruby 3.2 or later
Install the released gem:
gem install rifferOr add to your application's Gemfile:
gem 'riffer'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')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
Generate the full API documentation with:
bundle exec rake docsThen open doc/index.html in your browser.
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/console- 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.
All notable changes to this project are documented in CHANGELOG.md.
Licensed under the MIT License. See LICENSE.txt for details.
- Jake Bottrall - https://github.com/bottrall