activeagents/activeagent

ActiveAgent Rails framework for Agent Apps

What it solves

Active Agent provides a structured framework for integrating AI into Ruby on Rails applications. It replaces the ad-hoc integration of LLMs with "Agent-Oriented Programming," treating agents as modular, reusable components (similar to how controllers work in Rails) to improve code maintainability and scalability in AI-driven apps.

How it works

The framework allows developers to define agents as Ruby classes inheriting from a base agent class. These agents can be configured to use various LLM providers (OpenAI, Anthropic, Ollama, etc.) via a configuration file. Developers define "actions" as methods within these agent classes to encapsulate specific AI tasks. The system supports prompt templates using ERB, streaming responses via ActionCable, and structured JSON outputs.

Who it’s for

Ruby on Rails developers who want to build complex AI applications using familiar Object-Oriented Ruby patterns and a structured architectural layer for their AI logic.

Highlights

  • Agent-Oriented Programming: Integrates AI logic into the Rails framework using familiar patterns.
  • Multiple Provider Support: Compatible with OpenAI, Anthropic, Ollama, and RubyLLM.
  • Multimodal Capabilities: Supports data extraction from images, PDFs, and text.
  • Agent Delegation: Allows a primary agent to delegate tasks to sub-agents with defined contracts and budgets (cost/latency).
  • Tool/Function Calling: Enables agents to interact with external services through tools.
  • Observability Dashboard: An optional companion gem (actionagent) provides traces, token usage, and per-agent metrics.

Related

  • Project
  • Project
  • Project
  • Project
  • Project