Open-Source Reef Turns Agent Feedback Into Live Model Updates Automatically
Reef is an open-source backend that serves agent traffic, collects feedback, and continuously retrains both model weights and agent harnesses in place.
- Reef is open-source continual learning infrastructure that sits between agents and model providers.
- OpenAI- and Anthropic-compatible endpoints record a receipt for every inference call.
- Feedback posted against receipts drives updates to either model weights or the agent harness.
- Ships recipes: sao, tttd, openclawrl for weights; skillclaw and gepa for harness evolution with no GPU.
- Hot-swaps new versions into the live server without restart, with built-in version history.
- Apache-2.0, installable as
reef-infra, docs at reefinfra.ai.
Reef connects agent feedback to live model updates
Reef is a new Apache-2.0 open-source project that coordinates inference, feedback collection, training, evaluation, and deployment. It sits between an agent and its model infrastructure, records each interaction, accepts scores or written critiques, and publishes accepted model or harness updates to the live server. The repository passed 1,000 GitHub stars within days of launch.
Each proxied request receives a durable record ID that links the model output to later feedback. By preserving that connection, Reef can turn production interactions into eligible training records without a separate trace-matching pipeline.
Four modules close the loop
- Serve. Accept agent requests, return model responses, and record the interactions.
- Observe. Match incoming scores or critiques to the recorded requests.
- Grow. Use the configured recipe to produce updated weights or an updated agent harness.
- Commit. Evaluate the candidate, publish accepted changes, and add the result to version history.
The Observe stage uses receipt IDs rather than trying to infer which response a score belongs to. Recipes can then select eligible records, wait for enough feedback, and determine how an update should be built and evaluated.
A familiar API with durable receipts
| Method and path | Purpose |
|---|---|
POST /v1/chat/completions |
Accept OpenAI-compatible chat completion requests. |
POST /v1/messages |
Accept Anthropic-compatible message requests. |
POST /reef/report |
Attach a numeric score, written feedback, and references to recorded interactions. |
The inference response includes an x-reef-agent-record-id header. Clients retain that value and submit it in the references array when reporting an outcome.
The client must preserve the response header, grade the result, and send the grade back to Reef:
import os
import httpx
reef = httpx.Client(
base_url="http://localhost:8900",
headers={
"Authorization": f"Bearer {os.environ['REEF_TOKEN']}",
},
timeout=60,
)
model_path = os.environ["MODEL_PATH"]
response = reef.post(
"/v1/chat/completions",
json={
"model": model_path,
"messages": [
{
"role": "user",
"content": "Return exactly: reef is ready",
}
],
},
)
response.raise_for_status()
receipt = response.headers["x-reef-agent-record-id"]
answer = response.json()["choices"][0]["message"]["content"]
report = reef.post(
"/reef/report",
json={
"score": float(answer.strip() == "reef is ready"),
"feedback": "matched",
"references": [receipt],
},
)
report.raise_for_status()This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.