minion-orchestrator
यह क्या करती है
यह स्किल पृष्ठभूमि जॉब्स संभालती है जो सत्र रीस्टार्ट होने पर भी चलते रहते हैं। यह सरल शेल कार्य और AI सब-एजेंट द्वारा चलाए गए कार्य, दोनों संभालती है, और आपको प्रगति देखने या उन्हें रोकने देती है।
कब इस्तेमाल करें
- ✓जब आप चाहें कि कोई लंबा कार्य रीस्टार्ट के बाद भी पृष्ठभूमि में चलता रहे।
- ✓जब आप किसी बड़े काम को कई समानांतर कार्यों में बांटकर उन्हें ट्रैक करना चाहें।
- ✓जब आप पहले से चल रहे जॉब को रोकना, फिर चालू करना या उसकी दिशा बदलना चाहें।
Skill का लिंक
https://github.com/garrytan/gbrain/blob/master/plugin/skills/minion-orchestrator/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस डेटा सफ़ाई को पृष्ठभूमि जॉब के रूप में चलाइए जो रीस्टार्ट के बाद भी बना रहे, और बाद में मुझे इसकी प्रगति देखने दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट हर जॉब को Postgres में रखी एक टिकाऊ कतार में डालता है। वह प्रगति और टोकन उपयोग दर्ज करता है, चल रहे काम को दिशा संदेश भेजने देता है, और नतीजे पहुँचने पर बताता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या जॉब रीस्टार्ट के बाद भी बचते हैं?
हाँ। कतार Postgres में रहती है, इसलिए गेटवे रीस्टार्ट होने पर भी जॉब जारी रहते हैं।
क्या चल रहे जॉब को मैं बदल सकता हूँ?
हाँ। आप दिशा संदेश भेज सकते हैं, रोक सकते हैं, फिर चालू कर सकते हैं या रद्द कर सकते हैं।
सामान्य सब-एजेंट कब इस्तेमाल होना चाहिए?
रूटिंग नियम पहले मूल सब-एजेंट को तरजीह देते हैं, और कतार का इस्तेमाल खास समस्याएँ आने पर होता है।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 31k
- रैंकिंग में स्थान
- #9306
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
gbrain
31kयह आपके एजेंट को लोगों, प्रोजेक्ट और फ़ैसलों के बारे में तथ्य खोजने के लिए साझा कंपनी ज्ञान ब्रेन में खोजने और उसमें स्थायी नोट सहेजने देती है।
brain-ingest-gate
31kयह आपके एजेंट को नई सामग्री जोड़ने से पहले मौजूदा ज्ञान ब्रेन से जाँचने देती है, ताकि डुप्लिकेट न बनें और नामित इकाइयाँ पहले सुलझें।
brain-link-discipline
31kयह सुनिश्चित करती है कि आपका एजेंट हर उस ब्रेन पेज का काम करने वाला लिंक उसी संदेश में दे, जिसकी वह रिपोर्ट करता है, ताकि आप उसे तुरंत खोल सकें।
brain-ops
31kयह आपके एजेंट को ज्ञान ब्रेन की मुख्य दिनचर्या देती है: पहले मौजूदा संदर्भ जाँचना, स्पष्ट नोट उनके स्रोत के साथ सहेजना, और संबंधित पेज जोड़ना।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।