class RubyLLM::AgUI::Rails::Record

The durable form of one core run record.

The core RunRecord stays the authority; this row is where it lives between requests, so a run reserved on one Puma worker is the same run on the next. Identity is duplicated out of the payload into indexed columns so a thread can be listed without parsing JSON, and the payload is written whole because a record is immutable: there is no partial update to make.

The payload is JSON text, not a database JSON column. The record is never queried by content, and encoding it here keeps the stored shape exactly ‘RunRecord#to_storage` on every database and every Rails version, instead of inheriting whichever encoder the host’s ActiveSupport picks.

Create the table with ‘bin/rails generate ruby_llm:ag_ui:install`.