Active Agent
Build AI in Rails

Active Agents assist you, so you can focus on your product, and your customers don't even have to.

See what's included

What's in the Box

Everything to build agents in Rails. Free forever.

Agents are Controllers

Actions, callbacks, views. Your agents speak Rails.

hover for code tap for code
class TranslationAgent < ApplicationAgent
  generate_with :openai, model: "gpt-4o"

  def translate
    prompt message: "Translate '#{params[:text]}' to #{params[:target_lang]}"
  end
end

TranslationAgent.with(text: "Hello", target_lang: "es").translate.generate_now
docs/agents → hover to flip back tap to flip back

Action Prompt

Composable prompts. Like Action Mailer, but for AI.

hover for code tap for code
def summarize
  prompt(
    instructions: "Summarize in 2-3 sentences",
    message: params[:text],
    temperature: 0.3
  )
end

SummaryAgent.with(text:).summarize.generate_now
docs/actions → hover to flip back tap to flip back

Any LLM

OpenAI, Anthropic, Ollama. Switch with one line.

hover for code tap for code
# OpenAI
generate_with :open_ai, model: "gpt-4o"

# Anthropic
generate_with :anthropic, model: "claude-sonnet-4-5-20250929"

# Ollama (local)
generate_with :ollama, model: "llama3"
docs/providers → hover to flip back tap to flip back

Resilient by Default

Retries, backoff, graceful failures. Agents that don't give up.

hover for code tap for code
class ReliableAgent < ApplicationAgent
  generate_with :openai,
    model: "gpt-4o",
    retries: 3,
    backoff: :exponential

  on_error :handle_failure
end
docs/agents/retries → hover to flip back tap to flip back

Streaming

Real-time responses. Your agents think out loud.

hover for code tap for code
class ChatAgent < ApplicationAgent
  generate_with :openai, model: "gpt-4o", stream: true

  on_stream :handle_chunk

  def chat
    prompt message: params[:message]
  end

  private

  def handle_chunk(chunk)
    print chunk.delta if chunk.delta
  end
end
docs/streaming → hover to flip back tap to flip back

Structured Output

JSON schemas, typed data. Agents that follow instructions.

hover for code tap for code
def parse_resume
  prompt(
    message: "Extract: #{params[:data]}",
    response_format: :json_schema
  )
end
# Loads schema from views/agents/*/parse_resume.json
docs/structured_output → hover to flip back tap to flip back

Tool Calling

AI calls Ruby methods. Fetch data, take actions, make decisions.

hover for code tap for code
def weather_update
  prompt(
    message: params[:query],
    tools: [{
      name: "get_weather",
      description: "Get weather for a location",
      parameters: { type: "object", properties: {
        location: { type: "string" }
      }, required: ["location"] }
    }]
  )
end

def get_weather(location:)
  # AI calls this method automatically
end
docs/tools → hover to flip back tap to flip back

MCP Support

Model Context Protocol. Connect agents to any MCP server.

hover for code tap for code
generate_with :anthropic,
  model: "claude-sonnet-4-5-20250929",
  mcp_servers: {
    filesystem: {
      command: "npx",
      args: ["-y", "@anthropic/mcp-fs"]
    },
    github: { url: "https://mcp.github.com" }
  }
docs/mcp → hover to flip back tap to flip back

Background Jobs

ActiveJob integration. Run agents async, at scale.

hover for code tap for code
# Queue for later
ApplicationAgent.prompt(message: "Analyze").generate_later

# With options
ApplicationAgent.prompt(message: "Report").generate_later(
  queue: :reports,
  wait: 5.minutes
)

# Configure queue at class level
self.generate_later_queue_name = :ai_tasks
docs/generation → hover to flip back tap to flip back

Observe Every Interaction

Trace, measure, and evaluate your agents. Built-in observability for production AI.

Trace Timeline
TRACE abc-7f2e
1.24s $0.0034 200
0ms 400ms 800ms 1.2s
TranslationAgent#translate
prompt
#generate
anthropic.messages
anthropic.messages
Modelclaude-sonnet-4
Duration892ms
Tokens2,847
Cost$0.0089
💭 extended_thinking
Reasoning Trace
"The user wants Spanish translation. I should use natural, conversational Spanish rather than formal. 'Hello world' is a greeting..."
Thinking tokens1,600
Time412ms
2,847 tokens
🧠 1,600 ↓ 892 ↑ 355
response
Evaluations
EVALUATION Translation Quality 2 min ago
Accuracy
0.94
Accuracy Score

