- Execution tracking with cost/token analytics - Reliability (retries, model fallbacks, circuit breakers) - Budget controls (daily/monthly limits per agent or tenant) - Workflow orchestration (pipelines, parallel, routers) - Real-time monitoring dashboard
Example:
class SearchAgent < ApplicationAgent
model "gpt-4o"
reliability do
retries max: 3, backoff: :exponential
fallback_models "gpt-4o-mini", "claude-3-5-sonnet"
end
param :query, required: true
def user_prompt
"Extract search intent from: #{query}"
end
end
result = SearchAgent.call(query: "red shoes under $50")
result.content # structured response
result.total_cost # $0.00025
GitHub: https://github.com/adham90/ruby_llm-agentsI've been using it in production for a few months. Happy to answer questions.
ndgold•29m ago