A framework, not a wrapper
Protege is a Rails engine you mount into your own app — not a service you call or a chatbot you bolt on. The model is one swappable piece; the framework is everything around it.
A Rails engine for building an AI agent that works inside your app — reachable by email, acting through the models and jobs you already have, on its own schedule. You build the agent and point it at your preferred LLM.
Protege is a framework for building agentic applications — products with an AI agent inside them. It ships as a Rails engine you mount into your own app. The agent isn't a separate service you shuttle context to, and it isn't a chatbot you bolt on the side. It runs in your process, shares your models and jobs, and reaches the outside world the way a colleague would — over email.
The mental model is hiring someone. When a person joins a team you do two things: you give them an email address so they can communicate, and you give them access to a workspace so they can do the work. Protege is exactly that:
Rails supplies everything else an agent needs for free: Active Job runs the asynchronous work, Action Mailbox receives the mail, and your database persists every thread, message, and action.
It's tempting to assume the interesting bit of an agent is the language model. It isn't. The model is a commodity — you can swap which one answers with a single line of config.
What actually makes an agent useful is everything around the model, and that's what Protege is: a durable identity with an inbox; a memory of every conversation; the tools that let it act on your data; the schedule that lets it act unprompted; the guardrails on who can reach it and what it can do; and the audit trail of everything it did. In Protege the provider — which LLM does the inference — is just one of four extension types, a single pluggable class you can replace without touching anything else. The framework is the product; the model is a detail.
These docs build one running example — The Scoop, an ice cream company that runs its support and order management on Protege. Its Rails app already has Customer, Order, Flavor, and Refund models. Onto that it hires two agents:
support@thescoop.com) — the customer-facing agent: answers questions, looks up orders, issues refunds, reads a photo a customer attached.ops@thescoop.com) — an internal agent, locked to company senders, that files the morning low-stock report on a schedule.Each concept in these docs is introduced by giving Sundae or Scout something new. Follow the tutorial to build The Scoop end to end, or jump to the reference for any surface.
A colleague communicates over email, so Protege does too. It's a deliberate choice, not a fallback: