{"id":5286,"date":"2026-08-25T22:00:58","date_gmt":"2026-08-25T14:00:58","guid":{"rendered":"https:\/\/arc.dev\/employer-blog\/?p=5286"},"modified":"2026-08-25T22:01:24","modified_gmt":"2026-08-25T14:01:24","slug":"integrating-ai-with-ruby-on-rails","status":"publish","type":"post","link":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/","title":{"rendered":"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples"},"content":{"rendered":"\n<p>Written for Rails 8.1.<\/p>\n\n\n\n<p>Rails still gets written off as a pre-AI-era framework, the kind of stack you inherit rather than choose. That reputation doesn&#8217;t survive contact with an actual build.&nbsp;<\/p>\n\n\n\n<p>Most AI products in 2026 are API consumers, not model trainers, and the work that surrounds an LLM call is exactly what Rails already solves: queued background jobs with Solid Queue (the Rails 8+ default) or Sidekiq, token streaming over Turbo Streams and Action Cable, encrypted credentials, and a service-object pattern that keeps provider clients out of your controllers.<\/p>\n\n\n\n<p><strong>Integrating AI with <\/strong><a href=\"https:\/\/arc.dev\/hire-developers\/ruby-on-rails\"><strong>Ruby on Rails <\/strong><\/a><strong>means extending patterns Rails engineers already use every day, not bolting on something foreign.<\/strong> If your AI feature is a user-facing workflow wrapped around a hosted model, Rails removes more infrastructure work than it adds.<\/p>\n\n\n\n<p>Below is the practical side of Ruby on Rails AI integration: where Rails belongs in an AI stack, which features are worth shipping first, which gems and providers to pick, a six-step production workflow, how to build RAG and agent flows that don&#8217;t hallucinate their way into your database, and a launch checklist.<\/p>\n\n\n\n<p><strong>In this article:<\/strong><\/p>\n\n\n\n<p><strong>Where Rails Fits in an AI Product Stack<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rails as the Application and Workflow Layer<\/li>\n\n\n\n<li>What Belongs in External AI Services<\/li>\n\n\n\n<li>When Python, PyTorch, or TensorFlow Is the Better Fit<\/li>\n<\/ul>\n\n\n\n<p><strong>High-Value AI Features Rails Teams Can Ship<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Chatbots, Virtual Assistants, and Conversational AI<\/li>\n\n\n\n<li>Document Processing, Classification, and Structured Extraction<\/li>\n\n\n\n<li>RAG Search and Internal Knowledge Assistants<\/li>\n\n\n\n<li>Personalization, Recommendation Engines, and Predictive Analytics<\/li>\n\n\n\n<li>Content, Image Generation, and Back-Office Automation<\/li>\n<\/ul>\n\n\n\n<p><strong>Selecting Providers, Ruby Gems, and Coding Assistants<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Provider and Gem Comparison Table<\/li>\n\n\n\n<li>OpenAI Clients: ruby-openai Versus openai-ruby<\/li>\n\n\n\n<li>Multi-Provider Abstractions With RubyLLM and LangChainRB<\/li>\n\n\n\n<li>Anthropic, Gemini, DeepSeek, and Other Provider Choices<\/li>\n\n\n\n<li>Choosing the Best AI Coding Assistant for Ruby on Rails Work<\/li>\n\n\n\n<li>Coding Assistant Comparison Table<\/li>\n<\/ul>\n\n\n\n<p><strong>A Production Workflow for Ruby on Rails AI Integration<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 1: Define the User Action, Output Contract, and Evaluation Set<\/li>\n\n\n\n<li>Step 2: Configure Credentials and a Provider Service Object<\/li>\n\n\n\n<li>Step 3: Stream Fast Responses With SSE, Turbo Streams, or Action Cable<\/li>\n\n\n\n<li>Step 4: Move Slow Work to Background Jobs (Solid Queue or Sidekiq)<\/li>\n\n\n\n<li>Step 5: Validate Structured Output and Persist Useful Results<\/li>\n\n\n\n<li>Step 6: Test Failure Paths, Rate Limits, and Model Changes<\/li>\n<\/ul>\n\n\n\n<p><strong>Building a Ruby on Rails AI Agent: RAG and Reliable Workflows<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Store Embeddings in Postgres With pgvector and ActiveRecord<\/li>\n\n\n\n<li>Retrieve, Cite, and Refresh Source Documents<\/li>\n\n\n\n<li>Give a Rails AI Agent Narrow, Auditable Tool Access<\/li>\n\n\n\n<li>Choose RAG Before Fine-Tuning for Changing Product Knowledge<\/li>\n<\/ul>\n\n\n\n<p><strong>Security, Performance, and Launch Readiness Checklist<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Protect API Keys, Customer Data, and Sensitive Prompts<\/li>\n\n\n\n<li>Control Cost, Latency, Caching, and Provider Failover<\/li>\n\n\n\n<li>Monitor Quality, Data Leaks, and Unsafe Tool Calls<\/li>\n\n\n\n<li>Scannable Decision Checklist for the First Release<\/li>\n<\/ul>\n\n\n\n<p><strong>Frequently Asked Questions<\/strong><\/p>\n\n\n\n<p><strong>Where This Leaves Rails<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Where Rails Fits in an AI Product Stack<\/strong><\/h2>\n\n\n\n<p>Think of Rails as the layer between your user and the model, not the model itself. That split is what makes the architecture hold up as features multiply.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Rails as the Application and Workflow Layer<\/strong><\/h3>\n\n\n\n<p>Rails owns the parts of an AI product that users actually touch: authentication and authorization, per-tenant data scoping through ActiveRecord, billing and usage metering, job queues, and the views that render model output.<\/p>\n\n\n\n<p>Concretely, that means Devise or Rails 8&#8217;s built-in authentication generator handles sessions before a prompt is ever built, Pundit decides whether this user can query that document, and Sidekiq retries a failed OpenAI call with exponential backoff instead of you writing a retry loop by hand.<\/p>\n\n\n\n<p>Developer velocity is the real argument here. A single engineer can scaffold a model, migration, controller, background job, and streaming view for an AI feature in an afternoon, because the conventions already exist. Hiring backs this up: the pool of engineers who have shipped and scaled production Rails apps is deep, and they transfer between codebases fast because the file layout is the same everywhere.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What Belongs in External AI Services<\/strong><\/h3>\n\n\n\n<p>Push inference out. Chat completions, embeddings, transcription, image generation, reranking, and moderation all live behind LLM APIs from OpenAI, Anthropic, Google, and others.<\/p>\n\n\n\n<p>Your Rails app handles prompt assembly, retry logic, response validation, caching, and persistence. It should never hold GPU-bound work in a Puma thread.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>When Python, PyTorch, or TensorFlow Is the Better Fit<\/strong><\/h3>\n\n\n\n<p>Be honest about the boundary. If you are training or fine-tuning a model, running heavy feature engineering pipelines, or doing deep learning research, Python with PyTorch or TensorFlow is the default, and Ruby doesn&#8217;t come close.<\/p>\n\n\n\n<p>Torch.rb and Informers let you run local inference in Ruby, and they&#8217;re genuinely useful for small classifiers or embedding generation without a network hop. For anything involving training loops, distributed GPUs, or the latest research tooling, stand up a Python service and call it from Rails over HTTP. That boundary keeps each layer doing the job it&#8217;s actually good at.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>High-Value AI Features Rails Teams Can Ship<\/strong><\/h2>\n\n\n\n<p>Rails runs at real scale in production at companies like Shopify, GitHub (historically, and still in large parts), and Basecamp. The features below describe how an AI layer would plausibly sit on top of that kind of stack. Treat them as illustrative architecture, not confirmed implementations at those specific companies.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Chatbots, Virtual Assistants, and Conversational AI<\/strong><\/h3>\n\n\n\n<p>The Rails-native version of conversational AI is unglamorous and effective: a Conversation model, a Message model, an <a href=\"https:\/\/guides.rubyonrails.org\/action_cable_overview.html\">Action Cable<\/a> channel, and Turbo Streams appending tokens as they arrive.<\/p>\n\n\n\n<p>State lives in Postgres, not in memory, so a user can reload the page mid-answer and pick up where they left off. Reach for this when the assistant needs product context: order history, subscription status, permissions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Document Processing, Classification, and Structured Extraction<\/strong><\/h3>\n\n\n\n<p>This is where NLP pays off fastest. A user uploads a PDF invoice through Active Storage, a background job extracts text, and a model returns structured output matching a JSON schema you defined.<\/p>\n\n\n\n<p>Validate that JSON against an ActiveModel object before persisting. Skip that step, and you will eventually write a nil vendor name into a required column.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>RAG Search and Internal Knowledge Assistants<\/strong><\/h3>\n\n\n\n<p>Retrieval-augmented generation replaces keyword search in help centers and internal wikis. You chunk documents, generate embeddings, store them alongside your relational data, and retrieve the top matches before calling the model.<\/p>\n\n\n\n<p>The win is answers grounded in your own content, with citations back to the source record.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Personalization, Recommendation Engines, and Predictive Analytics<\/strong><\/h3>\n\n\n\n<p>Embeddings make content-similarity recommendations cheap: embed each article or product, then find nearest neighbors. For churn scoring or fraud detection, a small trained model or gradient-boosted classifier usually beats an LLM on both cost and accuracy, and Rails just stores and acts on the score.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Content, Image Generation, and Back-Office Automation<\/strong><\/h3>\n\n\n\n<p>Draft generation, tone rewriting, alt-text for uploads, product images, and internal ops automation like triaging refund requests or summarizing a week of support tickets into a Slack digest. These are queue-driven, latency-tolerant jobs, which makes this the easiest category to ship safely.<\/p>\n\n\n\n<p><strong>Read more:<\/strong> <a href=\"https:\/\/arc.dev\/employer-blog\/ruby-on-rails-a-product-team-guide-to-agile-delivery\/\">Ruby on Rails in 2026: How the Framework Supports Iterative Product Teams<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Selecting Providers, Ruby Gems, and Coding Assistants<\/strong><\/h2>\n\n\n\n<p>Two decisions matter here: which client library talks to your provider, and which AI coding assistant your team uses day-to-day.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Provider and Gem Comparison Table<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Gem<\/strong><\/td><td><strong>What it does<\/strong><\/td><td><strong>Best for<\/strong><\/td><td><strong>Tradeoff<\/strong><\/td><\/tr><tr><td><a href=\"https:\/\/github.com\/alexrudall\/ruby-openai\">ruby-openai<\/a><\/td><td>Community OpenAI client<\/td><td>Battle-tested, well-documented<\/td><td>New API surfaces can lag<\/td><\/tr><tr><td>openai-ruby<\/td><td>OpenAI&#8217;s official SDK<\/td><td>First-party support, fast updates<\/td><td>Newer, fewer examples<\/td><\/tr><tr><td>anthropic<\/td><td>Official Anthropic SDK (gem name anthropic, repo anthropics\/anthropic-sdk-ruby)<\/td><td>First-party support, fast updates, all current Claude APIs<\/td><td>Newer than the community gem; fewer community examples<\/td><\/tr><tr><td>ruby-anthropic<\/td><td>Community Claude client by Alex Rudall (formerly named anthropic before the official SDK took the gem name)<\/td><td>Teams already using this gem in production who don&#8217;t want to migrate<\/td><td>Gem name changed in 2025; update your Gemfile if you were on the old anthropic gem<\/td><\/tr><tr><td>ruby_llm<\/td><td>Multi-provider interface<\/td><td>Swapping or A\/B testing providers<\/td><td>Hides provider-specific params<\/td><\/tr><tr><td><a href=\"https:\/\/github.com\/patterns-ai-core\/langchainrb\">langchainrb<\/a><\/td><td>Chains, memory, tool calling<\/td><td>Multi-step RAG workflows<\/td><td>More concepts than small features need<\/td><\/tr><tr><td>raix<\/td><td>Rails AI extensions \u2014 chat completion, function dispatch, MCP support, prompt caching<\/td><td>Production AI components extracted from a real Rails AI platform; ships Raix::MCP for connecting to MCP servers<\/td><td>Smaller community than LangChainRB; opinionated toward OpenRouter by default<\/td><\/tr><tr><td>fast-mcp<\/td><td>MCP server implementation for Ruby<\/td><td>Exposing your Rails app&#8217;s tools and resources to AI agents via the Model Context Protocol<\/td><td>Experimental transport layer; SSE support in active development<\/td><\/tr><tr><td>faraday<\/td><td>HTTP client with middleware<\/td><td>No official SDK exists<\/td><td>You build the API surface yourself<\/td><\/tr><tr><td><a href=\"https:\/\/github.com\/ankane\/neighbor\">neighbor<\/a><\/td><td>ActiveRecord nearest-neighbor queries<\/td><td>Embeddings in Postgres via pgvector<\/td><td>Postgres-specific<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>OpenAI Clients: ruby-openai Versus openai-ruby<\/strong><\/h3>\n\n\n\n<p>ruby-openai has been the default in Rails projects for years. Its streaming interface takes a proc, which slots neatly into a Turbo Stream broadcast loop.<\/p>\n\n\n\n<p>openai-ruby, the official SDK, tracks new endpoints and parameters sooner, which matters when you want reasoning controls or a new model tier the week it ships. For a greenfield app, start with the official SDK. For an existing app already on ruby-openai, don&#8217;t migrate without a reason.<\/p>\n\n\n\n<p>A similar transition happened on the Anthropic side. Alex Rudall&#8217;s community gem was originally called anthropic. When Anthropic released their official Ruby SDK in 2025, Rudall donated the gem name \u2014 so anthropic now refers to the official SDK (gem &#8216;anthropic&#8217; in your Gemfile), and his community gem is now called <a href=\"https:\/\/github.com\/alexrudall\/ruby-anthropic\">ruby-anthropic<\/a> (gem &#8216;ruby-anthropic&#8217;). If your Gemfile still has gem &#8216;anthropic&#8217; from before the transition, verify which version you&#8217;re running \u2014 older versions (pre-1.0) are the community gem; version 1.x and above are the official SDK.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Multi-Provider Abstractions With RubyLLM and LangChainRB<\/strong><\/h3>\n\n\n\n<p>RubyLLM gives you one call signature across providers, so switching from GPT to Claude for a summarization job becomes a config change rather than a rewrite of your service object. That flexibility comes at a cost: you lose direct access to provider-specific knobs unless the gem exposes them.<\/p>\n\n\n\n<p>LangChainRB is the Ruby answer to LangChain: prompt templates, conversation memory, vector store adapters, and tool definitions. Use it when you&#8217;re chaining three or more model calls with retrieval in the middle. For a single chat completion, plain <a href=\"https:\/\/github.com\/lostisland\/faraday\">Faraday<\/a> plus a service object is less code and easier to debug.<\/p>\n\n\n\n<p>Sublayer is a newer entry in the same space, positioned specifically around agentic workflows: it provides a Generator\/Action\/Task\/Agent abstraction layer that maps more directly to multi-step autonomous behavior than LangChainRB&#8217;s chain metaphor. Worth evaluating if your use case is primarily agent-driven rather than RAG or single-call completion.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Anthropic, Gemini, DeepSeek, and Other Provider Choices<\/strong><\/h3>\n\n\n\n<p>For Anthropic specifically, you have two gem options: the official anthropic SDK (recommended for new projects) and the community ruby-anthropic gem by Alex Rudall (for projects already using it). Both work; the official SDK tracks new API features faster. See the gem table above for the rename context.<\/p>\n\n\n\n<p>Pick per job, not per company. Claude models tend to be strong at long documents and following detailed formatting instructions. Gemini is attractive when you&#8217;re already on Google Cloud or need large-context multimodal input. DeepSeek and other lower-cost providers make sense for high-volume classification where a small accuracy delta doesn&#8217;t hurt.<\/p>\n\n\n\n<p>The practical move: define a PROVIDERS config, route each feature to a named provider and model, and keep the model string out of your business logic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Choosing the Best AI Coding Assistant for Ruby on Rails Work<\/strong><\/h3>\n\n\n\n<p>Rails teams evaluating the best AI coding assistant for Ruby on Rails work usually land on one of five tools, each with a different sweet spot.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>GitHub Copilot<\/strong> is the strongest at line-level autocomplete inside Rails conventions. It guesses ActiveRecord scopes, has_many declarations, and strong params well because it has seen enormous amounts of idiomatic Rails. It&#8217;s weaker at reasoning across your whole app, so it will happily suggest a method that exists in a different concern.<\/li>\n\n\n\n<li><strong>Cursor<\/strong> is the best fit when you need multi-file edits. Ask it to add a status enum to a model, and it will touch the migration, model, controller, and RSpec spec together. Its Rails weakness is dynamic finders and metaprogrammed methods it can&#8217;t see in a file.<\/li>\n\n\n\n<li><strong>Claude Code<\/strong> works well for terminal-driven refactors and reading long Rails codebases, including running your test suite and iterating on failures. It writes RSpec that actually matches your existing spec style if your spec\/ folder is consistent.<\/li>\n\n\n\n<li><strong>Tabnine<\/strong> appeals to teams with strict data policies, since it supports self-hosted and on-prem deployment. Suggestion quality on Rails idioms sits below Copilot&#8217;s, so treat it as a privacy-first tradeoff.<\/li>\n\n\n\n<li><strong>Sourcegraph Cody <\/strong>shines on repo-wide questions in large monoliths<strong>; <\/strong>&#8216;where does this before_action come from?&#8217; across thousands of files \u2014 but as of July 2025, Cody Free and Cody Pro were discontinued. Cody is now enterprise-only at $59\/user\/month with an annual contract. For individual developers or small teams, Sourcegraph now points to their Amp product instead. Evaluate Cody only if you&#8217;re at an organization already running Sourcegraph Enterprise.<\/li>\n<\/ul>\n\n\n\n<p>The candid limitation applies to all five. None of them fully model Rails&#8217; metaprogramming or convention-over-configuration behavior. They can&#8217;t reliably tell you that a method is defined by a gem&#8217;s included do block, and they will invent callbacks that look plausible. An experienced Rails engineer still needs to read every generated migration and every N+1 waiting inside a suggested each loop.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Coding Assistant Comparison Table<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Tool<\/strong><\/td><td><strong>Strongest use case<\/strong><\/td><td><strong>Rails-specific fit<\/strong><\/td><td><strong>Pricing (approx.)<\/strong><\/td><\/tr><tr><td>GitHub Copilot<\/td><td>Inline autocomplete<\/td><td>Excellent on ActiveRecord idioms<\/td><td>Free tier; $10 to $19\/mo<\/td><\/tr><tr><td>Cursor<\/td><td>Multi-file refactors<\/td><td>Strong on migration, model, and spec together<\/td><td>Free tier; Pro ~$20\/mo<\/td><\/tr><tr><td>Claude Code<\/td><td>Terminal refactors, test loops<\/td><td>Good RSpec output on consistent specs<\/td><td>Bundled with Claude plans<\/td><\/tr><tr><td>Tabnine<\/td><td>Privacy-sensitive teams<\/td><td>Adequate, supports on-prem<\/td><td>Free tier; $9 to $39\/mo<\/td><\/tr><tr><td>Sourcegraph Cody<\/td><td>Repo-wide code search (enterprise)<\/td><td>Strong in large monoliths with Sourcegraph deployed&nbsp;<\/td><td>Enterprise-only since July 2025; $59\/user\/month annual contract. Individuals: see Amp<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Pricing changes often, so confirm current rates before quoting them to a client or team.<\/p>\n\n\n\n<p><strong>Read more:<\/strong> <a href=\"https:\/\/arc.dev\/employer-blog\/ruby-on-rails-vs-javascript-which-should-you-learn-or-use-for-web-development\/\">Ruby On Rails vs. JavaScript: Which Should You Learn Or Use For Web Development?<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>A Production Workflow for Ruby on Rails AI Integration<\/strong><\/h2>\n\n\n\n<p>Here&#8217;s the sequence that holds up when the feature reaches real users. It maps to: user request, background job, API call, streamed response back to the view.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Define the User Action, Output Contract, and Evaluation Set<\/strong><\/h3>\n\n\n\n<p>Write down the exact user action (&#8220;summarize this support thread&#8221;) and the exact output shape (a JSON object with summary, sentiment, suggested_action).<\/p>\n\n\n\n<p>Then collect 20 to 50 real inputs with hand-written expected outputs. This is your evaluation set, and it&#8217;s the only way you&#8217;ll know whether a model or prompt change made things better. Skip it, and every prompt tweak becomes a guess.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Configure Credentials and a Provider Service Object<\/strong><\/h3>\n\n\n\n<p>Put keys in rails credentials:edit, not in a committed .env. Use dotenv locally if you prefer, and read from environment variables in production so your deploy platform owns the secret.<\/p>\n\n\n\n<p>Then wrap the provider in a service object, for example&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># app\/services\/llm\/summarize_thread.rb\n\nclass Llm::SummarizeThread\n\n\u00a0\u00a0Result = Data.define(:summary, :sentiment, :suggested_action)\n\n\u00a0\u00a0def initialize(thread_id:, user:)\n\n\u00a0\u00a0\u00a0\u00a0@thread = SupportThread.find(thread_id)\n\n\u00a0\u00a0\u00a0\u00a0@user \u00a0 = user\n\n\u00a0\u00a0end\n\n\u00a0\u00a0def call\n\n\u00a0\u00a0\u00a0\u00a0response = client.messages.create(\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0model:\u00a0 \u00a0 \u00a0 \"claude-sonnet-4-6\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0max_tokens: 1024,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0system: \u00a0 \u00a0 system_prompt,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0messages: \u00a0 &#91;{ role: \"user\", content: @thread.messages_text }]\n\n\u00a0\u00a0\u00a0\u00a0)\n\n\u00a0\u00a0\u00a0\u00a0parsed = JSON.parse(response.content.first.text)\n\n\u00a0\u00a0\u00a0\u00a0Result.new(**parsed.slice(\"summary\", \"sentiment\", \"suggested_action\").transform_keys(&amp;:to_sym))\n\n\u00a0\u00a0rescue Anthropic::Error => e\n\n\u00a0\u00a0\u00a0\u00a0Rails.logger.error(\"LLM error: #{e.message}\")\n\n\u00a0\u00a0\u00a0\u00a0raise\n\n\u00a0\u00a0end\n\n\u00a0\u00a0private\n\n\u00a0\u00a0def client\n\n\u00a0\u00a0\u00a0\u00a0@client ||= Anthropic::Client.new(api_key: Rails.application.credentials.anthropic_api_key)\n\n\u00a0\u00a0end\n\n\u00a0\u00a0def system_prompt\n\n\u00a0\u00a0\u00a0\u00a0&lt;&lt;~PROMPT\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Return JSON with keys: summary (string), sentiment (positive|neutral|negative),\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0suggested_action (string). No other text.\n\n\u00a0\u00a0\u00a0\u00a0PROMPT\n\n\u00a0\u00a0end\n\nend<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Stream Fast Responses With SSE, Turbo Streams, or Action Cable<\/strong><\/h3>\n\n\n\n<p>For anything conversational, stream. The controller opens a stream, the provider client yields chunks, and each chunk broadcasts a Turbo Stream append to a target div.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># app\/controllers\/messages_controller.rb\n\ndef create\n\n\u00a0\u00a0message = current_conversation.messages.create!(role: \"user\", content: params&#91;:content])\n\n\u00a0\u00a0response {\n\n\u00a0\u00a0\u00a0\u00a0headers&#91;\"Content-Type\"] = \"text\/event-stream\"\n\n\u00a0\u00a0\u00a0\u00a0headers&#91;\"X-Accel-Buffering\"] = \"no\"\n\n\u00a0\u00a0\u00a0\u00a0client = Anthropic::Client.new(api_key: Rails.application.credentials.anthropic_api_key)\n\n\u00a0\u00a0\u00a0\u00a0ai_message = current_conversation.messages.create!(role: \"assistant\", content: \"\")\n\n\u00a0\u00a0\u00a0\u00a0client.messages.stream(\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0model: \u00a0 \u00a0 \"claude-sonnet-4-6\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0max_tokens: 2048,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0messages:\u00a0 current_conversation.messages_for_api\n\n\u00a0\u00a0\u00a0\u00a0) do |chunk|\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0token = chunk.delta&amp;.text\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0next unless token\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ai_message.update_columns(content: ai_message.content + token)\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sse_data = ApplicationController.render(\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0partial: \"messages\/token\",\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0locals:\u00a0 { token: token, message_id: ai_message.id }\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0write(\"data: #{sse_data}\\n\\n\")\n\n\u00a0\u00a0\u00a0\u00a0end\n\n\u00a0\u00a0\u00a0\u00a0write(\"data: &#91;DONE]\\n\\n\")\n\n\u00a0\u00a0}\n\nend<\/code><\/pre>\n\n\n\n<p>Server-sent events work well for one-way token streaming and need no extra infrastructure beyond a properly configured web server. Action Cable is the better choice when the same channel carries other real-time updates. Reserve real-time WebRTC for actual voice features.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Move Slow Work to Sidekiq and Background Jobs<\/strong><\/h3>\n\n\n\n<p>Anything over roughly two seconds that the user isn&#8217;t watching belongs in a job. Solid Queue is the Rails 8+ default; it&#8217;s database-backed and needs no Redis. <a href=\"https:\/\/github.com\/sidekiq\/sidekiq\">Sidekiq<\/a> is the common production choice for high-volume workloads where Redis-backed throughput matters. Active Job gives you a common interface either way.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Aspect<\/strong><\/td><td><strong>Synchronous (in request)<\/strong><\/td><td><strong>Async (Active Job \/ Sidekiq)<\/strong><\/td><\/tr><tr><td>When to use<\/td><td>Short prompts under 2s, admin tools<\/td><td>Batch jobs, embeddings, multi-step agents<\/td><\/tr><tr><td>Perceived latency<\/td><td>Full API round trip<\/td><td>Instant response, result streams in later<\/td><\/tr><tr><td>Failure behavior<\/td><td>Timeout becomes a 500<\/td><td>Job retries with backoff<\/td><\/tr><tr><td>Complexity<\/td><td>Low, one service call<\/td><td>Higher, needs status column and broadcast<\/td><\/tr><tr><td>Risk if skipped<\/td><td>Puma threads back up under load<\/td><td>Extra moving parts to maintain<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Streaming is the middle path: the response starts immediately even though total generation takes 15 seconds.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Validate Structured Output and Persist Useful Results<\/strong><\/h3>\n\n\n\n<p>Request structured outputs with a JSON schema, then still validate. Parse into an ActiveModel object with validations, and on failure either retry once with the error message appended or fall back to a safe default.&nbsp;<\/p>\n\n\n\n<p>The <a href=\"https:\/\/github.com\/instructor-rb\/instructor-rb\">instructor-rb<\/a> gem is built specifically for this validation step. It wraps your provider client, sends the JSON schema to the model, and handles retry-with-error-message automatically when the response doesn&#8217;t validate; the same retry loop you&#8217;d build by hand, as a convention rather than custom code. It&#8217;s the structured-output equivalent of how Rails handles form validation: you declare what valid looks like, and the library enforces it<\/p>\n\n\n\n<p>Persist the input hash, the model name, token counts, and the parsed result. When someone asks why last Tuesday&#8217;s summaries look off, that row is your answer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Test Failure Paths, Rate Limits, and Model Changes<\/strong><\/h3>\n\n\n\n<p>Use VCR or WebMock to record real provider responses and replay them in specs. Then write tests for the ugly cases: a 429, a 500, a timeout, malformed JSON, and a truncated response.<\/p>\n\n\n\n<p>Add a documented runbook entry for provider outages, including which fallback model the app switches to. Re-run your evaluation set whenever you change a model version, because reasoning behavior shifts between releases even at the same price point.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Building a Ruby on Rails AI Agent: RAG and Reliable Workflows<\/strong><\/h2>\n\n\n\n<p>A Ruby on Rails AI agent takes autonomous multi-step actions: it decides which tool to call, reads the result, and continues until it hits a stopping condition. That&#8217;s different from a chatbot, which answers and waits.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Store Embeddings in Postgres With pgvector and ActiveRecord<\/strong><\/h3>\n\n\n\n<p>You almost certainly don&#8217;t need a separate vector database. Enable <a href=\"https:\/\/github.com\/pgvector\/pgvector\">pgvector<\/a>, add a vector column to a document_chunks table, and query nearest neighbors through ActiveRecord with the neighbor gem.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># db\/migrate\/20260101000000_add_embedding_to_document_chunks.rb\n\nclass AddEmbeddingToDocumentChunks &lt; ActiveRecord::Migration&#91;8.1]\n\n\u00a0\u00a0def change\n\n\u00a0\u00a0\u00a0\u00a0add_column :document_chunks, :embedding, :vector, limit: 1536\n\n\u00a0\u00a0\u00a0\u00a0add_index\u00a0 :document_chunks, :embedding,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0using: :ivfflat,\n\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0opclass: :vector_cosine_ops\n\n\u00a0\u00a0end\n\nend\n\n# app\/models\/document_chunk.rb\n\nclass DocumentChunk &lt; ApplicationRecord\n\n\u00a0\u00a0belongs_to :document\n\n\u00a0\u00a0has_neighbors :embedding\n\n\u00a0\u00a0scope :for_tenant, ->(tenant) { where(tenant_id: tenant.id) }\n\nend\n\n# Retrieve top-5 nearest chunks, scoped by tenant\n\ndef retrieve(query:, tenant:, k: 5)\n\n\u00a0\u00a0embedding = embed(query) \u00a0 # returns a 1536-dimensional float array\n\n\u00a0\u00a0DocumentChunk\n\n\u00a0\u00a0\u00a0\u00a0.for_tenant(tenant)\n\n\u00a0\u00a0\u00a0\u00a0.nearest_neighbors(:embedding, embedding, distance: \"cosine\")\n\n\u00a0\u00a0\u00a0\u00a0.limit(k)\n\n\u00a0\u00a0\u00a0\u00a0.includes(:document)\n\nend<\/code><\/pre>\n\n\n\n<p>Keeping embeddings in your primary Postgres means one backup strategy, one connection pool, and joins between chunks and the records they came from. Reach for a dedicated vector store when you cross tens of millions of chunks or need specialized index types.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Retrieve, Cite, and Refresh Source Documents<\/strong><\/h3>\n\n\n\n<p>Chunk on semantic boundaries, headings and paragraphs, not fixed character counts, and store the source document_id and position on every chunk. Return citations with every answer so a user can click through to the original.<\/p>\n\n\n\n<p>Refresh matters more than people expect. Add an after_update_commit hook that enqueues a re-embedding job when source content changes, or your knowledge assistant will confidently quote a pricing page from last quarter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Give a Rails AI Agent Narrow, Auditable Tool Access<\/strong><\/h3>\n\n\n\n<p>Define tools as plain Ruby classes with explicit, whitelisted behavior. A LookupOrder tool takes an order ID and a current user, and scopes the query through that user&#8217;s permissions. Never expose a generic &#8220;run SQL&#8221; tool.<\/p>\n\n\n\n<p>A realistic support scenario: a ticket arrives, a Sidekiq job classifies it, the agent calls LookupCustomer and SearchHelpCenter, drafts a reply, and writes it to a draft_responses table with status: pending_review. A human approves before anything sends. Log every tool call with arguments and results so you can reconstruct what the agent did.<\/p>\n\n\n\n<p>LangChainRB and RubyLLM both handle the tool-calling loop. Rails handles state, permissions, retries, and the review queue. The Model Context Protocol (MCP) is the emerging standard for how agents discover and call external tools. Raix ships Raix::MCP as an experimental module that connects your Rails app to remote MCP servers, letting an agent call tools hosted elsewhere without you building the transport layer yourself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Choose RAG Before Fine-Tuning for Changing Product Knowledge<\/strong><\/h3>\n\n\n\n<p>If the information changes, retrieve it. Fine-tuning bakes knowledge into weights, which means every documentation update requires a new training run.<\/p>\n\n\n\n<p>Fine-tune for style, format consistency, or a narrow classification task where you have thousands of labeled examples. For product knowledge, pricing, and policies, RAG wins on freshness and cost.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Security, Performance, and Launch Readiness Checklist<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Protect API Keys, Customer Data, and Sensitive Prompts<\/strong><\/h3>\n\n\n\n<p>Keys go in <a href=\"https:\/\/guides.rubyonrails.org\/security.html#custom-credentials\">Rails encrypted credentials<\/a> or your platform&#8217;s secret store, never in a repo and never in client-side JavaScript. Use dotenv for local development only, and keep .env in .gitignore.<\/p>\n\n\n\n<p>Prompt logs are the quiet risk. If prompts contain customer messages, health data, or payment details, encrypt those columns with <a href=\"https:\/\/guides.rubyonrails.org\/active_record_encryption.html\">Active Record Encryption<\/a> and set a retention window. Check whether your provider trains on API inputs by default and opt out or sign the appropriate agreement.<\/p>\n\n\n\n<p>Scope every retrieval query by tenant. A RAG assistant that can read another customer&#8217;s documents creates a real data breach, and treating it as an edge case only delays the fix.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Control Cost, Latency, Caching, and Provider Failover<\/strong><\/h3>\n\n\n\n<p>Cache aggressively. Hash the prompt plus model plus relevant record updated_at and store the response in Redis; repeated summaries of unchanged content should never hit the API twice.<\/p>\n\n\n\n<p>Route by task size. A nano-tier model handles classification and routing; reserve larger GPT, Claude, or Gemini calls for generation that users read closely. Set per-user and per-account rate limits with <a href=\"https:\/\/github.com\/rack\/rack-attack\">Rack::Attack<\/a>, cap max_tokens, and set explicit HTTP timeouts, because a client with no timeout will hold a Sidekiq thread indefinitely.<\/p>\n\n\n\n<p>Configure a fallback provider and test the switch before you need it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Monitor Quality, Data Leaks, and Unsafe Tool Calls<\/strong><\/h3>\n\n\n\n<p>Track token spend per feature per day and alert on anomalies. Log model name, latency, and outcome on every call so a regression is visible in a dashboard instead of a support ticket.<\/p>\n\n\n\n<p>Add a thumbs-up\/down control on AI output and review the negatives weekly against your evaluation set. Run a moderation pass on user-generated prompts, and alert on any tool call that touches records outside the requesting user&#8217;s scope.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Scannable Decision Checklist for the First Release<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Every AI call over two seconds runs in Active Job or Sidekiq, not in the request cycle<\/li>\n\n\n\n<li>Explicit timeouts and retry-with-backoff on every provider call<\/li>\n\n\n\n<li>Rate limits per user and per account, plus a hard monthly spend cap with alerting<\/li>\n\n\n\n<li>API keys in encrypted credentials; sensitive prompt columns encrypted with a retention policy<\/li>\n\n\n\n<li>Structured outputs validated against a schema before anything is persisted<\/li>\n\n\n\n<li>Graceful degradation: a clear, non-technical fallback message when the provider fails<\/li>\n\n\n\n<li>Evaluation set of 20+ real examples, re-run on every prompt or model change<\/li>\n\n\n\n<li>Retrieval and tool access scoped by tenant and permission, with full audit logs<\/li>\n\n\n\n<li>Agent actions land in a human review queue before anything customer-facing sends<\/li>\n\n\n\n<li>Runbook documenting provider outage response and fallback model<\/li>\n<\/ul>\n\n\n\n<p>Common ways teams get burned: an unthrottled &#8220;regenerate&#8221; button that produces a five-figure invoice, a synchronous call that exhausts the Puma thread pool during a traffic spike, an unhandled 429 that surfaces as a blank page, and prompt logs sitting in plaintext for a year.<\/p>\n\n\n\n<p><strong>Read more:<\/strong> <a href=\"https:\/\/arc.dev\/employer-blog\/ruby-vs-ruby-on-rails-whats-the-difference-and-when-to-use-each\/\">Ruby vs Ruby on Rails: What&#8217;s the Difference and When to Use Each<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Frequently Asked Questions<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can Ruby on Rails be used for AI applications?<\/strong><\/h3>\n\n\n\n<p>Yes. Rails works well as the layer that sits between your users and a hosted AI model, handling authentication, background jobs, streaming, and data persistence. Model training and heavy inference stay outside the Rails app, but the application logic around an AI feature, the part users actually interact with, fits Rails conventions naturally.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What is the best AI coding assistant for Ruby on Rails?<\/strong><\/h3>\n\n\n\n<p>There&#8217;s no single winner across every use case. GitHub Copilot is strongest for line-level autocomplete inside Rails conventions, Cursor handles multi-file changes like adding an enum across a migration and controller, and Claude Code works best for terminal-driven refactors and test-driven loops. Pick based on the kind of work your team does most, not a general reputation score.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can you build an AI agent in Ruby on Rails?<\/strong><\/h3>\n\n\n\n<p>Yes, using Rails to manage state, permissions, and a human review queue while a gem like LangChainRB or RubyLLM handles the tool-calling loop. A common pattern is a support agent that looks up a customer record and searches a help center through narrowly scoped tools, then writes a draft response for a person to approve before anything reaches a customer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Do I need Python for AI features in a Rails app?<\/strong><\/h3>\n\n\n\n<p>Only if you&#8217;re training or fine-tuning a model, or running heavy feature engineering pipelines. Calling a hosted model like GPT, Claude, or Gemini from Rails needs no Python at all; an HTTP request through a Ruby SDK or Faraday handles it. Reach for Python and PyTorch or TensorFlow specifically when the work involves training loops or GPU-bound research.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Is RAG or fine-tuning better for a Rails AI feature?<\/strong><\/h3>\n\n\n\n<p>RAG fits information that changes, such as product documentation, pricing, or policies, because it retrieves current content at query time instead of baking facts into model weights. Fine-tuning makes more sense for adjusting tone, output format, or a narrow classification task where you have thousands of labeled examples and the underlying knowledge stays stable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Where This Leaves Rails<\/strong><\/h2>\n\n\n\n<p><strong>The short version, in one scannable list:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Rails works as a strong product and orchestration layer around hosted models, and it ships faster because conventions for jobs, streaming, auth, and credentials already exist.<\/li>\n\n\n\n<li>Keep inference external. Use OpenAI, Anthropic, Gemini, or DeepSeek through the openai gem, ruby-openai, anthropic,<a href=\"https:\/\/github.com\/crmne\/ruby_llm\"> RubyLLM<\/a>, or<a href=\"https:\/\/github.com\/patterns-ai-core\/langchainrb\"> LangChainRB<\/a>, and keep model names out of business logic.<\/li>\n\n\n\n<li>Move real ML training to Python with PyTorch or TensorFlow, and call it from Rails over HTTP. That boundary keeps each layer doing the job it&#8217;s best suited for.<\/li>\n\n\n\n<li>Default to async. Use Sidekiq for slow work, <a href=\"https:\/\/turbo.hotwired.dev\/handbook\/streams\">Turbo Streams<\/a> or SSE for streaming, and explicit timeouts everywhere.<\/li>\n\n\n\n<li>Store embeddings in Postgres with pgvector and neighbor before reaching for a separate vector database.<\/li>\n\n\n\n<li>Use RAG for knowledge that changes; fine-tune only for style or narrow classification with lots of labeled data.<\/li>\n\n\n\n<li>AI coding assistants speed up Rails work but don&#8217;t fully understand Rails metaprogramming. Review every migration and every generated query.<\/li>\n\n\n\n<li>Ship with rate limits, spend caps, encrypted prompt storage, an evaluation set, and a human review queue for agent actions.<\/li>\n<\/ul>\n\n\n\n<p>If you&#8217;re building AI features into a Rails app and want engineers who have already shipped this kind of integration, <strong>Arc can connect you with vetted <\/strong><a href=\"https:\/\/arc.dev\/hire-developers\/ruby-on-rails\"><strong>Ruby on Rails developers<\/strong><\/a><strong> working in AI-driven product teams.\u00a0<\/strong><\/p>\n\n\n\n<p>\u26a1\ufe0f Access 450,000+ top developers, designers, and marketers&nbsp;<\/p>\n\n\n\n<p>\u26a1\ufe0f Vetted and ready to interview&nbsp;<\/p>\n\n\n\n<p>\u26a1\ufe0f Freelance or full-time<\/p>\n\n\n\n<p><a href=\"https:\/\/arc.dev\/\"><strong>Try Arc and hire top talent now \u2192<\/strong><\/a><\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@graph\": [\n    {\n      \"@type\": \"Article\",\n      \"headline\": \"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples\",\n      \"description\": \"How AI integrates into Rails applications, including APIs, AI agents, coding assistants, and practical product use cases.\",\n      \"image\": {\n        \"@type\": \"ImageObject\",\n        \"url\": \"https:\/\/cdn-employer-wp.arc.dev\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png\"\n      },\n      \"author\": {\n        \"@type\": \"Organization\",\n        \"name\": \"Arc\",\n        \"url\": \"https:\/\/arc.dev\"\n      },\n      \"publisher\": {\n        \"@type\": \"Organization\",\n        \"name\": \"Arc\",\n        \"logo\": {\n          \"@type\": \"ImageObject\",\n          \"url\": \"https:\/\/cdn.arc.dev\/arc-next-landing\/images\/arc\/share-logo.png\"\n        }\n      },\n      \"datePublished\": \"2026-08-04\",\n      \"dateModified\": \"2026-08-12\",\n      \"mainEntityOfPage\": {\n        \"@type\": \"WebPage\",\n        \"@id\": \"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/\"\n      }\n    },\n    {\n      \"@type\": \"FAQPage\",\n      \"mainEntity\": [\n        {\n          \"@type\": \"Question\",\n          \"name\": \"Can Ruby on Rails be used for AI applications?\",\n          \"acceptedAnswer\": {\n            \"@type\": \"Answer\",\n            \"text\": \"Yes. Rails works well as the layer that sits between your users and a hosted AI model, handling authentication, background jobs, streaming, and data persistence. Model training and heavy inference stay outside the Rails app, but the application logic around an AI feature fits Rails conventions naturally.\"\n          }\n        },\n        {\n          \"@type\": \"Question\",\n          \"name\": \"What is the best AI coding assistant for Ruby on Rails?\",\n          \"acceptedAnswer\": {\n            \"@type\": \"Answer\",\n            \"text\": \"There is no single winner across every use case. GitHub Copilot is strongest for line-level autocomplete inside Rails conventions, Cursor handles multi-file changes like adding an enum across a migration and controller, and Claude Code works best for terminal-driven refactors and test-driven loops. Pick based on the kind of work your team does most.\"\n          }\n        },\n        {\n          \"@type\": \"Question\",\n          \"name\": \"Can you build an AI agent in Ruby on Rails?\",\n          \"acceptedAnswer\": {\n            \"@type\": \"Answer\",\n            \"text\": \"Yes, using Rails to manage state, permissions, and a human review queue while a gem like LangChainRB or RubyLLM handles the tool-calling loop. A common pattern is a support agent that looks up a customer record and searches a help center through narrowly scoped tools, then writes a draft response for a person to approve before anything reaches a customer.\"\n          }\n        },\n        {\n          \"@type\": \"Question\",\n          \"name\": \"Do I need Python for AI features in a Rails app?\",\n          \"acceptedAnswer\": {\n            \"@type\": \"Answer\",\n            \"text\": \"Only if you are training or fine-tuning a model, or running heavy feature engineering pipelines. Calling a hosted model like GPT, Claude, or Gemini from Rails needs no Python at all. Reach for Python and PyTorch or TensorFlow specifically when the work involves training loops or GPU-bound research.\"\n          }\n        },\n        {\n          \"@type\": \"Question\",\n          \"name\": \"Is RAG or fine-tuning better for a Rails AI feature?\",\n          \"acceptedAnswer\": {\n            \"@type\": \"Answer\",\n            \"text\": \"RAG fits information that changes, such as product documentation, pricing, or policies, because it retrieves current content at query time instead of baking facts into model weights. Fine-tuning makes more sense for adjusting tone, output format, or a narrow classification task where you have thousands of labeled examples and the underlying knowledge stays stable.\"\n          }\n        }\n      ]\n    }\n  ]\n}\n\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Written for Rails 8.1. Rails still gets written off as a pre-AI-era framework, the kind of stack you inherit rather than choose. That reputation doesn&#8217;t survive contact with an actual build.&nbsp; Most AI products in 2026 are API consumers, not model trainers, and the work that surrounds an LLM call is exactly what Rails already [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":5287,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[],"class_list":["post-5286","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Integrating AI with Ruby on Rails: Use Cases, Tools &amp; Examples - Arc Employer Blog<\/title>\n<meta name=\"description\" content=\"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrating AI with Ruby on Rails: Use Cases, Tools &amp; Examples - Arc Employer Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/\" \/>\n<meta property=\"og:site_name\" content=\"Arc Employer Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/arcdotdev\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/arcdotdev\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-25T14:00:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-25T14:01:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1535\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"The Arc Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@arcdotdev\" \/>\n<meta name=\"twitter:site\" content=\"@arcdotdev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"The Arc Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"23 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/\"},\"author\":{\"name\":\"The Arc Team\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#\\\/schema\\\/person\\\/08dd4743f5c0f965590e77094c5579bc\"},\"headline\":\"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples\",\"datePublished\":\"2026-08-25T14:00:58+00:00\",\"dateModified\":\"2026-08-25T14:01:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/\"},\"wordCount\":4393,\"publisher\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/integrating-ai-with-ruby-on-rails.png\",\"articleSection\":[\"Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/\",\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/\",\"name\":\"Integrating AI with Ruby on Rails: Use Cases, Tools & Examples - Arc Employer Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/integrating-ai-with-ruby-on-rails.png\",\"datePublished\":\"2026-08-25T14:00:58+00:00\",\"dateModified\":\"2026-08-25T14:01:24+00:00\",\"description\":\"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#primaryimage\",\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/integrating-ai-with-ruby-on-rails.png\",\"contentUrl\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2026\\\/08\\\/integrating-ai-with-ruby-on-rails.png\",\"width\":1535,\"height\":1024,\"caption\":\"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/integrating-ai-with-ruby-on-rails\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#website\",\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/\",\"name\":\"Arc Employer Blog\",\"description\":\"Insights on hiring and remote work\",\"publisher\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#organization\",\"name\":\"Arc.dev\",\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Arc-alternate-logo.png\",\"contentUrl\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/Arc-alternate-logo.png\",\"width\":512,\"height\":512,\"caption\":\"Arc.dev\"},\"image\":{\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/arcdotdev\",\"https:\\\/\\\/x.com\\\/arcdotdev\",\"https:\\\/\\\/www.instagram.com\\\/arcdotdev\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/arcdotdev\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Arcdotdev\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/#\\\/schema\\\/person\\\/08dd4743f5c0f965590e77094c5579bc\",\"name\":\"The Arc Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg\",\"caption\":\"The Arc Team\"},\"description\":\"The Arc team provides articles and expert advice on tech careers and remote work. From helping beginners land their first junior role to supporting remote workers facing challenges at home or guiding mid-level professionals toward leadership, Arc covers it all!\",\"sameAs\":[\"https:\\\/\\\/arc.dev\\\/developer-blog\\\/\",\"https:\\\/\\\/www.facebook.com\\\/arcdotdev\",\"https:\\\/\\\/www.instagram.com\\\/arcdotdev\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/arcdotdev\",\"https:\\\/\\\/x.com\\\/arcdotdev\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Arcdotdev\"],\"url\":\"https:\\\/\\\/arc.dev\\\/employer-blog\\\/author\\\/thearcteam\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integrating AI with Ruby on Rails: Use Cases, Tools & Examples - Arc Employer Blog","description":"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/","og_locale":"en_US","og_type":"article","og_title":"Integrating AI with Ruby on Rails: Use Cases, Tools & Examples - Arc Employer Blog","og_description":"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.","og_url":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/","og_site_name":"Arc Employer Blog","article_publisher":"https:\/\/www.facebook.com\/arcdotdev","article_author":"https:\/\/www.facebook.com\/arcdotdev","article_published_time":"2026-08-25T14:00:58+00:00","article_modified_time":"2026-08-25T14:01:24+00:00","og_image":[{"width":1535,"height":1024,"url":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png","type":"image\/png"}],"author":"The Arc Team","twitter_card":"summary_large_image","twitter_creator":"@arcdotdev","twitter_site":"@arcdotdev","twitter_misc":{"Written by":"The Arc Team","Est. reading time":"23 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#article","isPartOf":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/"},"author":{"name":"The Arc Team","@id":"https:\/\/arc.dev\/employer-blog\/#\/schema\/person\/08dd4743f5c0f965590e77094c5579bc"},"headline":"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples","datePublished":"2026-08-25T14:00:58+00:00","dateModified":"2026-08-25T14:01:24+00:00","mainEntityOfPage":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/"},"wordCount":4393,"publisher":{"@id":"https:\/\/arc.dev\/employer-blog\/#organization"},"image":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png","articleSection":["Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/","url":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/","name":"Integrating AI with Ruby on Rails: Use Cases, Tools & Examples - Arc Employer Blog","isPartOf":{"@id":"https:\/\/arc.dev\/employer-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#primaryimage"},"image":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#primaryimage"},"thumbnailUrl":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png","datePublished":"2026-08-25T14:00:58+00:00","dateModified":"2026-08-25T14:01:24+00:00","description":"Learn how to integrate AI with Ruby on Rails: APIs, coding assistants, AI agents, and real-world use cases for building AI-driven Rails products.","breadcrumb":{"@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#primaryimage","url":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png","contentUrl":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2026\/08\/integrating-ai-with-ruby-on-rails.png","width":1535,"height":1024,"caption":"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples"},{"@type":"BreadcrumbList","@id":"https:\/\/arc.dev\/employer-blog\/integrating-ai-with-ruby-on-rails\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/arc.dev\/employer-blog\/"},{"@type":"ListItem","position":2,"name":"Integrating AI with Ruby on Rails: Use Cases, Tools, and Real-World Examples"}]},{"@type":"WebSite","@id":"https:\/\/arc.dev\/employer-blog\/#website","url":"https:\/\/arc.dev\/employer-blog\/","name":"Arc Employer Blog","description":"Insights on hiring and remote work","publisher":{"@id":"https:\/\/arc.dev\/employer-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/arc.dev\/employer-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/arc.dev\/employer-blog\/#organization","name":"Arc.dev","url":"https:\/\/arc.dev\/employer-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/arc.dev\/employer-blog\/#\/schema\/logo\/image\/","url":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2022\/02\/Arc-alternate-logo.png","contentUrl":"https:\/\/arc.dev\/employer-blog\/wp-content\/uploads\/2022\/02\/Arc-alternate-logo.png","width":512,"height":512,"caption":"Arc.dev"},"image":{"@id":"https:\/\/arc.dev\/employer-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/arcdotdev","https:\/\/x.com\/arcdotdev","https:\/\/www.instagram.com\/arcdotdev\/","https:\/\/www.linkedin.com\/company\/arcdotdev","https:\/\/www.youtube.com\/c\/Arcdotdev"]},{"@type":"Person","@id":"https:\/\/arc.dev\/employer-blog\/#\/schema\/person\/08dd4743f5c0f965590e77094c5579bc","name":"The Arc Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1380473325c827343a6d47c7b5d6916c147171af99760766d2acb56da62ed02?s=96&d=mm&r=pg","caption":"The Arc Team"},"description":"The Arc team provides articles and expert advice on tech careers and remote work. From helping beginners land their first junior role to supporting remote workers facing challenges at home or guiding mid-level professionals toward leadership, Arc covers it all!","sameAs":["https:\/\/arc.dev\/developer-blog\/","https:\/\/www.facebook.com\/arcdotdev","https:\/\/www.instagram.com\/arcdotdev\/","https:\/\/www.linkedin.com\/company\/arcdotdev","https:\/\/x.com\/arcdotdev","https:\/\/www.youtube.com\/c\/Arcdotdev"],"url":"https:\/\/arc.dev\/employer-blog\/author\/thearcteam\/"}]}},"_links":{"self":[{"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/posts\/5286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/comments?post=5286"}],"version-history":[{"count":0,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/posts\/5286\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/media\/5287"}],"wp:attachment":[{"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/media?parent=5286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/categories?post=5286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arc.dev\/employer-blog\/wp-json\/wp\/v2\/tags?post=5286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}