This is a Proof of Concept project demonstrating the integration of the Roast gem in a Rails application. The project focuses on using Roast as a Ruby gem rather than a CLI tool.
Roast is a powerful gem that helps structure AI workflows. This POC explores how to integrate Roast directly into a Rails application by using its Ruby classes and methods.
- Ruby 3.3.8 (managed via rbenv or docker)
- Rails 7.0 or higher
- Bundler
- Clone the repository:
git clone https://github.com/rootstrap/roast-poc.git
cd roast-poc
- Configure your environment variables:
cp sample.env .env
- Edit
.env
with your configuration values.
- Install dependencies:
- Create your docker-compose.yml
- Run docker sh
bundle install
This POC demonstrates how to use Roast as a Ruby gem. Here's a basic example:
- Create your workflow file on app/workflows
- Create your .yml with specific steps
- Create your step_name.rb or /step_name/prompt.md file with the corresponding code. Be carefull with directories: .rb step should be at same level as .yml; prompt.md inside a folder with step name.
- Call the workflow from rails console to test it.
workflow = CodeAnalysisWorkflow.new
workflow.execute
- Clone the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Roast gem by Shopify