module Riffer::Agent::Serializer

Riffer::Agent::Serializer turns a resolved agent into a self-contained, provider-neutral data hash and back into a runnable agent. A pure module (sibling to Riffer::Agent::Run), reached most often through the +Riffer::Agent#to_h+ / Riffer::Agent.from_h delegators.

The hash carries only data — no Procs, no class references, no tool runtime. The same hash serves two rehydration targets:

What does not transfer

Guardrails and the skills subsystem (backend/adapter/catalog) are not serialized; a rebuilt agent enforces no guardrails and renders no skills catalog (the skill_activate tool, if present, crosses as an ordinary tool). Secrets must not be placed in provider_options/model_options: both ride on the wire as plain data.