A multi-agent orchestration engine that executes complex tasks in Query → Plan (Debate) → Execute → Verify — 4 phases. A sub-agent panel debates, critiques, executes, and verifies, while the watchdog monitors the entire process.
When complex tasks are delegated to AI agents, the following problems arise:
ProblemSymptomResultHallucinationUses non-existent APIs/librariesNon-executable codeExecution without planningStarts writing code immediatelyDirection change costs explodeNo verificationDeliverables "look plausible"Don't actually workLinear-only progressionKeeps going forward even on failureRoot cause unresolvedCost explosionIndiscriminate agent deploymentBudget exhaustion
text
┌─────────────────────────────────────────────────────────────┐
│ │
│ Phase 0 Phase 1 Phase 2 Phase 3 │
│ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │
│ │Query │─G0─▶│ Plan │──G1─▶│Execute│─G2─▶│Verify│ │
│ │ │ │(Debate)│ │(Parall)│ │ │ │
│ └──────┘ └──────┘ └──────┘ └──┬───┘ │
│ │ ▲ │ │
│ │ │ fail? │
│ │ └──── YES ◀──┘ │
│ │ │
│ └── Watchdog monitors the entire process ───────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Key Differentiators:
Featuredispatching-parallel-agents``parallel-agent-management``executing-plansorcheParallel execution✅✅❌ (sequential)✅Pre-query phase❌❌❌✅ Phase 0Debate/discussion❌❌❌✅ Includes CriticPhase gates❌❌✅ (checkpoints)✅ 4 gatesHallucination check❌❌❌✅ 14 itemsAuto regression on verification failure❌❌❌✅ Up to 3 retriesWatchdog integration❌❌❌✅Cost management❌❌❌✅ 4-tier budgetSession disconnection recovery❌❌❌✅ State file basedBest forSimple parallel tasksCodebase splittingSequential plan executionComplex multi-step projects
✅ Orche is appropriate when:
❌ Other skills are better when:
dispatching-parallel-agentsparallel-agent-managementexecuting-plansPlace the skill file in the OpenClaw skills directory:
bash
# Copy to skills directory
mkdir -p ~/.agents/skills/orche
cp SKILL.md ~/.agents/skills/orche/SKILL.md
Enter the /orche command in chat and describe your task:
text
/orche "Write a market analysis report on Korean AI startups"
Or in natural language:
text
Orchestrate this project systematically
Orche will ask 3~10 questions. Answer clearly:
text
🎼 /orche started — Phase 0: Query
📋 Questions to clarify requirements:
1. 📐 Scope: All AI fields? Specific segment (LLM, robotics, etc.)?
2. 🎯 Priority: Market size vs competitive analysis vs investment trends?
3. 📏 Success criteria: Report length? Number of data sources?
4. 🔧 Technical constraints: Specific data sources needed?
5. ⏰ Deadline: Is there a due date?
Once you answer, Orche automatically:
text
🎼 /orche Completion Report
📋 Task: orche-1711432800
⏱️ Total duration: 23 minutes
📊 By phase: Query 3m → Plan 5m → Execute 10m → Verify 5m
🤖 Agents deployed: 11
✅ Tasks completed: 5/5
📁 Deliverables:
- workspace/orche-1711432800/requirements.md
- workspace/orche-1711432800/final-plan.md
- workspace/orche-1711432800/tasks/
- workspace/orche-1711432800/verification/final-verdict.md
text
Phase 0: Query — Clarify requirements (3~10 questions)
Phase 1: Plan — 3~7 sub-agents debate → finalize plan
Phase 2: Execute — Split into tasks → 3~8 sub-agents execute in parallel
Phase 3: Verify — 3~5 verifiers deployed → regress to Phase 2 if issues found
Each phase transition requires gate conditions to be met before proceeding. Automatic blocking on non-compliance.
GateTransitionKey ConditionsG0Phase 0 → 1Requirements structured + ambiguous expressions removed + user approvalG1Phase 1 → 2final-plan.md created + hallucination check passed + no circular dependenciesG2Phase 2 → 3All tasks completed + deliverables exist + no zombie agentsVerificationPhase 3 → Done14-item hallucination check passed + all required deliverables present
On gate failure:
Remove ambiguity from user instructions and specify them to an actionable level.
requirements.mdCategoryExampleScopeWhat's in scope? What should be excluded?Technical constraintsLanguage/framework/environment limitations?PriorityWhat matters most? (speed/quality/cost)Success criteriaHow to judge completion? Deliverables?DependenciesExternal systems/APIs/data?RiskImpact of failure? Rollback needed?
If G0 feasibility check determines the task is impossible:
orche-state.json status → "rejected"RoleResponsibilityDomain Expert (1~2)Draft plan based on domain expertiseAdvocateStrengthen plan merits, argue feasibilityCriticPoint out weaknesses/risks/gaps + hallucination checkModeratorSynthesize debate, build consensus, write final plan
text
sessions_spawn:
task: "<role-specific prompt>"
label: "orche-<role>-<taskId>"
model: "anthropic/claude-sonnet-4-6" # Default (use opus for high complexity)
mode: "run"
Model Selection Guide:
- Planning/debate:
sonnet(cost-efficient)- Complex domain experts:
opus(when deep reasoning needed)- Simple execution tasks:
sonnetorhaiku(fast processing)
Round 1:
final-plan.mdIf unresolved issues remain → Round 2 (up to 3 rounds max).
final-plan.md createdSplit from final-plan.md into independently executable task units:
json
{
"id": "task-1",
"title": "...",
"description": "...",
"dependencies": [],
"assignedAgent": null,
"status": "pending",
"output": null
}
Task Status Flow: pending → running → completed / failed
All execution agent prompts must include the following:
completed or skipped_with_reasonRoleResponsibilityCompleteness VerifierAll tasks executed, nothing missingAccuracy VerifierDeliverables match task spec + success criteriaHallucination VerifierDetect factual errors, logical contradictions, non-existent referencesIntegration VerifierCross-deliverable consistency, interface compatibilityFinal Reviewer (optional)Final review against original requirements
ResultActionAll PASSPhase 3 complete → normal terminationHIGH issueRegress to Phase 2 (re-execute affected tasks only)MED issueReport to user, confirm re-executionLOW issueRecord in report, proceed
Automatic regression to Phase 2 if any of the following apply:
hallucination_score >= 2 (2+ failures in 14-item check)retryCount maximum 3 timesAll orchestration state is recorded in workspace/orche-state.json.
The watchdog and each phase share this file to track progress.
json
{
"taskId": "orche-<timestamp>",
"phase": 0,
"status": "active",
"startedAt": "<ISO>",
"phaseStartedAt": "<ISO>",
"requirements": null,
"plan": null,
"tasks": [],
"agents": [],
"watchdog": {
"enabled": true,
"lastCheck": null
},
"retryCount": 0,
"maxRetries": 3,
"tokenBudget": {
"total": 500000,
"used": 0,
"currency": "tokens"
},
"errors": []
}
FieldTypeDescriptiontaskIdstringUnique identifier ( orche-<unix_timestamp>)phasenumberCurrent phase (0~3)statusstringactive / completed / aborted / rejected``requirementsobjectRequirements finalized in Phase 0planobjectPlan finalized in Phase 1tasksarrayPhase 2 task list + statusagentsarrayCurrently active sub-agent session key listretryCountnumberPhase 3 → 2 regression counttokenBudgetobjectToken budget managementerrorsarrayError log
Each orchestration creates an independent working directory:
text
workspace/orche-<taskId>/
├── requirements.md ← Phase 0 deliverable
├── round-1/ ← Phase 1 debate records
│ ├── expert-1-proposal.md ← Expert proposal
│ ├── expert-2-proposal.md ← (if applicable)
│ ├── advocate-review.md ← Advocate review
│ ├── critic-review.md ← Critic review
│ └── moderator-summary.md ← Moderator synthesis
├── round-2/ ← (2nd round debate if needed)
├── final-plan.md ← Phase 1 final plan
├── tasks/ ← Phase 2 deliverables
│ ├── task-1/
│ │ └── output.md
│ ├── task-2/
│ │ └── output.md
│ └── ...
└── verification/ ← Phase 3 verification results
├── completeness-report.md ← Completeness verification
├── accuracy-report.md ← Accuracy verification
├── hallucination-report.md ← Hallucination verification
├── integration-report.md ← Integration verification
└── final-verdict.md ← Final verdict
watchdog.md (when using OpenClaw watchdog)orche-state.jsontext
G0 not passed → Phase 1 entry blocked. Re-confirmation requested from user.
G1 not passed → Phase 2 entry blocked. Plan re-debate forced.
G2 not passed → Phase 3 entry blocked. Missing tasks re-executed.
Verification fail → Auto regression to Phase 2 (retryCount < 3).
Rules that must be included in every sub-agent spawn prompt:
text
[Harness Rules]
1. You must save results to the designated file path upon completion
2. Mark uncertain facts with "needs verification:" — no fabrication
3. Do not use non-existent APIs/libraries
4. On task failure, record failure reason in output file and terminate
These rules are injected into all sub-agents. This ensures:
text
On Phase 3 completion, you must:
1. Set orche-state.json status → "completed"
2. Mark task [x] in watchdog.md (if using watchdog)
3. Send final report to user
Orche integrates with OpenClaw's watchdog system to monitor the entire process.
Detection ItemAuto ResponseAgent 15min+ no change (hang)kill + re-spawnEmpty deliverable (file size 0)Retry with reinforced promptAll agents lost (deadlock)Immediate user notificationToken budget 80% reachedUser warning
Register the task in watchdog.md at Orche start:
markdown
- [ ] orche <taskId> — Phase 0 (Query)
session_keys: agent:main:subagent:xxxx
state_file: workspace/orche-state.json
evidence_paths:
- workspace/orche-<taskId>/requirements.md
- workspace/orche-<taskId>/final-plan.md
done_when:
- orche-state.json status == "completed"
These principles reflect lessons learned in production.
watchdog.md → query sessions_list using session_keysNo watchdog in your environment? Orche works without a watchdog. The watchdog is an additional safety net; phase gates and harness rules function as core safety mechanisms without it.
Used by Phase 1's Critic and Phase 3's verification team.
IDItemVerification MethodH-1File path existenceVerify with stat() or lsH-2Command existenceVerify with which or command -vH-3URL validityVerify with HTTP request (optional)H-4Code syntax validityGrammar check with linter/parserH-5Numerical data cross-verificationConfirm with 2+ sources
IDItemVerification MethodH-6No self-contradictionDetect conflicting statements within documentH-7Plan-result alignment1:1 mapping verificationH-8Terminology consistencySame term for same concept
IDItemVerification MethodH-9No remaining TODO/FIXMEgrep -r "TODO|FIXME"H-10No placeholdersDetect [INSERT], TBD, ...H-11All deliverables existCross-check deliverable list against requirements
IDItemVerification MethodH-12No fictional library/API referencesVerify existence on npm/pip/crates.io etc.H-13No unsourced statisticsVerify source citation or "needs verification:" labelH-14No overconfident expressionsDetect "always", "never", "100%" type claims
text
0~1 failures → PASS ✅
2~3 failures → WARNING ⚠️ (MED — user judgment)
4+ failures → FAIL ❌ (HIGH — auto regression)
Orche is a multi-agent system, so cost management is essential.
TierRatioAction🟢 Normal< 50%Normal operation🟡 Caution5080%Limit concurrent agents, prefer 95%Stop new spawns, complete in-progress tasks only⛔ Exceeded> 95%Full stop, request user judgmentsonnet🔴 Warning80
Actively leverage model selection:
haiku (lowest cost)sonnet (best value)opus (only when needed)Limit concurrent agents to 3 (default). 8 is the maximum; typically 3~4 is sufficient.
Set token budget according to task scale:
Task ScaleRecommended Budget (tokens)Expected AgentsEstimated Cost (Claude Sonnet)Small (simple research)200,00068$0.6Medium (code refactoring)500,0001015$1.5Large (market analysis report)1,000,0001520$3.0
Note: Costs above are estimates based on Claude Sonnet. Actual costs vary by model, prompt length, and retry count.
Adjust the budget by modifying tokenBudget.total in orche-state.json:
json
{
"tokenBudget": {
"total": 1000000,
"used": 0
}
}
ExceptionDetection MethodAuto ResponseUser NotificationAgent hangWatchdog 15min no changekill + re-spawnOn 2 consecutive occurrencesEmpty deliverableFile size 0Retry with reinforced promptOn 2 failuresAPI error (429/500)HTTP statusRetry after 30sOn 3 failuresHallucination detectedCritic/verification teamRegenerate affected portionOn HIGH severityTotal deadlockAll agents lost—ImmediatelyContext exceededError messageRetry with reduced inputOn failuremaxRetries exceededCounter check—Immediate judgment requestToken budget exceededused/total ratioModel downgradeAt 80%
All errors are recorded in orche-state.json's errors array:
json
{
"errors": [
{
"timestamp": "2026-03-26T10:30:00Z",
"phase": 2,
"taskId": "task-3",
"type": "AGENT_HANG",
"message": "Agent orche-exec-task-3 unresponsive for 15+ minutes",
"action": "kill + re-spawn"
}
]
}
TimingRequired?ContentPhase 0 complete✅ RequiredApprove requirementsPhase 1 completeOptionalReview plan (default: auto-proceed)Phase 2 failure✅ RequiredJudgment after 2 retry failuresPhase 3 MED issue✅ RequiredDecide on re-executionPhase 3 completeNotificationFinal results report
Auto-proceeding from Phase 1 to Phase 2 is the default behavior. If you want to review the plan directly, specify "I want approval at each step" during Phase 0 queries.
When the user requests task cancellation:
orche-state.json status → "aborted"text
🎼 /orche Abort Report
📋 Task: orche-1711432800
🛑 Abort reason: User request
✅ Completed tasks: 3/7
📁 Completed deliverables:
- workspace/orche-1711432800/tasks/task-1/output.md
- workspace/orche-1711432800/tasks/task-2/output.md
- workspace/orche-1711432800/tasks/task-3/output.md
If the main session disconnects mid-process, the orchestration stops.
orche-state.json is the recovery key.
completedAt recorded in orche-state.json upon receiving each sub-agent resultwatchdog.md and main session is unresponsive for 20+ minutes in sessions_list, reports to userorche-state.json → continues from incomplete taskstext
/orche resume
This command reads orche-state.json and resumes execution from the last completed phase/task.
User Input:
text
/orche "Write a 2025 Korean GenAI market analysis report.
Must include market size, key players, investment trends, and regulatory landscape."
Phase 0 — Query (2~3 min):
text
🎼 Phase 0: Query
1. 📐 Scope: All GenAI? (LLM, image generation, code assistants, etc.)
2. 🎯 Depth: Individual company analysis? Or market overview level?
3. 📊 Data: Public data only? Paid research sources?
4. 📏 Length: How many pages (A4 equivalent)?
5. 🎨 Format: Markdown? PDF?
6. ⏰ Purpose: Internal report? Investment decision? Blog?
Phase 1 — Planning (5 min):
Phase 2 — Execution (10~15 min):
TaskAgentDeliverableMarket overviewagent-1tasks/task-1/market-overview.mdKey playersagent-2tasks/task-2/key-players.mdInvestment trendsagent-3tasks/task-3/investment-trends.mdRegulatory landscapeagent-4tasks/task-4/regulatory.mdConsolidated reportagent-5tasks/task-5/final-report.md
Phase 3 — Verification (5 min):
User Input:
text
/orche "Refactor our project's API layer.
Currently Express monolithic — want to separate modules by domain and increase test coverage."
Phase 0 — Query (3 min):
text
🎼 Phase 0: Query
1. 📐 Scope: Entire API? Specific domains only?
2. 🔧 Tech stack: Express + TypeScript? ORM?
3. 📁 Current structure: Source directory path?
4. 🎯 Target structure: Have an example? (NestJS-style? Layered?)
5. ✅ Tests: Current coverage? Test framework?
6. ⚠️ Constraints: Backward compatibility? Zero-downtime deployment?
Phase 1 — Planning (7 min):
Phase 2 — Execution (15~20 min):
TaskAgentDeliverableDependency analysisagent-1tasks/task-1/dependency-graph.mdUser module separationagent-2tasks/task-2/user-module/Auth module separationagent-3tasks/task-3/auth-module/Order module separationagent-4tasks/task-4/order-module/Shared utilities cleanupagent-5tasks/task-5/shared/Test writingagent-6tasks/task-6/tests/
Phase 3 — Verification (7 min):
User Input:
text
/orche "Do a SaaS competitor analysis.
Target Notion, Coda, Slite — compare features, pricing strategy, and market positioning."
Phase 0 — Query (2 min):
text
🎼 Phase 0: Query
1. 📐 Scope: Any additional competitors beyond these 3?
2. 🎯 Analysis depth: Feature-level detail? Strategic level?
3. 📊 Data: Public pricing only? Actual usage experience needed?
4. 📏 Deliverables: Comparison table + strategy report?
5. 🔍 Our product: Is there a reference product to compare against?
Phase 1 — Planning (5 min):
Phase 2 — Execution (10 min):
TaskAgentDeliverableNotion analysisagent-1tasks/task-1/notion-analysis.mdCoda analysisagent-2tasks/task-2/coda-analysis.mdSlite analysisagent-3tasks/task-3/slite-analysis.mdComparative summaryagent-4tasks/task-4/comparison-report.md
Phase 3 — Verification (5 min):
Below are summaries of actual projects completed with Orche.
ItemDetailsTaskRepackage internal skills for ClawHub publishingDuration25 minutesAgents deployed12 (planning 4 + execution 5 + verification 3)By phaseQuery 3m → Plan 6m → Execute 10m → Verify 6mRegressions0 (passed first time)NotableCritic flagged "environment-dependent hardcoded cron IDs" → fixed during planning phase
ItemDetailsTaskTechnical doc translation (Korean/English/Japanese) + terminology unificationDuration35 minutesAgents deployed15 (planning 3 + execution 8 + verification 4)By phaseQuery 2m → Plan 5m → Execute 18m → Verify 10mRegressions1 (H-8 terminology consistency failure → glossary-based retranslation)NotableTerminology inconsistency auto-detected → Phase 2 regression → fixed and passed
ItemDetailsTaskREST API design → implementation → test code → documentationDuration42 minutesAgents deployed18 (planning 5 + execution 8 + verification 5)By phaseQuery 4m → Plan 8m → Execute 20m → Verify 10mRegressions1 (H-12 non-existent middleware reference → affected task re-executed)NotableCritic debate on "implement auth middleware vs use library" → Moderator decided on verified library
text
Total completions: 3
Average duration: 34 minutes
Average agents: 15
First-pass rate: 33% (1/3)
Resolved via auto-regression: 100% (2/2 regressions resolved within 3 retries)
Manual escalations: 0
If the hallucination-guard skill is installed, Orche can leverage it during the verification phase for more precise hallucination detection.
Install hallucination-guard skill: bash
# Install from ClawHub (needs verification: install command may vary by environment)
mkdir -p ~/.agents/skills/hallucination-guard
# Place SKILL.md in that directory
Auto-utilized in Phase 3 verification:
Integration Architecture:
text
Phase 3: Verification
├── Completeness Verifier
├── Accuracy Verifier
├── Hallucination Verifier ──── Uses hallucination-guard skill
│ ├── Orche's built-in 14-item check
│ └── + hallucination-guard additional checks (when installed)
├── Integration Verifier
└── Final Reviewer
Task TypeOrche Alone+ hallucination-guardResearch report✅ Sufficient✅✅ Enhanced numerical verificationCode refactoring✅ Sufficient✅✅✅ API existence check essentialMarket analysis✅ Sufficient✅✅ Enhanced statistics source verificationDocument translation✅ Sufficient✅ Minimal difference
Default is up to 3 rounds. Complex domains may require more rounds. Specify "I want thorough plan debate" during Phase 0 to adjust the round count.
IntensityVerifier CountHallucination CheckRecommended Forlight2Essential 5 items onlySimple tasks, time savingsstandard (default)3~4All 14 itemsGeneral tasksthorough514 items + additional cross-verificationHigh-risk tasks
You can specify verification intensity during Phase 0:
text
/orche "Refactor the API. Use thorough verification."
Specify different models per phase based on task characteristics:
json
{
"modelConfig": {
"planning": "anthropic/claude-sonnet-4-6",
"execution": "anthropic/claude-sonnet-4-6",
"verification": "anthropic/claude-sonnet-4-6",
"complex": "anthropic/claude-opus-4-6"
}
}
Default is 3 (maximum 8). Adjust in orche-state.json:
json
{
"concurrency": {
"default": 3,
"max": 8
}
}
A: No. Phase 0 is mandatory. Proceeding with ambiguous requirements causes direction change costs in Phase 2 to grow exponentially. Clear answers in Phase 0 actually reduce total time.
A: Depends on task scale. Small tasks (research report) use approximately 200K tokens (Claude Sonnet $0.6), large tasks (API design + implementation) approximately 1M tokens ($3.0). See the cost management section for budget settings.
A: Auto-regression up to 3 times. If all 3 fail, escalated to user for direct judgment. Also escalated if the same reason fails 2 consecutive times.
A: Yes. The watchdog is an additional safety net; phase gates and harness rules are the core safety mechanisms. Orche functions normally without a watchdog.
A: Orche operates independently. However, handling simple parallel tasks within Phase 2 using dispatching-parallel-agents patterns is naturally compatible.
A: No. All state is recorded in orche-state.json and the file system. Use /orche resume to continue from the last progress point.
A: The Moderator builds consensus. Debate runs up to 3 rounds; if consensus isn't reached, the Moderator has final decision authority.
A: No. Sonnet alone can handle most tasks. Opus is used selectively only for domain expert roles requiring complex reasoning. Sonnet is recommended as default for cost savings.
sessions_spawn ( mode: "run")Made with 🎼 by reikys — Battle-tested in production environments.