Installation¶
This guide covers installing RobotLab in your Ruby project.
Requirements¶
- Ruby: 3.1 or higher
- Bundler: 2.0 or higher (recommended)
Install via Bundler¶
Add RobotLab to your Gemfile:
Then install:
Install via RubyGems¶
Or install directly:
Dependencies¶
RobotLab automatically installs these dependencies:
| Gem | Purpose |
|---|---|
ruby_llm |
LLM provider integrations |
ruby_llm-template |
Template rendering for prompts |
simple_flow |
Workflow execution |
Optional Dependencies¶
For specific features, you may need additional gems:
Verify Installation¶
Create a test file to verify everything works:
# test_robot_lab.rb
require "robot_lab"
puts "RobotLab version: #{RobotLab::VERSION}"
puts "Installation successful!"
Run it:
Rails Installation¶
For Rails applications, use the install generator:
This creates:
config/initializers/robot_lab.rb- Configuration filedb/migrate/*_create_robot_lab_tables.rb- Database migrationsapp/models/robot_lab_thread.rb- Thread modelapp/models/robot_lab_result.rb- Result modelapp/robots/- Directory for robot definitionsapp/tools/- Directory for tool definitions
Then run migrations:
Environment Setup¶
Before using RobotLab, set up your API keys as environment variables:
Using dotenv
For development, consider using the dotenv gem to manage environment variables:
Troubleshooting¶
Gem Installation Fails¶
If you encounter SSL or network errors:
# Update RubyGems
gem update --system
# Try installing with verbose output
gem install robot_lab --verbose
Missing Dependencies¶
If you see "LoadError" for optional gems:
API Key Issues¶
If you see authentication errors:
- Verify your API key is set:
echo $ANTHROPIC_API_KEY - Check the key is valid in your provider's console
- Ensure you're using the correct environment variable name
Next Steps¶
Now that RobotLab is installed:
- Quick Start - Build your first robot
- Configuration - Configure defaults