Concepts

The core loop

Reef improves an agent in a loop of four stages: serve, observe, grow and commit. Each scenario, one workload with its own records, recipe, training state and artifact history, runs its own loop. An artifact is one saved version of a component, such as model weights or a harness tree.

How it works #

Rendering diagram…

Serve. Reef forwards the agent's model request to the artifact that the scenario serves, or to the upstream provider, and records the exchange with the answering artifact's ID. The response carries the record's ID, the receipt, in x-reef-agent-record-id. A harness client installs the active harness tree before each session.

Observe. The agent, a grader or a user sends a report: feedback, such as a score, with the graded receipts in references. The recipe's record-to-sample stage turns records and reports into training samples.

Grow. When job_samples samples wait, the recipe's sample-to-job stage makes a job. A weight job trains from the training start and saves checkpoints. A harness job edits the start's tree and evaluates it on tasks, by default against the current tree.

Commit. Reef saves each new artifact and appends a commit to the scenario's history. The activation rule (always by default, never or evaluated) decides whether it serves. Served or not, it becomes the next training start.

Seven services run these stages and pass work through a shared store; Services says which runs what.

What you can rely on #

  • Each record names the artifact that answered; each report names the records it grades.

  • An artifact never changes. Serving it or training from it adds no artifact.

  • Activating an older artifact changes only serving; train-from changes the training start.

  • Reef stores a commit before inference loads its artifact (state model).

Reference #

Services, Glossary, HTTP API, and Use or write a recipe for the stages a recipe supplies.