reef / recipes
AGENTS.md7.5k starsChanged 3 months agoApache-2.0View on GitHub
Every example is a self-contained Harbor task + Reef harness that run.sh wires together through reef-eval. Copy recipes/basic/ as a starting point; a method's examples live under recipes/<method>/examples/<example>/; it is the minimal valid structure. The example directory is not a Python package. There is no my_example/__init__.py. The harness/ subdirectory is the package, and pyproject.toml declares it: Only examples that do not use reef-eval (for example, a direct reef_client campaign driver) should omit the reef-eval dependency. run.sh installs it into reef-eval's…
- Reads credentials
Trending
More talk lately.about the whole repository
Who's talking about Human-Agent-Society/reef
- @reponews.bsky.social“Human-Agent-Society/reef [Apache License 2.0] 継続学習で自己改善するエージェント基盤です 運用後の伸びが面白いです 言語:Python, TypeScript …”Bluesky · Sep 27, 2026 · 1 likes
- tayyabimam1/awesome-ai-agent-stack“Add Reef to Deployment, Serving & MLOps”GitHub · Oct 5, 2026
- natnew/awesome-agentops“Add Reef to Deployment and Runtime Infrastructure”GitHub · Oct 4, 2026
- PyTorchKR/landscape“[Add] Reef (Human-Agent-Society/reef)”GitHub · Oct 3, 2026
- natnew/awesome-recursive-self-improvement“Add Reef to Frameworks and Implementations”GitHub · Oct 3, 2026
The biggest 5 of 17 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 17
Talked about on GitHub and Bluesky (17 times).
On GitHub · 16
- Oct 5, 2026Add Reef to Deployment, Serving & MLOps — tayyabimam1/awesome-ai-agent-stack0 reactions · 1 comment
- Oct 4, 2026Add Reef to Deployment and Runtime Infrastructure — natnew/awesome-agentops0 reactions
- Oct 3, 2026[Add] Reef (Human-Agent-Society/reef) — PyTorchKR/landscape0 reactions
- Oct 3, 2026Add Reef to Frameworks and Implementations — natnew/awesome-recursive-self-improvement0 reactions
- Oct 2, 2026Add Reef to Runtime Foundations & Control Layers — walkinglabs/awesome-harness-engineering0 reactions
11 more on GitHub
- Oct 1, 2026Add Reef to Agent Infrastructure — kaushikb11/awesome-llm-agents0 reactions
- Sep 29, 2026Add Reef to Observability and eval-ops — RyanAlberts/best-of-Agent-Harnesses0 reactions
- Sep 28, 2026Add Reef to Industry updates — yangchou19/Awesome-LLM-Continual-Learning0 reactions
- Sep 27, 2026Add Reef to Skills and instruction management — jimy-r/awesome-agent-workspaces0 reactions · 1 comment
- Sep 26, 2026Add Reef to Open-Source Frameworks & Tools — ballooooooon/awesome-rsi0 reactions
- Sep 25, 2026Reef — エージェントを継続学習させる基盤のビジュアル解説 — 53able/docs-site0 reactions
- Sep 24, 2026docs(non-cc): screenshot-lead research batch 07 (plan 0008 row 20) — qte77/ai-agents-research0 reactions
- Sep 23, 2026feat(client): import records with resumable batch uploads — Human-Agent-Society/reef-client0 reactions
- Sep 9, 2026Add Reef to Projects → useful supporting infrastructure — Liuziyu77/Awesome-RSI0 reactions
- Sep 7, 2026Curate CoSkill, MCE, Reef, and Meta-Harness — YuxingLu613/awesome-agentic-evolution0 reactions
- Sep 4, 2026[Feature Request] Evaluate REEF Multi-Agent Simulation & Consensus Framework (Human-Agent-Society/reef) — KoshiirRa/midgley0 reactions · 3 comments
On Bluesky · 1
- Sep 27, 2026Human-Agent-Society/reef [Apache License 2.0] 継続学習で自己改善するエージェント基盤です 運用後の伸びが面白いです 言語:Python, TypeScript 種類:AI/Other ⭐ Star: +1151 🔀 Fork:… — @reponews.bsky.social1 likes and repost
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Every example is a self-contained Harbor task + Reef harness that run.sh wires together through reef-eval.
- Very specific: line 49
Only examples that do not use reef-eval (for example, a direct reef_client campaign driver) should omit the reef-eval dependency.
- Very specific: line 85
When the task verifier's reward is feedback consumed by the scenario's recipe, a background thread watches for Harbor's result.json and …
- Distinctive: line 98
Only use this path when the recipe consumes the verifier reward.
- Very specific: line 125
Keep shipped Reef configuration in the versioned public layout.
- Very specific: line 140
Start reef serve -c <yaml> in the background.
- Very specific: line 143
Run reef-eval with --with-editable "$PWD" (installs harness/) and --with reef-client (installs the SDK from PyPI).
- Very specific: line 227
If two examples share a pattern (scoring, sandboxing, search), each copies its own copy.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
How to write a new example
Every example is a self-contained Harbor task + Reef harness that run.sh
wires together through reef-eval.
Copy recipes/basic/ as a starting point; a method's examples live under
recipes/<method>/examples/<example>/; it is the minimal valid structure.
Directory layout
my_example/
harbor/ task definition (consumed by reef-eval/Harbor)
task.toml metadata, timeouts, resource limits
instruction.md the prompt shown to the model
environment/
Dockerfile container image the verifier runs in
solution/ optional seed/initial solution files
tests/
test.sh verifier: writes reward to /logs/verifier/reward.txt
harness/ agent harness (imports reef_client, not reef)
__init__.py lazily exports HarborAgent
agent.py HarborAgent(BaseAgent) — the agent logic
report.py optional: post a trainable verifier reward to Reef
my_example.yaml Reef config (recipe, inference, training, HTTP settings)
run.sh starts reef serve, then runs reef-eval with the harness
pyproject.toml makes harness/ importable by reef-eval's uvx environment
README.md what the example demonstrates and how to run itNo top-level __init__.py
The example directory is not a Python package. There is no
my_example/__init__.py. The harness/ subdirectory is the package, and
pyproject.toml declares it:
[project]
requires-python = ">=3.12"
dependencies = [
"reef-client",
"reef-eval[harbor]",
]
[tool.setuptools.packages.find]
where = ["."]
include = ["harness*"]Only examples that do not use reef-eval (for example, a direct
reef_client campaign driver) should omit the reef-eval dependency.
run.sh installs it into reef-eval's ephemeral environment with
--with-editable "$PWD".
harness/__init__.py
Lazily export HarborAgent so importing the harness package does not require
the harbor runtime — reef-eval loads it when resolving
--agent harness:HarborAgent:
__all__ = ["HarborAgent"]
def __getattr__(name: str):
if name == "HarborAgent":
from .agent import HarborAgent
return HarborAgent
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")harness/agent.py
Subclass harbor.agents.base.BaseAgent. The run() method is the agent
logic: call the model through Reef's /v1/chat/completions, write the answer
to the path the instruction names, and stash the inference receipt in
context.metadata so the reporter can link the verifier reward back to it.
Connection settings come from environment variables set by run.sh:
REEF_SERVICE_URL(required)REEF_SCENARIO(required)REEF_TOKENREEF_TIMEOUT_S
When the task verifier's reward is feedback consumed by the scenario's recipe,
a background thread watches for Harbor's result.json and posts it to Reef via
harness.report.post_report. See basic/harness/agent.py for the complete
pattern. Do not add that reporter when the harness already posts its training
feedback and the final Harbor reward is evaluation-only; Harbor keeps that
value in the trial result.
harness/report.py (optional)
Extract the verifier reward from Harbor's trial result and post it to Reef as
a report that references the trial's inference receipts. The report id is
deterministic (uuid5 of the trial id), so a duplicate post is a no-op.
Only use this path when the recipe consumes the verifier reward. A terminal evaluation that is explicitly ineligible for training belongs in Harbor's trial result, not in the training scenario's report contract.
my_example.yaml
Reef service config. The minimal record-only config (no training stack) is:
schema-version: 2
reef:
host: 127.0.0.1
port: ${REEF_PORT}
token: ${REEF_TOKEN}
inference:
upstream-url: ${REEF_UPSTREAM_URL:?}
upstream-model: ${REEF_UPSTREAM_MODEL:?}
upstream-api-key: ${REEF_UPSTREAM_API_KEY}
recipe:
implementation: recipe
storage:
agent-record-dir: ${REEF_WORK}/agent-record
artifact-repository: ${REEF_WORK}/artifacts.git
artifact-work-dir: ${REEF_WORK}/artifact-work
artifact-cache-dir: ${REEF_WORK}/artifact-cacheKeep shipped Reef configuration in the versioned public layout. Training
examples put native training flags in training.options, engine flags in
inference.options, and inference GPU capacity/parallelism in inference.num-gpus
and inference.tensor-parallel-size; Reef assembles their worker topology. Do not add service or services to version 2 YAML. HTTP
settings belong in reef. Deploy method-owned services independently and pass
their endpoints through recipe fields; Reef coordinates only native inference
and training. See recipes/openclawrl/examples/openclawrl/docker-compose.yaml
for external service startup and GPU isolation. Recipe fields and owned sections go
under recipe.config. Docker Compose and third-party task files retain their
own schemas. Legacy Reef layouts belong in compatibility tests.
run.sh
- Set environment variables (port, token, scenario, work dir); select the deployment recipe in YAML.
- Start
reef serve -c <yaml>in the background; wait for/healthz.reef servefinds therecipes/package beside the YAML and puts it on every service'sPYTHONPATH; the script does not set it. - Run reef-eval with
--with-editable "$PWD"(installsharness/) and--with reef-client(installs the SDK from PyPI). - reef-eval resolves
--agent harness:HarborAgentand runs the Harbor task.
See basic/run.sh for the minimal version (60 lines). tttd/run.sh adds
model download and GPU stack startup.
harbor/task.toml
Declares the task metadata, timeouts, and resource limits:
version = "1.0"
[metadata]
author_name = "Reef"
difficulty = "easy"
category = "integration"
tags = ["reef", "harbor"]
[verifier]
timeout_sec = 30.0
[agent]
timeout_sec = 300.0
[environment]
build_timeout_sec = 120.0
cpus = 1
memory_mb = 512
storage_mb = 1024
gpus = 0harbor/instruction.md
The prompt shown to the model. Keep it self-contained: the harness reads it
from Harbor's instruction argument and passes it to the model.
harbor/solutions/ (optional)
Seed or initial solution files the harness loads to bootstrap its search.
The harness reads them at startup (e.g. to seed a PUCT archive or provide a
baseline the model must improve on). Not every task needs this — basic/
has none; tttd/ seeds its archive with empty strings at runtime. The
directory is a convention for when the task ships concrete starting points
that are too large or too structured to inline in code.
harbor/environment/Dockerfile
The container the verifier runs in. Minimal:
FROM debian:bookworm-slim
WORKDIR /workspaceharbor/tests/test.sh
The verifier script. Harbor runs it inside the environment container after
run() returns. Write a float to /logs/verifier/reward.txt:
#!/bin/sh
set -eu
if [ -f /workspace/answer.txt ] && [ "$(cat /workspace/answer.txt)" = "391" ]; then
echo 1 > /logs/verifier/reward.txt
else
echo 0 > /logs/verifier/reward.txt
fiTests
Unit tests for the harness live in tests/test_<example>_harness.py at the
repo root. They import directly from
recipes.<method>.examples.<example>.harness.* — the test inserts
REPO_ROOT into sys.path so recipes/ is importable and each examples/
directory resolves as a namespace package (each example's harness/ has its own __init__.py, but
the example directory itself does not).
Self-containment
Each example must be fully self-contained: no cross-example Python imports.
If two examples share a pattern (scoring, sandboxing, search), each copies
its own copy. The only shared dependencies are external: reef_client,
harbor, and the reef package itself (for reef serve).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

