Solution
OpenAI on Rails, without the plumbing.
Rails Agent speaks OpenAI natively — tool calls, streaming, structured outputs, vision — and gives you Ruby ergonomics for all of it.
Supported today
- gpt-4o, gpt-4o-mini, o1, o1-mini
- Function / tool calling with typed schemas
- Server-sent streaming into ActionCable
- Vision with attached ActiveStorage blobs
- Embeddings with pgvector-backed retrieval
Configure once
# config/initializers/rails_agent.rb
RailsAgent.configure do |c|
c.provider :openai, api_key: Rails.application.credentials.openai_key
end