Measures semantic correctness of translation

Min: 0.89 | Max: 0.98 | Avg: 0.94
Fluency
0.88
Fluency Score

Natural language flow and readability

Min: 0.82 | Max: 0.95 | Avg: 0.88
Faithfulness
0.72
Faithfulness Score

Preservation of original meaning

⚠ Below threshold (0.80)
Model Judge claude-3-haiku
Criteria semantic_similarity, grammar, tone
Samples 50 / 50 passed
Metrics
Total Requests
12,847
23% vs last week
Avg Latency
847ms
12% faster
Total Cost
$42.18
this period
Tokens Used
2.4M
↓ 1.8M ↑ 0.6M
Requests / Hour Last 24h
582 requests
12:00 - 13:00
Interactions
SESSION user_8f2a_chat 3 fragments
FRAGMENT frag_a8c2 cache hit
user "How do I reset my password?"
assistant "I can help with that. Let me look up..."
TOOL FRAGMENT frag_b3d1 deterministic
assistant lookup_user { email: "user@..." }
tool { found: true, user_id: 1847 }
hash: 7f2e8a 234ms
FRAGMENT frag_c9e4 generated
assistant "I found your account. I've sent a password reset link to your email." [ user.email]

The Gems

Give your Rails app an agent. MIT core, commercial extensions.

ActiveAgent.dev

MIT License

Free
Active Agent Web UI Dashboard
Action Prompt for composable prompt contexts
Solid Agent for context management and persistence
Streaming
Structured outputs
Error handling and retries
Community support on GitHub & Discord

Ship your first agent today

Get Started

ActiveAgent.PRO

Commercial License

$99
/mo or $995/yr
Generational Versioned agents, prompts, and contexts
Multi-agent workflows that can be paused, fault-tolerant, & resume
Reasonable Reasons for fragment cached context references
Generative UI & Human-in-the-loop keep the Agents on the Rails
Dedicated email support

Production-ready agents

Subscribe to Pro

activeagent-enterprise

Commercial License

$269+
/mo per 100 agents
Enterprise gem available for entire organization
Generative Workflow Generators
Deterministic Generative Tasks
Multi-app & embedded licensing
Dedicated support channel

Agents at scale

Contact Sales

Gem Feature Comparison

activeagent activeagent-pro enterprise
Core Framework
Active Agent
Action Prompt
Generation Providers (RubyLLM, OpenAI, Anthropic)
Instrumentation, Error Handling, Retries
Streaming & Structured Output
Agent Management Web UI
Active Agent Pro
Observable Evaluations & Compliance
Generative UI & Generative Generators
Parallel tasks & advanced retries
HITL generative UI
Agentic workflows (pausable multi-agent)
Async tasks with external triggers
Agent rate limiting
Licensing
License type MIT Commercial Commercial
Multi-app / embedded licensing
Custom terms
Support
Community (Discord, GitHub)
Email support
Priority support

The Platform

See what your agents are up to. Hosted and monitored.

Watch

Traces, costs, latency. Know exactly what your agents are doing and what they cost.

Judge

LLM-as-judge evals, A/B testing. Let agents grade each other's work.

Ship

Team workspaces, dashboards, SSO. Built for teams shipping agents together.

Self-Hosted

For developers

Free
Run the Web UI locally
Unlimited agents & executions
Local trace storage
Community support on GitHub & Discord
MIT licensed, forever free

Full control, your infrastructure

Get Started

Pro Platform

For small/medium teams

$99
/month or $500/yr
5 team seats, 1 workspace
25,000 traces/month (14-day retention)
10,000 agent executions/month
Analytics, A/B testing & 5 prebuilt evaluators
48-hour email support

Let us watch your agents so you don't have to

Start Free Trial

Enterprise Platform

For serious agent deployments

$2,000+
/year
Unlimited seats & workspaces
500k+ traces/month, 400-day retention
Unlimited agent executions
SSO, SOC 2, HIPAA, Private VPC
Dedicated Slack, 4-hour SLA

