# AI use cases for Reef (Human-Agent-Society/reef)

Repo: [Human-Agent-Society/reef](https://github.com/Human-Agent-Society/reef) | Use cases: 3 | Page: https://dedupedai.com/use-cases/human-agent-society-reef/

Reef is open-source infrastructure that connects agent inference, feedback, learning, and versioned delivery so that models or agent harnesses keep improving.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Let your coding agent harness improve itself from requests: https://dedupedai.com/use-cases/human-agent-society-reef/let-agent-harness-self-improve/
- Train model weights from your own scored responses: https://dedupedai.com/use-cases/human-agent-society-reef/train-model-weights-from-feedback/
- Serve a model behind an API that records every interaction: https://dedupedai.com/use-cases/human-agent-society-reef/serve-model-with-recorded-interactions/

## How to let your coding agent harness improve itself from requests with Reef

Repo: [Human-Agent-Society/reef](https://github.com/Human-Agent-Society/reef) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Run Reefine against a local model endpoint, then ask in plain language for harness changes.

**Who it is for:** A developer who runs a coding agent day to day and wants its prompts, rules, and skills to get better without training any model.

**The problem:** Agent instructions and skills stay static, so the same corrections are repeated in every session.

**The outcome:** A versioned harness that reflects your requests, installed in a separate directory and ready to review or roll back.

### Steps

1. Install the package with `uv pip install reef-infra` inside an activated virtual environment.
2. Start the harness recipe with `reef serve --recipe reefine --inference.upstream-url http://127.0.0.1:11434 --inference.upstream-model gemma4:26b`. (inferred, check the README)
3. Create a scenario with `curl -fsS -H "Content-Type: application/json" -d '{"name": "my-harness"}' http://127.0.0.1:8901/reef/scenarios`. (inferred, check the README)
4. Install the harness with `curl -fsS -H "x-reef-scenario: my-harness" 'http://127.0.0.1:8901/reef/harness/install?adapter=pi' | bash`, after checking the script contents. (inferred, check the README)
5. Ask for a change with `reef-pi evolve "when I ask you to fix a bug, reproduce it with a failing test first"`.
6. Review versions with `/versions` inside a reef-pi session and install one with `/versions   install`.

### Prompt to paste into your agent

```text
Using the Human-Agent-Society/reef repo, set up the Reefine harness recipe against the local model endpoint at <model endpoint URL> and install a scenario named <scenario name>. Report the output of reef-pi evolve and confirm the install root is outside the project directory.
```

### Caveat

The README says the install root must stay outside the project the agent works in, because a session could otherwise change what the next session runs.

Risk, remote script: The documented install pipes a script from the local Reef server into bash, so read the script before running it and keep the install root outside your working project.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/human-agent-society-reef/let-agent-harness-self-improve/

## How to train model weights from your own scored responses with Reef

Repo: [Human-Agent-Society/reef](https://github.com/Human-Agent-Society/reef) | Difficulty: Advanced | Time: 3 hours | Basis: From the README

Run the SAO example deployment and report scores so eligible rollouts drive training steps.

**Who it is for:** An ML engineer with a supported GPU who wants a small model tuned to their own task using scores they can produce.

**The problem:** Feedback on model answers is collected but never turned into updated weights.

**The outcome:** A running Reef deployment that updates weights from scored rollouts and serves the current version without a restart.

### Steps

1. Install git-lfs, then run `git lfs install` and `git clone https://github.com/Human-Agent-Society/reef.git` followed by `cd reef`.
2. Create an environment with `uv venv && source .venv/bin/activate` and install with `uv pip install -e ".[slime]" && uv pip install --no-deps --group runtime`.
3. Start the example with `reef serve -c recipes/sao/examples/imo_answerbench/serve.yaml --inference.model-path "$MODEL_PATH" --reef.port "8900"`. (inferred, check the README)
4. Confirm readiness with `curl -f http://127.0.0.1:8900/healthz`.
5. Send requests with the `x-reef-scenario` header and post a score and feedback to `/reef/report` using the receipt from `x-reef-agent-record-id`.

### Prompt to paste into your agent

```text
Using the Human-Agent-Society/reef repo, start the SAO example deployment with the model <model path> on port 8900, then send 5 test requests through the scenario header and report each with a score. Expected output: 5 successful /reef/report calls and a passing /healthz check.
```

### Caveat

The README says this path needs a supported GPU stack and an environment that meets the Evolve your model requirements, so it will not run on an ordinary laptop.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/human-agent-society-reef/train-model-weights-from-feedback/

## How to serve a model behind an API that records every interaction with Reef

Repo: [Human-Agent-Society/reef](https://github.com/Human-Agent-Society/reef) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Run Reef as an inference server that accepts OpenAI- and Anthropic-style requests.

**Who it is for:** A developer who wants a single endpoint for agent traffic that keeps interaction records for later learning.

**The problem:** Agent requests go straight to a model server, so no record exists that feedback could later attach to.

**The outcome:** A local endpoint that answers provider-compatible requests and returns a receipt header for each interaction.

### Steps

1. Install with `uv venv && source .venv/bin/activate` then `uv pip install reef-infra`.
2. Start the server with `uv run reef serve --inference.model-path Qwen/Qwen2.5-1.5B-Instruct`.
3. Send a request to `/v1/chat/completions` with an `x-reef-scenario` header and read the `x-reef-agent-record-id` response header.
4. Report feedback to `/reef/report` with the receipt in the `references` list.

### Prompt to paste into your agent

```text
Using the Human-Agent-Society/reef repo, start Reef as an inference server for the model <model path>, send one chat completion request, and print the x-reef-agent-record-id header. Expected output: a response body in OpenAI format and a non-empty receipt.
```

### Caveat

The README gives this pure inference server as a minimal example, and the feedback and learning steps only run once a recipe is configured.

Dual-use notice: only use this on software, sites and systems you own or are authorized to test.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/human-agent-society-reef/serve-model-with-recorded-interactions/
