一键导入
autoresearch-swarm
Collaborative ML experiment loop via Ensue shared memory. Agents minimize val_bpb by modifying train.py and sharing results with the swarm.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Collaborative ML experiment loop via Ensue shared memory. Agents minimize val_bpb by modifying train.py and sharing results with the swarm.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | autoresearch-swarm |
| description | Collaborative ML experiment loop via Ensue shared memory. Agents minimize val_bpb by modifying train.py and sharing results with the swarm. |
| allowed-tools | Bash(*), Read, Write, Edit, Glob, Grep, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet |
| triggers | ["autoresearch","swarm","experiment loop","val_bpb"] |
Agents minimize val_bpb by modifying train.py, running 5-minute experiments, and sharing results via Ensue. Never stop. Never ask the human.
create_memory, get_memory, search_memories, list_keys, update_memoryensue-api.sh — ${CLAUDE_PLUGIN_ROOT}/scripts/ensue-api.sh <method> '<json>'curl — JSON-RPC to https://api.ensue-network.ai/Auth: ENSUE_API_KEY env var or .autoresearch-key file. Ensue errors are non-blocking.
Keys under @autoresearch-at-home/. Key format: <agent max20>--<desc max40>--<sha256 6hex>.
results/<key> completed experiments
claims/<key> active work (15-min TTL)
hypotheses/<key> untested ideas
insights/<key> learnings
best/{train_py,metadata} global best
best/tier/<tier>/{train_py,metadata}
best/agent/<name> personal best
VRAM tiers: small (≤16 GB), medium (≤24 GB), large (≤48 GB), xl (>48 GB).
prepare.py or install new packagesprevious_best_*. Only keep updates best.embed: true on create/updatesearch_memories(query="experiment result val_bpb", limit=30, prefix="@autoresearch-at-home/results/")
search_memories(query="insight", limit=10, prefix="@autoresearch-at-home/insights/")
search_memories(query="hypothesis", limit=10, prefix="@autoresearch-at-home/hypotheses/")
list_keys(prefix="@autoresearch-at-home/claims/", limit=20)
get_memory(key_names=["@autoresearch-at-home/best/metadata"])
Every 5 runs: adopt tier best if better. Publish ideas you won't pursue as hypotheses.
# Check for existing result or similar active claim (score > 0.92, < 15 min)
get_memory(key_names=["@autoresearch-at-home/results/<key>"])
search_memories(query="<description>", limit=5, prefix="@autoresearch-at-home/claims/")
create_memory(items=[{
"key_name": "@autoresearch-at-home/claims/<key>",
"description": "[autoresearch] Claim: <description>",
"value": "<base64 JSON: agent_id, description, claimed_at, vram_tier>",
"base64": true, "embed": true, "embed_source": "description"
}])
# Wait 2s, verify ownership
get_memory(key_names=["@autoresearch-at-home/claims/<key>"])
Max 5 attempts. If all fail, run something anyway.
# Edit train.py, then:
git add train.py && git commit -m "LR 0.04 → 0.06"
uv run train.py > run.log 2>&1 # kill if >10 min
grep "^val_bpb:\|^peak_vram_mb:\|^num_steps:\|^total_tokens_M:\|^mfu_percent:" run.log
Empty = crash. Append to results.tsv (never commit).
keepdiscard, git reset --hard HEAD~1crash, git reset --hard HEAD~1Mandatory every iteration. All values use "base64": true, "embed": true, "embed_source": "description".
create_memory(items=[
{ "key_name": "@autoresearch-at-home/results/<key>",
"description": "[autoresearch] [<agent> <STATUS>] val_bpb=<val_bpb> | <desc>",
"value": "<base64 result JSON>" },
{ "key_name": "@autoresearch-at-home/insights/<key>",
"description": "[autoresearch] Insight: <what you learned and WHY>",
"value": "<base64 insight JSON>" },
{ "key_name": "@autoresearch-at-home/hypotheses/<key>",
"description": "[autoresearch] Hypothesis: <next experiment>",
"value": "<base64 hypothesis JSON>" }
])
Result: agent_id, val_bpb, memory_gb, vram_tier, status, commit, description, train_py, completed_at, delta_vs_best, num_steps, total_tokens_M, mfu_percent.
Insight: agent_id, insight, evidence_keys, posted_at.
Hypothesis: agent_id, title, hypothesis, suggested_config, evidence_keys, priority (1-5), created_at.
Only if keep and strictly better than current best (see Safety Rules):
get_memory(key_names=["@autoresearch-at-home/best/metadata"])
get_memory(key_names=["@autoresearch-at-home/best/metadata"]) # re-read before write
update_memory(key_name="@autoresearch-at-home/best/train_py", ...)
update_memory(key_name="@autoresearch-at-home/best/metadata", ...)
Same for best/tier/<tier>/ and best/agent/<name>.
autoresearch/<date>-<codename>param old → newgit reset --hard HEAD~1git commit -m "adopt best (val_bpb=X from Y)"results.tsvSpawn: Launch N Claude Code instances. Each gets a unique codename and runs the loop.
Monitor: Query Ensue for recent results, active claims, and best metadata. Stalled = claim > 15 min, no results in 20 min.
Rebalance: Check claims for clustering, redirect agents to untested hypotheses.
Re-spawn: Same codename — Ensue preserves history.
Hub setup (one-time): create invite (auto_approve), create "participants" group (auto-join), grant permissions (claims/results/hypotheses/insights → read+create, best → read+create+update), seed best/train_py and best/metadata.