Skip to content

minions

diapason.agents.hybrid.minions

MinionsAgent — port of HazyResearch Minions protocol.

Cloud supervisor decomposes the task and reads back local-worker output; local worker(s) do the bulk reading/extraction. Multi-turn loop until the supervisor commits to a final answer.

Two modes (cfg["mode"]):

  • "minion" — single local worker, one cloud supervisor (cheaper). Default.
  • "minions" — parallel local workers, cloud aggregator.

Hybrid harness result: minions-swebenchverified-qwen27b-opus-500 = 0.274 acc / $0.09 per task — beats baseline-cloud's 0.236 / $0.95 on both accuracy and cost. GAIA at n=165 ties baseline-cloud at 0.576 acc / $0.67 (vs $1.09).

Requires the minions library from https://github.com/HazyResearch/minions installed in the same env (e.g. uv pip install -e path/to/minions). Import is lazy — the agent class registers without minions available, and the import error only fires on run().

Compatibility patches applied at first run() (idempotent):

  • Strip temperature for Opus 4.7+ (rejected with 400).
  • Inject server-side output_config JSON schema on supervisor turns so Opus replies in the shape Minions's parser expects (per-turn schema picked by sniffing the prompt for "decision": "provide_final_answer").
  • Replace Minions's _extract_json with a wrapper that short-circuits when the response is already valid JSON.
  • Inject timeout=600/max_retries=5 defaults into anthropic.Anthropic() — Minions builds bare clients which 60s-timeout under SWE-bench concurrency=8.

Ported from hybrid-local-cloud-compute/adapters/minions_adapter.py.

MinionsAgent

Bases: LocalCloudAgent

HazyResearch Minions supervisor/worker protocol. See module docstring.