minion-orchestrator
Fungsinya
Skill ini mengelola pekerjaan latar belakang yang tetap berjalan meskipun sesi dimulai ulang. Skill menangani tugas shell sederhana maupun tugas yang dijalankan oleh sub-agent AI, dan memungkinkan Anda memeriksa kemajuan atau menjedanya.
Kapan dipakai
- βSaat Anda ingin tugas panjang tetap berjalan di latar belakang bahkan setelah dimulai ulang.
- βKetika Anda ingin membagi pekerjaan besar menjadi banyak tugas paralel dan melacaknya.
- βSaat Anda ingin menjeda, melanjutkan, atau mengarahkan pekerjaan yang sudah berjalan.
Link skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/minion-orchestrator/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βJalankan pembersihan data ini sebagai pekerjaan latar belakang yang tetap berjalan setelah dimulai ulang, dan biarkan saya memeriksa kemajuannya nanti.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengirim setiap pekerjaan ke antrean tahan lama yang disimpan di Postgres. Agent mencatat kemajuan dan pemakaian token, memungkinkan Anda mengirim pesan pengarahan ke pekerjaan yang berjalan, dan melaporkan saat hasil dikirimkan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Minion Orchestrator
Contract
Minions is a Postgres-native job queue for durable, observable background work. This single skill handles two lanes:
- Deterministic shell jobs (
gbrain jobs submit shell ...) - LLM subagent jobs (
gbrain agent run ...)
When to route to Minions: durable, observable work that must survive restarts,
fan out across many parallel tasks, or persist across sessions. Routing policy
is defined in skills/conventions/subagent-routing.md β the project default is
pain_triggered (native subagents first, Minions after specific pain signals
fire); Mode A (all-through-Minions) is opt-in.
Guarantees:
- Jobs survive gateway restart (Postgres-backed)
- Every job has structured progress, token accounting, and session transcripts
- Running agents can be steered mid-flight via inbox messages
- Jobs can be paused, resumed, or cancelled at any time
- Parent-child DAGs with configurable failure policies
Durable-execution doctrine (routing convention the agent follows β nothing mechanically enforces it; see "Durable execution" below):
- Operations expected to exceed ~2 minutes route through the capability ladder, never a bare background shell that dies with the session.
- A deadman check verifies the result was REPORTED to the user, not merely that the process exited β a swallowed completion event looks identical to a dead job from the user's side.
- The deadman is second-line insurance, not a delivery guarantee: it can
itself die before firing (scheduler restart, deleted entry). Backstop:
on the next turn, sweep
gbrain jobs list --status activeand recent completions for overdue work whose result never reached the user. - Deadman checks are idempotent. A double-fire, or a fire that races the normal completion report, produces silence β it checks reported-state first and tags any recovery report with the job ID so duplicates are detectable.
- A checkpoint or progress file is trusted only with a freshness check.
A stale checkpoint reads as "still running" forever; compare its
timestamp against the expected progress interval and against
gbrain jobs get <id>.
Route the Request: Shell Job vs Subagent
| Condition | Action |
|---|---|
| User asks for deterministic command/script run | Shell job (CLI: gbrain jobs submit shell ...) |
| User asks to "run in minions" + explicit command/argv | Shell job (CLI, --params with cmd or argv) |
| User asks for research/reasoning/iterative agent | Subagent job (CLI: gbrain agent run) |
| User asks to steer/pause/resume an agent | Subagent job lifecycle tools (MCP-callable) |
| Single simple operation under ~30s | Consider inline execution first |
| Needs restart durability/observability | Submit as Minion job |
| Operation expected to exceed ~2 minutes | Route through the Durable execution ladder (below) |
| Parallel work (2+ streams) | gbrain agent run --fanout-manifest or parent + child subagents |
If intent is ambiguous, ask one clarification: "Do you want a deterministic shell command job, or an LLM agent job?"
Shell Jobs (Deterministic Scripts)
Use for reproducible command execution, ETL steps, cron work, and scriptable tasks where no LLM reasoning loop is needed.
Preconditions (read before submitting your first shell job)
- The worker must be started with
gbrain jobs work --allow-shell-jobs(equivalentlyGBRAIN_ALLOW_SHELL_JOBS=1exported on the worker; a.envin the worker's directory cannot set it). The shell handler is always registered but guarded: an unflagged worker that claims a shell job dead-letters it immediately (UnrecoverableError, straight todead, no retries) with the flag named inerror_text. A job that sits inwaitingmeans NO worker is running at all β checkgbrain jobs supervisor status. Gate lives insrc/core/minions/handlers/shell.ts. - Security: flipping
GBRAIN_ALLOW_SHELL_JOBS=1authorizes arbitrary command execution on the worker. On a shared queue, this is a remote code execution surface. Treat as privileged infrastructure authorization. - Execution mode β pick one:
- Postgres + daemon:
gbrain jobs workruns a persistent worker that claims and executes jobs from the queue. - PGLite + --follow:
gbrain jobs submit ... --followruns inline. The daemon mode is not available on PGLite (exclusive file lock). Seedocs/guides/minions-shell-jobs.md.
- Postgres + daemon:
- MCP boundary: shell-job submission is CLI-only. `submit_job n
Pertanyaan umum
Apakah pekerjaan bertahan setelah dimulai ulang?
Ya. Antrean disimpan di Postgres, sehingga pekerjaan tetap berjalan setelah gateway dimulai ulang.
Bisakah saya mengubah pekerjaan saat sedang berjalan?
Bisa. Anda dapat mengirim pesan pengarahan, menjeda, melanjutkan, atau membatalkan pekerjaan.
Kapan sebaiknya memakai sub-agent biasa?
Aturan routing lebih mengutamakan sub-agent native terlebih dahulu, dan memakai antrean setelah masalah tertentu muncul.
Detail
Deskripsi asli dari pembuat
Unified Minions skill for both deterministic shell jobs and LLM subagent orchestration. Replaces the older `gbrain-jobs` routing intent. Use when: submitting gbrain jobs, shell/background tasks, spawning subagents, checking progress, steering running work, pausing/resuming, parallel fan-out. One durable, observable, steerable queue interface. Also carries the durable-execution doctrine for any operation expected to exceed ~2 minutes: capability ladder, deadman checks that verify the result was reported, and content-addressed stage checkpoints for expensive pipelines.
repo: garrytan/gbrain
Popularitas
- Bintang GitHub
- 31k
- Peringkat
- #9306
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
gbrain
31kMemungkinkan agent Anda mencari fakta tentang orang, proyek, dan keputusan di basis pengetahuan bersama perusahaan, serta menyimpan catatan penting.
brain-ingest-gate
31kMemeriksa konten baru terhadap basis pengetahuan yang sudah ada sebelum ditambahkan, untuk menghindari duplikat dan menyelesaikan entitas bernama lebih dulu.
brain-link-discipline
31kMemastikan agent Anda menyertakan tautan yang berfungsi ke setiap halaman basis pengetahuan yang dilaporkannya, dalam pesan yang sama, agar Anda bisa langsung membukanya.
brain-ops
31kMemberi agent Anda rutinitas inti untuk basis pengetahuan: memeriksa konteks yang ada terlebih dahulu, menyimpan catatan eksplisit beserta sumbernya, dan menautkan halaman terkait.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.