Autonomous experiment loop plugin for OpenCode, inspired by:
karpathy/autoresearchdavebcn87/pi-autoresearch
This plugin adds reusable experiment tools for OpenCode:
init_experimentrun_experimentlog_experimentautoresearch_statusautoresearch_clear
It also injects helper slash commands:
/autoresearch/autoresearch-status/autoresearch-clear
State is persisted to autoresearch.jsonl in the current project directory.
- Install dependencies and build:
npm install
npm run build
npm run smoke- Publish to npm (or use local linking) and add to OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-autoresearch"]
}- (Optional) copy the included skill:
mkdir -p ~/.config/opencode/skills/autoresearch-create
cp skills/autoresearch-create/SKILL.md ~/.config/opencode/skills/autoresearch-create/SKILL.md- Start with
/autoresearch <goal>. - Agent calls
init_experimentonce. - Each run uses
run_experimentthenlog_experiment. - Keep improvements with
status=keep(auto-commit enabled). - Use
/autoresearch-statusto inspect progress.
keepis blocked whenautoresearch.checks.shfails.- Plugin supports bounded auto-resume on
session.idle. - OpenCode does not expose pi-style always-on widgets, so status is command/tool based.