Active Agent
Build AI in Rails

Production observability for Rails AI agents — traces, evaluations, costs, and team workspaces, built on the open-source Active Agent framework. Point your telemetry at us and ship.

activeagents.ai
REC
Agent
Step 1/6
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, Gemini, Bedrock, 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"

# Google Gemini
generate_with :gemini, model: "gemini-2.0-flash"

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

Resilient by Default

Automatic retries on provider errors. Configure once, apply everywhere.

hover for code tap for code
# config/active_agent.yml
production:
  openai:
    service: "OpenAI"
    model: "gpt-4o"
    retries: true
    retries_count: 3
docs/framework → 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 remote MCP servers.

hover for code tap for code
generate_with :anthropic,
  model: "claude-sonnet-4-5-20250929",
  mcp_servers: [
    {
      type: "url",
      name: "stripe",
      url: "https://mcp.stripe.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

Build with the gem's dev console, then point your telemetry at the platform for production. Same traces, same pipeline — every workspace starts with a free trial.

Trace Timeline
TRACE abc-7f2e
1.24s ~$0.0034 OK
0ms 400ms 800ms 1.2s
TranslationAgent#translate
prompt
#generate
anthropic.messages
anthropic.messages
Modelclaude-sonnet-4
Duration892ms
Tokens2,847
Est. 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 response_present, min_length, llm_judge
Samples 50 / 50 passed
Metrics
Total Requests
12,847
23% vs previous 24h
Avg Latency
847ms
12% faster
Total Cost
$42.18
estimated, 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 5 messages
MESSAGES 9c8506ee cache hit
user "How do I reset my password?"
assistant "I can help with that. Let me look up..."
TOOL CALL 7f2e8a fingerprinted
assistant lookup_user { email: "user@..." }
tool { found: true, user_id: 1847 }
hash: 7f2e8a 234ms
MESSAGES f4e9b9ca generated
assistant "I found your account. I've sent a password reset link to your email." [ user.email]

The Gems

Gem licenses for your codebase — the MIT core is free forever, including a local dev console. Production observability lives in the hosted plans below.

ActiveAgent.dev

MIT License

Free
Local dev console (traces & metrics in development)
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

Visit activeagent.dev

ActiveAgent.PRO

Commercial License

$99
/mo or $995/yr
Versioned agents, prompts, and contexts
Pausable, fault-tolerant multi-agent workflows
Reasonable Reasons: cached, citable reasoning traces
Generative UI & human-in-the-loop controls
Dedicated email support

Production-ready agents

Subscribe to Pro

activeagent-enterprise

Commercial License

$269+
/mo per 100 agents
Organization-wide gem license
Workflow generators & deterministic 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 (OpenAI, Anthropic, Gemini, Bedrock, Ollama, RubyLLM…)
Instrumentation, Error Handling, Retries
Streaming & Structured Output
Dev console (local traces & metrics)
Active Agent Pro
Versioned agents, prompts & contexts
Generative UI components
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

Production observability for your agents — traces, costs, evaluations, and team workspaces. Point your gem's telemetry at us and ship. Every workspace starts with a free trial: 25 executions and 250 traces/month.

Watch

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

Judge

Rule-based checks and LLM-as-judge evaluations on production output.

Ship

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

Dev Console

In the free gem, for development

Free
One command: rails g active_agent:dashboard:install
Local traces & metrics while you build
Runs in your development environment
Community support on GitHub & Discord
MIT licensed

See your agents while you build

Get Started

Pro Platform

For small/medium teams

$99
/month or $995/yr
5 team seats, 1 workspace
25,000 traces/month (14-day retention)
10,000 agent executions/month
Rule-based + LLM-as-judge evaluations
48-hour email support

We watch your agents in production

Start Free Trial

Enterprise Platform

For serious agent deployments

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

Custom quotas, retention, and support

Contact Sales

Platform Feature Comparison

Dev Console (gem) Pro Platform Enterprise
Infrastructure
Web UI dashboard Local dev only Hosted Hosted
Agent deployments 3 Unlimited
Executions / month Local dev only 10,000 Unlimited
Traces / month Local dev only 25,000 500,000+
Trace retention While you develop 14 days 400 days
Private VPC / on-premise
Agent rate limiting
Observability & Evaluation
Cost & latency analytics Tokens & latency only
Rule-based evaluations DIY
LLM-as-judge evaluations DIY
Unlimited custom
Conversation history & provenance Via solid_agent
Team & Security
Team seats 5 Unlimited
Workspaces 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's free and what's paid?

The gem — the framework, every provider, and a local dev console — is MIT licensed and free forever. Production observability and monitoring live on the hosted platform: every workspace starts with a low-volume free trial, and paid plans lift the limits. Commercial gem extensions and services are separate.

Which providers are supported?

OpenAI, Anthropic, Google Gemini, AWS Bedrock, Azure OpenAI, Ollama, OpenRouter, Requesty, and RubyLLM (which unlocks 15+ more). Switch providers with one line of code.

How does the hosted platform get my data?

Your app's gem posts trace JSON to our ingest endpoint, authenticated with your workspace API key — one YAML block in config/active_agent.yml. In development the same traces stay local in the gem's dev console; the wire format is documented and open.

What's the difference between the free gem and Pro?

The free gem covers the framework, all providers, and the local dev console. ActiveAgent.PRO ($99/mo or $995/yr) adds versioned agents and prompts, pausable multi-agent workflows, cached reasoning traces, generative UI with human-in-the-loop controls, and email support.

Do I need the platform to get observability?

For production, yes. The gem includes a dev console (rails g active_agent:dashboard:install) so you can watch traces while you build, but production monitoring — hosted ingestion, evaluations, conversation history, cost estimates, retention, and team workspaces — is the platform. Every workspace starts with a free low-volume trial.

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 everything?

The framework is MIT licensed with no limits — your agents and data never leave your infrastructure, and the gem's dev console keeps development traces local. Production observability (evaluations, retention, teams) is the hosted platform's job; if your traces can't leave your network, Enterprise includes private VPC deployment.