terminal أصلاً — ده مش تصميم، ده تسريبSOUL.md بتاعه هو المواصفة| Parallel Tools | Multi-Agent | |
|---|---|---|
| وحدة التنفيذ | استدعاء أداة واحدة | وكيل كامل (حلقة تفكير كاملة) |
| عزل | لا يوجد | session / context منفصل |
| النتيجة | تُدمج في نفس اللفة | ترجع كـ turn مستقل |
| التكلفة | زائد شوية | مضاعفة (كل وكيل له context) |
| متى تستخدمه | 5 عمليات بحث | 5 مقالات بنفس الشكل |
Hermes Kanban.max_spawn_depth: 3 و max_concurrent_children: 3، الشجرة ممكن توصل 27 agent متوازي.| Router | Worker Pool | Supervisor | Hierarchical | |
|---|---|---|---|---|
| حتمي | ✔ عالي | ✔ عالي | متوسط | ✘ منخفض |
| وكلاء فعلياً | ✘ | ✘ | ✔ | ✔ |
| تكلفة إضافية | منخفضة | منخفضة | متوسطة | عالية |
| يبقى سيئاً عند | نقطة فشل واحدة | مهم غير متجانسة | نجاح غير معرّف | مهمة مسطّحة |
| في Hermes | profiles | Kanban board | swarm |
max_spawn_depth > 1 |
| في OpenClaw | bindings |
command queue | Swarm collectors | maxSpawnDepth |
{
agents: {
ownership: "explicit",
entries: {
main: { workspace: "~/.openclaw/workspace" },
support: { workspace: "~/.openclaw/workspace-support" },
},
},
bindings: [
{
agentId: "support",
comment: "Route the support bot account to the support agent",
match: { channel: "discord", accountId: "support" },
},
{
agentId: "main",
match: { channel: "discord", accountId: "*" },
},
],
}
| حقل المطابقة | الوظيفة |
|---|---|
accountId |
حساب واحد مُعدّ — فاضية = الحساب الافتراضي بس |
peer |
محادثة concrete أو wildcard |
guildId / teamId |
قيود group-space خاصة بالقناة |
roles |
Discord role IDs، بيتقيّم مع شرط الـ guild |
session.dmScope / groupScope |
تجاوز لنطاق session |
{
agents: {
defaults: {
maxConcurrent: 4, // سقف الـ main lane المشترك
subagents: {
maxSpawnDepth: 2, // الافتراضي 5، المدى 1-5
maxChildrenPerAgent: 5, // أقصى أطفال نشطين لكل session
maxConcurrent: 8, // أقصى runs متوازية لكل spawning session
runTimeoutSeconds: 900, // 0 = بلا مهلة
announceTimeoutMs: 120000,
delegationMode: "prefer",
},
},
},
messages: { queue: { mode: "collect", cap: 20, drop: "summarize" } },
}
| العمق | session key | الدور الافتراضي | يقدر يـspawn؟ |
|---|---|---|---|
| 0 | agent:<id>:main |
Main agent | دائماً |
| 1 | agent:<id>:subagent:<uuid> |
Orchestrator | نعم، إلا لو maxSpawnDepth: 1 |
| 2–4 | مفاتيح مسطّحة محفوظة مع lineage | Orchestrator | نعم، افتراضياً |
| 5 | مفتاح مسطّح مع lineage | Leaf | ✘ لأ |
AGENTS.md بس — والـ children مش بياخدوا message tool.# إنشاء + وصف (الوصف مهم لو الـ profile هيشتغل kanban worker)
hermes profile create researcher \
--description "Reads source code and external docs, writes findings."
# نسخ: config فقط / كل حاجة / من profile محدد
hermes profile create work --clone
hermes profile create backup --clone-all
hermes profile create work --clone-from coder
# الاستخدام
hermes -p work chat
hermes profile use work # sticky default
hermes profile list
hermes profile describe --all --auto
hermes -p <name> auth add <provider>
| المصطلح | المعنى |
|---|---|
| Profile | بيت Hermes منفصل بالكامل |
| Agent | الـ Hermes assistant الشغّال |
| Subagent | طفل اتولد بـ delegate_task — مش profile |
| Bot Mode bot | profile بيظهر في الـ roster |
| Messaging bot | حساب على منصة مراسلة |
/new بيعمل fork، متعملهوش.# الـ Bot == profile: كل حاجة بتعملها في الواجهة بتفضل من الـ CLI
hermes -p <name> chat # بيفتح نفس الـ agent بالظبط
hermes profile list # الـ roster
# الـ routines هي cron jobs حقيقية — نفس أدوات cron
hermes cron list
delegate_task.delegate_task# 1. Single
delegate_task(goal, context)
# 2. Batch — كل الـ children متوازية في handle واحد
delegate_task(tasks=[
{"goal": "...", "context": "..."},
{"goal": "...", "context": "..."},
{"goal": "...", "context": "..."},
])
# 3. Background — بيرجع handle على طول، النتيجة turn جديد
delegate_task(goal=..., context=..., background=True)
# 4. Orchestrator — طفل يقدر يspawn أولاده
delegate_task(goal=..., role="orchestrator")
# النتيجة JSON متحقّقة — ده اللي يخليك تدمج بدل parsing نص حر
delegate_task(goal=..., output_schema={...})
OpenClaw sessions_spawn |
Hermes delegate_task |
|
|---|---|---|
| التسليم | announce chain (درجة بدرجة) | النتيجة ترجع كـ turn جديد |
| Batch | spawn متكرر | ✔ tasks array في نداء واحد |
| Depth | maxSpawnDepth (1–5) |
max_spawn_depth — flat |
| Concurrency | maxConcurrent: 8 |
max_concurrent_children (3) |
| Tool surface | الأطفال محرومين من session/message tools | full tools حسب الـ toolset |
context و goal بس.# إنشاء مهمة بمعاملاتها المهمة
hermes kanban create "Research: agent frameworks 2026" \
--body "Gather facts ... output a brief with a sources table." \
--assignee researcher --workspace scratch --priority 10 --max-runtime 30m
# dependencies: ده اللي بيخلّي الـ pipeline يعمل لوحده
hermes kanban link <research_id> <write_id>
# lifecycle
hermes kanban request-review <id> # مستني مراجعة — مش block
hermes kanban block <id> --note "needs an API key"
hermes kanban promote <id> # recovery: todo/blocked → ready
# تشخيص
hermes kanban dispatch --dry-run
hermes kanban diagnostics
hermes kanban stats
hermes kanban watch
| المفهوم | المعنى |
|---|---|
| Board | طابور مستقل بـ SQLite خاص |
| Comment | بروتوكول التواصل بين الوكلاء |
| Tenant | namespace ناعم — مش حد أمان |
| Circuit breaker | auto-block بعد محاولتين فاشلتين |
| المتغيرات السحرية | HERMES_KANBAN_BOARD، HERMES_KANBAN_TASK، HERMES_KANBAN_WORKSPACE |
hermes kanban daemon Deprecated — استخدم hermes gateway start.# Swarm: workers متوازيين → verifier → synthesizer، بتبعيات مولّدة تلقائياً
hermes kanban swarm "قارن بين Postgres و SQLite لتطبيقنا" \
--worker "researcher:ابحث عن مزايا Postgres" \
--worker "researcher:ابحث عن مزايا SQLite" \
--worker "analyst:اقرأ الكود الحالي" \
--verifier auditor \
--synthesizer writer
# مهمة open-ended: worker في goal loop، judge بيقيس كل رد ضد الكارت
hermes kanban create "Improve the article's opening" \
--assignee writer --goal --goal-max-turns 5
| الاستراتيجية | إمتى | الشرط |
|---|---|---|
| Output Partitioning | 10 مصادر مستقلة | كل مهمة قابلة للتحقق لوحدها |
| Sequential Pipeline | spec ← implement ← test | كل خطوة عندها مخرج مكتوب |
| Role Partitioning | تخصصات مختلفة فعلاً | دور الـ reviewer مش نفس دور الـ coder |
| Goal Loop | النهاية مش واضحة | مهمة مفتوحة مش عدديّة |
| Map-Reduce | بيانات كتير + دمج حقيقي | الـ Reduce deterministic قدر الإمكان |
| أسلوب التجميع | المزايا | العيوب |
|---|---|---|
انتظار الكل tasks=[...] |
بسيط، والنموذج بيقرّر الأهمية بنفسه | أبطأ child بيحدّد الكل |
بث background=True |
سريع، والـ parent بياخد نتيجة مبكرة | محتاج صبر، وعرضة للتفكير المكرر |
| Swarm v1 | Map + Verify + Reduce | تكلفة عالية |
| البوتلنك | العلامة | الحل |
|---|---|---|
| Session locks | مهام بتنتظر في نفس الـ session | lane contracts + background work |
| Model capacity | rate limits من الـ provider | قلّل maxConcurrent |
| Tool capacity | workers واقفين على terminal | execute_code بدل agent |
| Ownership ambiguity | وكلاء مكرر بيعملوا نفس الحاجة | describe واضح + routing صريح |
| مستوى الإشراف | الأداة | إمتى |
|---|---|---|
| Sampling | role="orchestrator" |
ورشة عمل 2–3 وكلاء |
| Goal loop | --goal |
مهمة واحدة مفتوحة |
| Verifier | swarm |
النجاح معرّف موضوعياً |
| Board root | orchestrator_profile |
تلقائي |
# جودة الـ auto-routing مرهونة بجودة الأوصاف — من غيرها بيرمي child tasks عشوائي
hermes profile describe researcher --text "Reads source code and external docs, writes findings."
hermes profile describe auditor --text "Verifies every claim against sources; rejects unsupported assertions."
hermes profile describe --all --auto
# الفرق المهم: review مش block
hermes kanban request-review <id> # التنفيذ خلص، مستني مراجعة
hermes kanban block <id> # محتاج تدخل بشري
hermes kanban request-changes <id> # حكم الـ reviewer: رجّع للأنفّذ
request-review = «خلص، حد يحدّق» — وblock = «محتاج حد».| التعارض | الحل |
|---|---|
| Routing | Routing — الأولوية بالـ specificity |
| Write | Write — git worktrees |
| Criteria | Criteria — ده نقص مواصفة |
| Memory | Memory — profile منفصل لكل writer |
| Priority | الـ queue + فصل الشغل التقيل لـ background |
| الـ cap | أين | العلامة في اللوج |
|---|---|---|
| Per-call reject | delegate_tool.py |
Too many tasks: N provided... |
| Per-turn truncator | _cap_delegate_task_calls |
Truncated N excess delegate_task... |
| Cost warning — مش capping | نفس الدالة | High values multiply cost linearly |
| ✘ الـ model نفسه | نماذج الاستدلال بتقصّ batch لـ «رقم أجمل» | مفيش لوج خالص |
# الـ recipe التشخيصي — 3 خطوات
hermes config get delegation.max_concurrent_children
grep -E "Truncated.*delegate_task|Too many tasks" ~/.hermes/logs/agent.log | tail
python -c "from tools.delegate_tool import _get_max_concurrent_children; print(_get_max_concurrent_children())"
| البُعد | OpenClaw | Hermes |
|---|---|---|
| Primitive الـ multi-agent | agents.entries |
profiles |
| التوجيه | ✔ bindings |
profile selection + multiplexing |
| Sub-agents | sessions_spawn |
delegate_task |
| عدد التوازي | 8 |
3 |
| Batch | ✘ نداء لكل طفل | ✔ tasks array |
| Structured output | ✘ مفيش output_schema | ✔ output_schema |
| الطابور / الـ Board | command queue (زائلة) | ✔ Kanban |
| الـ tenancy | ✘ | ✔ soft namespace |
| Goal loop | ✘ | ✔ --goal |
| Auto decomposition | ✘ | ✔ decomposer |
| Model لكل مهمة | ✔ model |
✔ --model |
| Bot-to-bot مباشر | ✘ | ✔ Bot Mode |
| الحد الأخطر | sub-agents بيشتركوا في عملية الـ Gateway | delegate_task مش durable |
delegate_task مش durable — للشغل اللي لازم يعيش استخدم cronjob أو Kanban.# 1) تلات profiles بأوصاف — الأوصاف هي اللي بيوجّه الـ decomposer
hermes profile create researcher --description "Reads source code and external docs, writes findings with citations."
hermes profile create writer --description "Turns a researched brief into a structured article. Does not invent facts."
hermes profile create auditor --description "Verifies every claim against its cited source. Rejects unsupported assertions."
hermes -p researcher setup && hermes -p writer setup && hermes -p auditor setup
# 2) اكتب هوية كل واحد في SOUL.md — بيتحقن في كل جلسة
cat > ~/.hermes/profiles/auditor/SOUL.md <<'EOF'
# Auditor
## Owns
- Verifying every claim in a draft against its cited source
## Does not own
- Writing or rewriting the draft (→ writer)
## Output contract
| Claim | Verdict | Evidence |
Verdict is exactly one of: SUPPORTED / UNSUPPORTED / MISLEADING
End with PASS or FAIL. FAIL if any UNSUPPORTED claim remains.
EOF
# 3) لوحة + pipeline بالـ links — الـ promotion بيحصل لوحده
hermes kanban boards create content-pipeline --name "Content Pipeline" --switch
hermes kanban create "Research: agent frameworks" --assignee researcher --max-runtime 30m
hermes kanban create "Write: comparison" --assignee writer --max-runtime 20m
hermes kanban create "Audit: article" --assignee auditor --max-runtime 15m
hermes kanban link <research_id> <write_id> && hermes kanban link <write_id> <audit_id>
# 4) شغّل واعرف النجاح: pipeline end-to-end + auto-promotion + goal loop
hermes kanban dispatch --dry-run
hermes gateway start
hermes kanban list --status running
accountId فاضي. إيه اللي بيحصل؟
todo من 10 دقايق.
max_concurrent_children: 15، والـ log فاضي من لوجي الـ capping. إيه السبب الحقيقي؟
max_concurrent_children لـ 1
hermes kanban swarm مع verifier
delegate_task بـ 5 children
execute_code