When your agents need enterprise-grade babysitting

Contact Sales

Platform Feature Comparison

Self-Hosted Pro Platform Enterprise
Infrastructure
Web UI dashboard Local Hosted Hosted
Agent deployments Unlimited 3 Unlimited
Executions / month Unlimited 10,000 Unlimited
Traces / month Unlimited 25,000 500,000+
Trace retention You control 14 days 400 days
Private VPC / on-premise
Agent rate limiting
Observability & Evaluation
Cost & latency analytics
LLM-as-judge evaluators DIY 5 prebuilt Unlimited custom
A/B prompt testing
Anomaly detection (ML)
Team & Security
Team seats Unlimited 5 Unlimited
Workspaces Unlimited 1 Unlimited
SSO / SAML & RBAC
SOC 2 Type II & HIPAA
Support
Community support
Email support SLA
48 hours 4 hours
Dedicated Slack channel

Platform Add-Ons

Scale beyond your plan with usage-based pricing

Pro Add-Ons

Additional traces: $2.00/1k
Additional executions: $0.01/exec
Extended retention (400 days): $2.50/1k
Additional team seats: $19/seat/mo
Additional workspaces: $49/workspace/mo

Enterprise Add-Ons

Additional traces: $1.50/1k
Additional executions: $0.005/exec
Extended retention: Included
Additional seats & workspaces: Included
Appliance/embedded license: $14,995/yr

Services

We'll help you ship agents faster

Workshops

$2,500 half-day | $4,500 full-day

Build your first agent in a day
Hands-on coding, not slides
Architecture patterns that scale
Code review & Q&A
Custom curriculum available

Learn by building

Join a Workshop

Advisory

From $3,000/month

Your dedicated AI architect
Strategy, code reviews, PR feedback
Train your team as you build
Async Slack access
Cancel anytime, 30-day notice

Expert on your team

Schedule a Call

Development

$250/hr or project-based

We build your agents for you
Integrate with your Rails app
Optimize & deploy to production
Flexible: hourly or fixed-price
SOW with clear milestones

We ship, you own

Get in Touch

FAQ

Common questions about Active Agent

How do I install Active Agent?

Add gem 'activeagent' to your Gemfile and run bundle install. Then run rails generate active_agent:install to set up the initial configuration.

What gems are included in the free tier?

The free tier includes the Active Agent gem, Action Prompt, and all Generation Provider modules (RubyLLM, OpenAI, Anthropic — both official and community gems). You also get Instrumentation, Error Handling, and Retries modules at no cost.

Which Generation Providers are supported?

Active Agent supports multiple providers through its Generation Providers module: RubyLLM, OpenAI (official and community gems), Anthropic (official and community gems), Ollama, and OpenRouter. Switch providers with one line of code.

What are the Reasonable Reasons gems in Pro?

The Reasonable Reasons gems are Pro-tier modules that include Observable Evaluations, Observable Compliance, Deterministically Generative, Generally Deterministic, Generative UI, and Generative Generators (with self-healing capabilities). These gems add advanced analytics and generative capabilities to your agents.

What's the difference between Community and Pro?

The Community (Dev) tier gives you full access to the open-source Active Agent gem, Action Prompt, all Generation Providers, and core modules (Instrumentation, Error Handling, Retries) — free forever. Pro ($99/mo or $995/yr) adds the Reasonable Reasons gems, HITL generative UI, parallel tasks & retries, agentic workflows with pausable multi-agent actions, async tasks with external triggers, hosted observability, and 48-hour email support SLA.

What are agentic workflows?

Agentic workflows in the Pro tier allow you to break complex tasks into many agents' actions, which can be paused between tasks. Combined with HITL generative UI and async tasks with external triggers (webhooks, human approval, timeouts), you can build sophisticated human-in-the-loop AI systems.

Can I use Active Agent with existing Rails apps?

Yes! Active Agent is designed to integrate seamlessly with existing Rails applications. It works alongside your existing models, controllers, and services.

Can I self-host Active Agent?

Absolutely! The core framework is MIT licensed and can be self-hosted without limits on any tier. The hosted services (observability, evaluation, collaboration) and Pro gems are what differentiate the paid tiers.

Ready to build AI products in Rails?