Solution
RAG on Rails, without a second stack.
Your embeddings live in your existing Postgres. Retrieval is one DSL call. Streaming answers land in Turbo.
The three primitives
- `Corpus` — a named collection of embedded documents
- `retrieves_from` — one line inside your agent
- `stream :tokens` — tokens over ActionCable to a Turbo Stream
Ingest anything
RailsAgent::Corpus.create!(name: "changelog") do |c|
c.source :html, url: "https://example.com/changelog"
c.source :active_record, model: Article, columns: %i[title body]
end