neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻譯準備中
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Continual learning infra for self-improving agents
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Reef is the first open-source infrastructure for continual self-improving agents.
It connects agent inference, feedback, learning, and versioned delivery. Use it
to train model weights with Slime and SGLang, or improve an agent's harness, including its prompts, rules, and skills.
Use Reef when you want your agent to keep improving simply by learning from how you interact with your agent.
Reef processes each learning cycle in four steps. The table also shows which
modules implement each step.檢視完整 README ↗English | 中文
Reef is the first open-source infrastructure for continual self-improving agents. It connects agent inference, feedback, learning, and versioned delivery. Use it to train model weights with Slime and SGLang, or improve an agent's harness, including its prompts, rules, and skills.
🚀 Get started | 🗺️ Roadmap | 🗓️ Office Hours | 📣 Launch post | 💬 Join Discord | 📱 Join WeChat Group
Use Reef when you want your agent to keep improving simply by learning from how you interact with your agent.
| Your goal | Learning path | What you need |
|---|---|---|
| Keep getting stronger model designed for you | Model weight training | A trainable model, a supported GPU stack, and feedback your recipe can use |
| Get your harness to self-improve | Harness optimization | A model endpoint, representative tasks, and an evaluator; no local training GPUs |
| Scientific discoveries | Test-time training | An execution environment, a correctness checker, and a measurable objective |
| Ability | Inference engine (vLLM, SGLang, …) | RL training framework (Slime, veRL, AReaL, …) | Reef |
|---|---|---|---|
| Serves live traffic | ✅ | ❌ | ✅ |
| Trains weights | ❌ | ✅ | ✅ |
| Version management | ❌ | ❌ | ✅ |
| Stays live through updates | ❌ | ❌ | ✅ |
| Evolves beyond weights (skills, harness) | ❌ | ❌ | ✅ |
Reef processes each learning cycle in four steps. The table also shows which modules implement each step.
| Step | What happens | Where it lives |
|---|---|---|
| 1 · Serve | Serve agent requests and record interactions. | service/ — agent requests and interaction recordsruntime/ — inference and artifact updates |
| 2 · Observe | Match feedback to recorded interactions. | storage/records.py — stored interactions and feedbackrecord2record/ — feedback matching and eligibility |
| 3 · Grow | Produce an update from eligible records. | recipe/ — recipe integrationtrain/ — the training pipeline, job data, and training jobs |
| 4 · Commit | Apply the configured selection policy and publish accepted updates. | evaluation/ — candidate evaluationartifact/ — version historysurface/ — artifact delivery |
💡 Note
Reef's artifact and checkpoint functionality requires the
git-lfssystem package. Reef initializes Git LFS locally for its artifact repositories.
We recommend uv for managing packages, and the commands below use it.
uv venv && source .venv/bin/activate
uv pip install reef-infra
python3 -c "import reef; print(reef.__version__)"
git lfs install
git clone https://github.com/Human-Agent-Society/reef.git
cd reef
uv venv && source .venv/bin/activate
uv pip install -e .
python3 -c "import reef; print(reef.__version__)"
Use the source checkout for development and for the training examples below.
Reef supports two learning surfaces: model weights and agent harnesses. The deployment's recipe determines which surface its scenarios update.
As a minimal example, start Reef as a pure inference server:
uv run reef serve --inference.model-path Qwen/Qwen2.5-1.5B-Instruct
The following example starts the SAO (arXiv:2607.07508) example deployment. Run it from a Reef checkout in an environment that satisfies the GPU requirements in Evolve your model.
uv pip install -e ".[slime]" && uv pip install --no-deps --group runtime
export MODEL_PATH="Qwen/Qwen2.5-1.5B-Instruct"
export REEF_TOKEN="reef-local"
reef serve -c recipes/sao/examples/imo_answerbench/serve.yaml \
--inference.model-path "$MODEL_PATH" \
--reef.port "8900"
curl -f http://127.0.0.1:8900/healthz # ready to serve
Send inference requests through Reef and report a score for each response. The SAO recipe uses each eligible scored rollout to run a training step.
Reef's inference endpoint is OpenAI- and Anthropic-compatible: /v1/chat/completions,
/v1/responses and /v1/messages take the provider's own request body. A request includes the
x-reef-scenario header; a new name creates a scenario using the deployment's
configured recipe. Requests do not select recipes.
The response body uses the provider's OpenAI-compatible format. Reef adds the
x-reef-agent-record-id response header. Its value is the receipt that a
later report uses to identify this interaction. A report can contain a numeric
score, textual or structured feedback, and the receipts it evaluates. This
example reports both a score and a short explanation.
import os
import httpx
reef = httpx.Client(
base_url="http://127.0.0.1:8900",
headers={"Authorization": f"Bearer {os.environ['REEF_TOKEN']}", "x-reef-scenario": "hello-reef"},
timeout=300,
)
# Send a provider-compatible inference request
response = reef.post(
"/v1/chat/completions",
json={
"model": os.environ["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"]
# Sending report about the inference
matched = answer.strip() == "reef is ready"
reef.post(
"/reef/report",
json={"score": float(matched), "feedback": "matched" if matched else "wrong answer", "references": [receipt]},
).raise_for_status()
feedback carries the richer signal, plain text or a structured object,
for recipes that read more than a scalar. The endpoint will validate the
report schema (reef/core/reports/).
Once the recipe has enough feedback, Reef submits a training job to the training component. When a checkpoint that the job saved passes evaluation, the inference runtime loads it as the new release. Later inference requests use the current version without restarting Reef.
Refine a coding harness from plain-language asks, using a model API instead of GPUs.
Reefine is the built-in harness-refinement recipe and includes a deployment configuration; specify the provider URL and model. From your Reef checkout and activated Python environment:
reef serve --recipe reefine \
--inference.upstream-url http://127.0.0.1:11434 \
--inference.upstream-model gemma4:26b
For another provider, change
--inference.upstream-url and --inference.upstream-model, and set
REEF_UPSTREAM_API_KEY if authentication is required. With this configuration, Reef
listens on 127.0.0.1:8901 without authentication (set REEF_TOKEN before
starting it to require that token) and keeps its state under
.reef/reefine/. To change anything else, copy
the deployment configuration and pass
your copy with -c.
In another terminal with the same Python environment activated (the install
bakes that terminal's python3 into reef-pi), create a scenario, install the
harness, and ask for a change:
curl -fsS -H "Content-Type: application/json" \
-d '{"name": "my-harness"}' http://127.0.0.1:8901/reef/scenarios
curl -fsS -H "x-reef-scenario: my-harness" \
'http://127.0.0.1:8901/reef/harness/install?adapter=pi' | bash
reef-pi evolve "when I ask you to fix a bug, reproduce it with a failing test first"
The script installs into ~/reef-harness/<scenario> (here
~/reef-harness/my-harness); bash -s -- <dir> names another install root.
Keep any install root outside the project the agent works in: a session can
write files in its project, so with the install root there it could change
what the next session runs. The same holds for the Python environment the
install bakes into reef-pi and the Reef checkout it imports: code there runs
as you when reef-pi starts. For codex and dsh, keep them out of /tmp and
$TMPDIR too: their sandboxes let a command write there as well. The check
reef-pi runs before a session holds only against a session that can write
just its project, /tmp and $TMPDIR; pi runs commands with no sandbox (see
Recover a changed installation).
Inside a reef-pi session, /reefine <text> files the same ask. The served
model writes the change as a skill, a rules entry, an agent command, or a pi
extension. Where the host can isolate it (Linux with bwrap and pasta, as a
non-root user), or with REEF_PROPOSER_SANDBOX=none on a machine you trust, it
works as a coding agent that runs the changed harness before handing the change
back. The next session's update notice offers the install; a step that
settles while you are between turns offers its install right away. Review the
versions with /versions, which opens a step's page, and install one with
/versions <version> install. To change the model, restart
reef serve with another --inference.upstream-model and rerun the install
command: installation writes the model ID into the local harness configuration.
See the Reefine tutorial for scripted bug-fix and
research demos and the Reefine guide for
configuration.
Pick a recipe by the task type of your workload and by what it should
evolve, model weights or the agent harness. Weight recipes need the GPU
training stack, while harness recipes need only a model endpoint. Each recipe
below links to its guide and each measured benchmark links to its results
page, and the recipe catalog
adds the code and example for every recipe. Reefine and
SFT ship with reef-infra,
and SFT trains on demonstrations or imported examples for every task type.
The other implementations live in this repository's recipes/ cookbook,
selected by dotted class reference and not shipped in the Reef wheel.
| Task type | Task shape | Evolves the model | Evolves the harness | Standard benchmarks |
|---|---|---|---|---|
| Open-ended discovery | Repeated attempts at one hard problem with a measurable objective and no known answer | TTT-Discover, Guidance-TTT | None yet | Measured: TriMul, circle packing, Erdős minimum overlap. |
| Offline tasks with a known answer | Independent tasks from a fixed set, each with a reference answer | SAO, SDFT, SDPO, OPD | GEPA, Meta-Harness | Measured: IMOAnswerBench, AIME 2024, , , , . |
recipes/basic/ is the record-only starting stack and stays
outside the catalog. For a small walkthrough of feedback, candidate edits, and
publication, start with the coding harness tutorial.
Each result page documents its task, evaluation setup, measurements, and
limitations.
The documentation is organized in the following order:
Working on continual self-improving agent?
If Reef looks useful to you, please give it a ⭐ — it helps the community to discover and contribute to the project.
If you use Reef in your research, please cite:
@misc{reef2026,
title = {Reef: Infrastructure for Continually Self-Improving Agents},
author = {{Reef Contributors}},
year = {2026},
url = {https://github.com/Human-Agent-Society/reef}
}
Citation metadata is also available in CITATION.cff.
Reef brings together people exploring how agents can learn from experience and improve over time. The people below help turn that idea into working infrastructure.
This list is non-exhaustive, with team members listed alphabetically by last name:
Wenhao Chai, Shuangrui Ding, Shiyi Zoe Du, Hao He, Haoze He, Chonghe Jiang, Nan Jiang, Xuan Jiang, Xiaochen Li, Paul Liang, Bo Liu, Boyuan Long, Qiuyang Mang, Zhenting Qi, Ao Qu, Mingruo Qu, Yihong Tang, Zhaokai Wang, Xuezhi Yan, Hanfei Yu, Haofei Yu, Simon Yu, , , , , , .
We are particularly grateful to these projects which power important parts of Reef:
| Online learning from usage | Sessions with a user, where the interaction itself is the signal | OpenClaw-RL | SkillClaw, Reefine | Measured: GSM8K with a simulated student user, WildClawBench. |