# RubyLLM::Agents — Rails Engine for Production Agents > Rails engine for building and monitoring LLM agents with a DSL, retries/fallbacks, cost analytics, and a dashboard; verified 124★, pushed 2026-04-19. ## Install Copy the content below into your project: ## Quick Use ```bash # Gemfile: gem "ruby_llm-agents" bundle install rails generate ruby_llm_agents:install rails db:migrate rails ruby_llm_agents:doctor ``` ## Intro Rails engine for building and monitoring LLM agents with a DSL, retries/fallbacks, cost analytics, and a dashboard; verified 124★, pushed 2026-04-19. **Best for:** Rails teams who want agent observability (cost/tokens/duration/errors) baked into their app **Works with:** Ruby 3.1+ / Rails 7.0+ and RubyLLM-supported providers (README lists OpenAI/Anthropic/Gemini, etc.) **Setup time:** 20-45 minutes ### Key facts (verified) - GitHub: 124 stars · 6 forks · pushed 2026-04-19. - License: MIT · owner avatar + repo URL verified via GitHub API. - README-backed entrypoint: `rails generate ruby_llm_agents:install`. ## Main - Keep agents as application code: define agents as classes with a DSL and treat them like any other Rails component (jobs/models/routes). - Use the built-in “doctor” task to validate provider keys and configuration before shipping the dashboard to prod. - Gate spend early: README highlights cost analytics and budget controls; set budgets per environment or tenant before onboarding users. - Use evaluation + alerts as your feedback loop: README lists evaluation and alerting features to keep quality measurable over time. ### Source-backed notes - README Quick Start shows installing via Gemfile + `rails generate ruby_llm_agents:install` + `rails db:migrate`. - README shows verifying setup via `rails ruby_llm_agents:doctor` and generating a demo agent. - README lists requirements (Ruby >=3.1, Rails >=7.0) and highlights observability (cost/tokens/duration/errors). ### FAQ - **Do I need a database?**: Yes — Quick Start includes `rails db:migrate` and the dashboard relies on persisted execution data. - **Which providers are supported?**: README states it works through RubyLLM and names OpenAI, Anthropic, Gemini, and others supported there. - **How do I verify my install?**: Run `rails ruby_llm_agents:doctor` as shown in README. ## Source & Thanks > Source: https://github.com/adham90/ruby_llm-agents > License: MIT > GitHub stars: 124 · forks: 6 --- ## Quick Use ```bash # Gemfile: gem "ruby_llm-agents" bundle install rails generate ruby_llm_agents:install rails db:migrate rails ruby_llm_agents:doctor ``` ## Intro RubyLLM::Agents 是 Rails 引擎,用 DSL 构建可观测的 LLM agent:自动重试/降级、预算与成本统计、实时 dashboard;已验证 124★,更新于 2026-04-19。 **Best for:** 希望把 agent 的成本/tokens/耗时/错误等可观测能力直接内置在 Rails 应用里的团队 **Works with:** Ruby 3.1+ / Rails 7.0+,以及 RubyLLM 支持的模型提供商(README 列出 OpenAI/Anthropic/Gemini 等) **Setup time:** 20-45 minutes ### Key facts (verified) - GitHub:124 stars · 6 forks;最近更新 2026-04-19。 - 许可证:MIT;作者头像与仓库链接均已通过 GitHub API 复核。 - README 中可对照的入口命令:`rails generate ruby_llm_agents:install`。 ## Main - 把 agent 当成应用代码:用 DSL 写成类,像 Rails 的其它组件一样进行 review、发布与运维。 - 上线前先跑 doctor:README 给出 `rails ruby_llm_agents:doctor` 用于验证配置与 provider key。 - 先把预算与成本打通:README 提到成本统计与预算控制;建议按环境/租户设置预算,避免上线后失控。 - 用评测 + 告警闭环:README 列出 evaluation 与 alerts 能力,用于长期量化质量并及时发现回归。 ### Source-backed notes - README 的 Quick Start 给出 Gemfile 安装与 `rails generate ruby_llm_agents:install`、`rails db:migrate` 步骤。 - README 展示 `rails ruby_llm_agents:doctor` 用于验证安装与配置,并可生成 demo agent。 - README 列出 Ruby/Rails 版本要求,并强调成本/耗时/错误等可观测能力。 ### FAQ - **需要数据库吗?**:需要;Quick Start 包含 `rails db:migrate`,dashboard 依赖持久化执行数据。 - **支持哪些模型提供商?**:README 说明它通过 RubyLLM 接入,并点名 OpenAI、Anthropic、Gemini 等(以 RubyLLM 支持为准)。 - **如何验证安装成功?**:按 README 运行 `rails ruby_llm_agents:doctor`。 ## Source & Thanks > Source: https://github.com/adham90/ruby_llm-agents > License: MIT > GitHub stars: 124 · forks: 6 --- Source: https://tokrepo.com/en/workflows/rubyllm-agents-rails-engine-for-production-agents Author: Agent Toolkit