Ruby on Rails AI gems: what you actually need
The dependency list for a production Rails AI feature is shorter than one Gemfile group.
Search for Ruby on Rails AI gems and you get frameworks promising to be LangChain for Ruby. Here is the dependency list we actually ship with inside client codebases, and it fits in one Gemfile group.
An HTTP client and a thin API wrapper. ruby-openai or anthropic, or plain Faraday against the provider API. The API surface you use in production is small: send messages, declare tools, stream. A thin wrapper you can read beats a framework you cannot.
Your existing job backend. Sidekiq, GoodJob, or SolidQueue. The agent loop is a job; you already run the infrastructure it needs.
pgvector (the gem and the extension), only after measuring. Full text search covers more than you think. When you do need embeddings, they belong in Postgres.
A schema validator. json-schema or dry-schema, for the shape layer of your evals. The meaning layer is your own PORO, and no gem writes that for you.
Streaming via what Rails ships. Turbo Streams over ActionCable covers the typing effect. No websocket service required.
What is deliberately absent: agent frameworks and orchestration platforms. Not because they are bad software, but because they put the most important logic of your system, what the AI is allowed to do and how failures are handled, inside someone else’s abstractions. In a client codebase that has to be maintained for years by the team that owns it, a few hundred lines of readable Ruby beats a dependency with opinions.
The stack is boring on purpose. That is where this series started.
If you want this built inside your codebase by people who have shipped it before, our deepest bench is exactly this: Forward Deployed AI Engineer, $9,500 a month, or start with the two week assessment and get the ranked plan first.