OpenCode Auto Research is an engineering project that combines a governed autonomous experiment loop with a lightweight local innovation brain.
It is designed for research workflows where you want one outer orchestrator to:
- run baseline and candidate experiments,
- consult three read-only specialists,
- ground proposals in a local paper vault,
- learn from keep/discard outcomes,
- redirect the search when results underperform,
- and keep the whole process traceable through structured artifacts.
- governed OpenCode experiment loop driven by
Sisyphus - three-specialist proposal workflow with
Apollo,Athena, andHermes - Python controller for baseline, tick, resume, stop, and status
- local research brain with paper indexing, retrieval, evidence packs, and feedback reweighting
- session-level direction memory for multi-round pivot suggestions
- deterministic artifacts under
experiments/for reproducibility
Sisyphus: only outer-loop orchestratorsisyphus-junior: only code executorPrometheus: bootstrap and replanning onlyApollo: exploit-oriented research proposal specialistHermes: orthogonal divergence specialistAthena: attribution and validity guard
flowchart TD
A[Goal config + session state] --> B[Sisyphus orchestrator]
C[Research brain index + evidence pack] --> B
B --> D[Apollo exploit proposal]
B --> E[Hermes orthogonal proposal]
B --> F[Athena guard + redirect]
D --> G[Primary hypothesis selection]
E --> G
F --> G
G --> H[sisyphus-junior execution]
H --> I[Python controller]
I --> J[Judge + keep/discard]
J --> K[Feedback + direction memory]
K --> C
K --> B
Sisyphusreads the goal, session state, and research context.Apollo,Hermes, andAthenaproduce grounded proposal signals.- One primary hypothesis is selected.
sisyphus-junioris the only agent allowed to change code.- The Python controller executes and judges the round.
- Research-brain feedback and direction memory are updated for the next round.
opencode-auto-research/
├── .opencode/ # OpenCode commands and local skills
├── configs/ # Goal and research-brain config
├── experiments/ # Session truth-source artifacts
├── fixtures/ # Test fixtures, including KB fixtures
├── scripts/ # Python controller and research-brain scripts
├── src/ # TypeScript plugin, agents, tools, orchestration
├── tests/ # Unit, integration, and E2E tests
├── AGENTS.md # Project rules and routing guidance
├── GUIDE.md # Full setup and operator guide
├── README.md
├── package.json
├── requirements.txt
└── .env.example
One convenient local layout is:
~/workspace/opencode-auto-research/
├── opencode-auto-research/ # this repository
└── vault/ # local paper vault or symlink
The default configs/research_brain.yaml points to ../vault, so the engineering repo stays publishable while the paper vault remains local.
- Node.js 22+
- npm 10+
- Python 3.10+
- Docker + Docker Compose
- DVC 3.x
- DVCLive 3.x
- OpenCode CLI
- oh-my-opencode plugin
- GitHub CLI (
gh) for publication and release workflows
- Remote training server
- GPU / ROCm / CUDA
git clone <your-repo-url>
cd opencode-auto-researchnpm cipython3 -m pip install -r requirements.txtcp .env.example .envSet at least:
KIMI_CODING_API_KEYKIMI_CODING_BASE_URL- optionally
INNOVATION_LOOP_AGENT_MODEL
npm run build
npm testpython3 scripts/innovation_loop.py bootstrap --config configs/goal.yaml --workspace . --mode mock
python3 scripts/innovation_loop.py tick --config configs/goal.yaml --workspace . --mode mock
python3 scripts/innovation_loop.py status --config configs/goal.yaml --workspace . --mode mockpython3 scripts/kb/organize_vault.py --vault-root ../vault
python3 scripts/kb/standardize_vault_format.py --vault-root ../vault
python3 scripts/kb/fill_figure_notes.py --vault-root ../vault
python3 scripts/kb/build_index.py --vault-root ../vault --workspace-root . --config configs/research_brain.yaml --output-dir experiments/research/index --scaffold-missing --extract-claimspython3 scripts/kb/retrieve_papers.py --goal configs/goal.yaml --session experiments/session.json --best experiments/best.json --attempts experiments/attempts.jsonl --workspace-root . --config configs/research_brain.yaml --round 1
python3 scripts/kb/make_evidence_pack.py --round 1 --retrieval experiments/research/retrieval-cache/retrieval-round-0001.json --workspace-root . --config configs/research_brain.yaml/innovate-loop/experiment-init/experiment-run/experiment-status/experiment-bootstrap/research-context
The current recommended daily maintenance job is daily-research-brain.
Its responsibilities are:
- organize the local vault
- standardize file naming
- fill missing figure notes
- rebuild the research-brain index
- generate one evidence context when controller state exists
See GUIDE.md for the full operator flow.
npm testnpm run buildnpm test -- tests/kb/make-evidence-pack.test.ts
npm test -- tests/e2e/research-brain-direction-memory.test.ts- Do not commit
.envor real provider credentials. - Do not commit your full private paper vault unless you explicitly intend to publish it.
- Review
configs/research_brain.yamlbefore publishing if your local vault path differs. - Review
experiments/and exclude transient artifacts you do not want in source control. - For a public release, add
CONTRIBUTING.mdandSECURITY.mdto clarify collaboration and disclosure expectations.
The packaged engineering version currently passes:
npm testnpm run build- research-brain retrieval / evidence E2E flows
- redirect memory and multi-round pivot tests
GUIDE.md— full environment and operator guideAGENTS.md— project routing rulesconfigs/research_brain.yaml— research-brain maintenance configurationCONTRIBUTING.md— contribution expectationsSECURITY.md— safe disclosure and publishing guidance