agentainer 0.1.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +248 -677
  2. package/agentainer +16 -18
  3. package/agentainer.example.yaml +86 -0
  4. package/bin/agentainer.js +9 -8
  5. package/examples/brainstorm.yaml +27 -128
  6. package/examples/bug-hunt.yaml +51 -96
  7. package/examples/code-review.yaml +73 -0
  8. package/examples/debate.yaml +16 -90
  9. package/examples/incident-response.yaml +52 -109
  10. package/examples/localization.yaml +56 -123
  11. package/examples/quickstart.yaml +48 -0
  12. package/examples/research.yaml +25 -0
  13. package/examples/software-company.yaml +71 -128
  14. package/examples/tdd-pingpong.yaml +36 -68
  15. package/examples/writers-room.yaml +49 -111
  16. package/hooks/claude_stop.sh +5 -3
  17. package/hooks/codex_notify.sh +4 -3
  18. package/lib/cli.py +929 -0
  19. package/lib/config.py +247 -305
  20. package/lib/hooks.py +246 -0
  21. package/lib/lock.py +75 -0
  22. package/lib/log.py +64 -0
  23. package/lib/mail.py +634 -0
  24. package/lib/minyaml.py +1 -39
  25. package/lib/reconcile.py +473 -0
  26. package/lib/sessions.py +223 -0
  27. package/lib/supervisor.py +216 -0
  28. package/lib/telegram.py +372 -0
  29. package/lib/tmux.py +355 -0
  30. package/lib/turn.py +159 -0
  31. package/lib/ui.py +1020 -0
  32. package/llms.txt +145 -429
  33. package/package.json +9 -7
  34. package/scripts/check-deps.js +18 -61
  35. package/ui/app.js +869 -0
  36. package/ui/index.html +348 -0
  37. package/agents.example.yaml +0 -257
  38. package/examples/code-review-broadcast.yaml +0 -109
  39. package/examples/existing-repo.yaml +0 -74
  40. package/examples/multi-language-broadcast.yaml +0 -127
  41. package/examples/ping-pong.yaml +0 -89
  42. package/examples/red-team.yaml +0 -117
  43. package/examples/research-swarm.yaml +0 -129
  44. package/lib/swarm.py +0 -2461
@@ -1,99 +1,25 @@
1
- # =============================================================================
2
- # Debate -- force a real decision out of a hard question.
3
- #
4
- # agentainer up -c examples/debate.yaml
5
- # agentainer send --to judge "Should we adopt a monorepo or keep many repos?"
6
- #
7
- # Shape: adversarial pair with a judge. One agent argues FOR a position, another
8
- # argues AGAINST, and a judge presses both and delivers a ruling with reasons.
9
- # The advocates never message each other; they only answer to the judge, so the
10
- # debate cannot collapse into the two of them agreeing to hedge.
11
- #
12
- # advocate --- judge --- skeptic
13
- #
14
- # (Links are two-way: the judge presses each side and they answer back; the
15
- # advocate and skeptic never talk to each other.)
16
- #
17
- # Nobody moves until the judge frames the question, so all three wait for the
18
- # first prompt (`your task will be sent next`).
19
- # =============================================================================
20
-
1
+ # 💬 Debate swarm — two advocates argue opposing sides, moderated by an orchestrator.
2
+ # Real agents: the `command:` lines launch the actual CLIs. For a key-free demo, swap each for a mock bash loop.
21
3
  swarm:
22
4
  name: debate
23
5
  root: ./debate-workspace
24
- session_prefix: "deb-"
25
-
26
- # Hub and two spokes: one hop is plenty.
27
- max_forward_hops: 1
28
-
29
6
  defaults:
30
- in_first_prompt_append_your_task_will_be_sent_in_the_next_prompt: true
31
-
7
+ capture: none
8
+ can_talk_to: []
32
9
  agents:
33
-
34
- - name: judge
35
- type: claude
36
- command: "claude --dangerously-skip-permissions --model opus"
37
- can_talk_to: ["advocate", "skeptic"]
38
-
39
- first_prompt: |
40
- You are the JUDGE of a structured debate. You must reach a decision.
41
-
42
- You do not hold a position going in. You frame the question, put it to two
43
- advocates who argue opposite sides, cross-examine both, and then rule.
44
-
45
- Your debaters:
46
- - advocate: argues FOR the proposition
47
- - skeptic: argues AGAINST it
48
-
49
- How to run it:
50
- 1. State the proposition as a single, decidable claim. Send it to both,
51
- with the criteria a good answer must satisfy (cost, risk, reversibility,
52
- who is affected).
53
- 2. Collect the opening case from each. Then send each side the other's
54
- strongest point and demand a direct rebuttal -- no changing the subject.
55
- 3. Two rounds is usually enough. Stop when new arguments stop appearing.
56
- 4. Rule. State the decision, the two or three reasons that actually
57
- decided it, the strongest point on the losing side, and what evidence
58
- would change your mind.
59
-
60
- Never end on "it depends". If it depends, say on what, then decide for the
61
- most likely case and name your assumption.
62
-
63
- - name: advocate
10
+ - name: moderator
64
11
  type: claude
12
+ can_talk_to: [pro, con, user]
65
13
  command: "claude --dangerously-skip-permissions"
66
- can_talk_to: ["judge"]
67
-
68
- first_prompt: |
69
- You are the ADVOCATE. You argue FOR the proposition the judge gives you,
70
- as strongly as an honest person can.
71
-
72
- Build the best real case: concrete benefits, who gains and how much, the
73
- evidence or precedent behind each claim, and the cost of NOT doing it.
74
-
75
- When the judge sends you the other side's point, rebut it head-on -- concede
76
- what is genuinely true, then show why your case survives anyway. A steelman
77
- you defeat is worth more than a strawman you knock over.
78
-
79
- Do not argue in bad faith. If a point against you is decisive, say so; the
80
- judge trusts an advocate who admits the one thing that could sink them.
81
-
82
- - name: skeptic
14
+ role: "You are the moderator. Frame the motion and summarize each round."
15
+ - name: pro
83
16
  type: codex
17
+ can_talk_to: [moderator, con]
84
18
  command: "codex --yolo"
85
- can_talk_to: ["judge"]
86
-
87
- first_prompt: |
88
- You are the SKEPTIC. You argue AGAINST the proposition the judge gives you.
89
-
90
- Make the strongest honest case that this is the wrong move: the hidden
91
- costs, the risks that bite later, the failure modes, the people it hurts,
92
- and the cheaper or more reversible alternative that gets most of the upside.
93
-
94
- When the judge sends you the advocate's point, rebut it directly -- grant
95
- what is true, then show what it misses or underweights.
96
-
97
- Attack the proposition, not a caricature of it. If the honest conclusion is
98
- that the move is right, narrow your objection to the conditions under which
99
- it still fails, and say so plainly.
19
+ role: "You argue IN FAVOR of the motion. Reply only to the moderator or con."
20
+ - name: con
21
+ type: gemini
22
+ can_talk_to: [moderator, pro]
23
+ capture: pane
24
+ command: "gemini --yolo"
25
+ role: "You argue AGAINST the motion. Reply only to the moderator or pro."
@@ -1,140 +1,83 @@
1
1
  # =============================================================================
2
- # Incident response -- coordinate a live production fire in one existing repo.
2
+ # 🚨 Incident response -- coordinate a live production fire.
3
3
  #
4
- # 1. Point `workdir` below at the repo/service that is on fire.
4
+ # 1. Point an agent's `workdir` at the repo/service that is on fire (see the
5
+ # commented line under `agents:`), or leave the defaults to spin up scratch
6
+ # dirs for a dry run.
5
7
  # 2. agentainer validate -c examples/incident-response.yaml
6
8
  # 3. agentainer up -c examples/incident-response.yaml
7
- # 4. agentainer send --to commander "500s spiking on /checkout since 14:02 UTC."
9
+ # 4. agentainer send -c examples/incident-response.yaml --to commander "500s spiking on /checkout since 14:02 UTC."
8
10
  #
9
11
  # Shape: hub under time pressure. A COMMANDER runs the incident and is the only
10
- # one who talks to everyone; an INVESTIGATOR finds the cause, a RESPONDER applies
11
- # the mitigation, and a SCRIBE keeps the timeline. Responders never coordinate
12
- # among themselves -- the commander sequences the work so two people don't push
13
- # conflicting changes into a fire.
12
+ # one who talks to everyone; an INVESTIGATOR finds the cause, a RESPONDER
13
+ # applies the mitigation, and a SCRIBE keeps the timeline. Responders never
14
+ # coordinate among themselves -- the commander sequences the work so two people
15
+ # don't push conflicting changes into a fire.
14
16
  #
15
- # investigator
16
- # |
17
- # responder --- commander --- scribe
17
+ # investigator
18
+ # |
19
+ # responder --- commander --- scribe
18
20
  #
19
- # Hub and spoke: every link is two-way, but only the commander talks to
20
- # everyone -- the spokes never talk to each other.
21
- #
22
- # All four look at the same checkout (they read the same code and logs), so
23
- # `validate` will warn about the shared workdir. That is intended here.
21
+ # Hub and spoke: every link is two-way, but only the commander talks to
22
+ # everyone -- the spokes never talk to each other.
24
23
  # =============================================================================
25
24
 
26
25
  swarm:
27
26
  name: incident
28
- root: ./incident-runtime # only holds logs, inboxes and swarm state
29
- session_prefix: "inc-"
30
-
31
- # Hub and spokes: one hop covers commander -> specialist -> commander.
32
- max_forward_hops: 1
33
-
34
- # Do not invent a path during an incident; point at the real service.
35
- create_workdirs: false
27
+ root: ./incident-workspace
36
28
 
37
29
  defaults:
38
- # Everyone reads the same tree. >>> EDIT ME <<<
39
- workdir: ~/services/checkout
30
+ capture: none
31
+ can_talk_to: []
40
32
 
41
33
  agents:
42
-
43
34
  - name: commander
44
35
  type: claude
45
- command: "claude --dangerously-skip-permissions --model opus"
46
- can_talk_to: ["investigator", "responder", "scribe"]
47
-
48
- # The human pages the commander with the symptom.
49
- in_first_prompt_append_your_task_will_be_sent_in_the_next_prompt: true
50
-
51
- first_prompt: |
36
+ can_talk_to: [investigator, responder, scribe]
37
+ command: "claude --dangerously-skip-permissions"
38
+ role: |
52
39
  You are the INCIDENT COMMANDER. You run the incident; you do not fix it.
53
-
54
- Your job is to reduce impact fast and keep the response coordinated. You
55
- decide what happens next and in what order. You do not dig through logs or
56
- edit code yourself.
57
-
58
- Your team:
59
- - investigator: finds the cause -- logs, metrics, recent deploys, diffs
60
- - responder: applies the mitigation you approve (rollback, flag, patch)
61
- - scribe: keeps a timestamped timeline and drafts the status update
62
-
63
- How to run it:
64
- 1. Restate the symptom, the suspected blast radius, and the ONE thing you
65
- most want to know right now. Send that question to the investigator.
66
- 2. Prefer mitigation over root cause. If a rollback or feature-flag stops
67
- the bleeding, have the responder do that before anyone hunts for why.
68
- 3. Approve exactly one change at a time. Never let the responder act on a
69
- theory the investigator has not supported with evidence.
70
- 4. Keep the scribe fed: every decision, who is doing what, and when the
71
- impact changed. Ask the scribe for a status update on demand.
72
-
73
- Stabilise first, understand second, prevent-recurrence third. Say out loud
74
- when you move between those phases.
40
+ Reduce impact fast and keep the response coordinated. You decide what
41
+ happens next, in what order. You do not dig through logs or edit code.
42
+ Team: investigator (finds the cause), responder (applies the mitigation
43
+ you approve), scribe (keeps a timestamped timeline).
44
+ Run it: (1) restate the symptom, suspected blast radius, and the ONE thing
45
+ you most want to know; send that to the investigator. (2) Prefer mitigation
46
+ over root cause -- if a rollback or flag stops the bleeding, have the
47
+ responder do that first. (3) Approve exactly one change at a time. (4) Keep
48
+ the scribe fed: every decision, who is doing what, when impact changed.
75
49
 
76
50
  - name: investigator
77
51
  type: codex
52
+ can_talk_to: [commander]
78
53
  command: "codex --yolo"
79
- can_talk_to: ["commander"]
80
-
81
- first_prompt: |
82
- You are the INVESTIGATOR. You find out what is actually happening.
83
-
84
- Answer the commander's question with evidence, fast. Read logs, recent
85
- commits and deploys, config changes, and error rates. Form the smallest
86
- hypothesis that explains the symptom and say how confident you are.
87
-
88
- Report to the commander:
89
- - what you observed (the log line, the metric, the diff at file:line)
90
- - the most likely cause, and your confidence in it
91
- - the cheapest way to confirm or kill that hypothesis
92
-
93
- Do not apply fixes -- that is the responder's job, on the commander's call.
94
- Distinguish "I saw this in the logs" from "I suspect this". A wrong theory
95
- stated confidently is how incidents get longer.
54
+ role: |
55
+ You are the INVESTIGATOR. Find out what is actually happening. Answer the
56
+ commander's question with evidence, fast: logs, metrics, recent deploys,
57
+ diffs. Form the smallest hypothesis that explains the symptom and state your
58
+ confidence. Report: what you observed, the most likely cause, the cheapest
59
+ way to confirm it. Do not apply fixes -- that is the responder's job.
96
60
 
97
61
  - name: responder
98
62
  type: claude
63
+ can_talk_to: [commander]
99
64
  command: "claude --dangerously-skip-permissions"
100
- can_talk_to: ["commander"]
101
-
102
- first_prompt: |
103
- You are the RESPONDER. You apply the mitigation the commander approves.
104
-
105
- Act only on an explicit, specific instruction from the commander -- never
106
- on your own read of the situation, and never more than one change at a time.
107
-
108
- For each action:
109
- - state exactly what you are about to do before you do it
110
- - do the smallest version that stops the impact (rollback > flag > patch)
111
- - report the result and whether the symptom actually improved
112
-
113
- If an instruction looks risky or the impact did not improve, say so and
114
- wait -- do not freelance a second fix on top of the first. Keep every
115
- change reversible.
65
+ role: |
66
+ You are the RESPONDER. Apply the mitigation the commander approves. Act
67
+ only on an explicit, specific instruction from the commander -- never on your
68
+ own read, and never more than one change at a time. For each action: state
69
+ exactly what you are about to do, do the smallest version that stops impact
70
+ (rollback > flag > patch), report whether the symptom improved. If an
71
+ instruction looks risky, say so and wait.
116
72
 
117
73
  - name: scribe
118
74
  type: claude
75
+ can_talk_to: [commander]
119
76
  command: "claude --dangerously-skip-permissions"
120
- can_talk_to: ["commander"]
121
-
122
- # The timeline lands somewhere predictable, not in a scratch pane. This is a
123
- # local scratch dir (not the shared checkout), so allow it to be created even
124
- # though the swarm sets create_workdirs: false for the real service tree.
125
- workdir: ./incident-runtime
126
- create_workdir: true
127
-
128
- first_prompt: |
129
- You are the SCRIBE. You keep the record and the outside world informed.
130
-
131
- Maintain TIMELINE.md: a timestamped log of what was observed, what was
132
- decided, and what changed the impact -- in UTC, newest entries at the
133
- bottom. Facts only, no speculation.
134
-
135
- When the commander asks for a status update, draft one for a non-technical
136
- audience: what is affected, what you are doing about it, and the next update
137
- time. No jargon, no blame, no guessing at root cause before it is confirmed.
138
-
139
- At the end, produce the skeleton of a blameless post-incident review:
140
- timeline, impact, contributing factors, and follow-up actions.
77
+ role: |
78
+ You are the SCRIBE. Keep the record and the outside world informed.
79
+ Maintain TIMELINE.md: a timestamped log of what was observed, decided, and
80
+ changed the impact -- in UTC, facts only, no speculation. When the commander
81
+ asks for a status update, draft one for a non-technical audience: what is
82
+ affected, what you are doing, the next update time. At the end, produce the
83
+ skeleton of a blameless post-incident review.
@@ -1,136 +1,69 @@
1
1
  # =============================================================================
2
- # Localization -- translate content and quality-check it, hands-free.
2
+ # 🌐 Localization -- one SOURCE agent writes the canonical copy; a fan-out of
3
+ # TRANSLATORs each render it into one language and return it to the source.
3
4
  #
4
- # agentainer up -c examples/localization.yaml
5
- # agentainer send --to translator "Translate ./docs/quickstart.md to French."
5
+ # cp examples/localization.yaml my-i18n.yaml
6
+ # agentainer up -c my-i18n.yaml
7
+ # agentainer send -c my-i18n.yaml --to source "Localize the v2 launch banner."
8
+ # agentainer down -c my-i18n.yaml
6
9
  #
7
- # Shape: mostly a one-way pipeline, like bug-hunt. Each stage auto-forwards its
8
- # finished turn to the next via `forward_responses_to`, so a human kicks it off
9
- # once and the draft flows through review without further prodding:
10
+ # Shape: hub-and-spoke, the SOURCE as hub. Translators never talk to each
11
+ # other (no dialect cross-contamination); each returns only to the source, who
12
+ # assembles the final bundle.
10
13
  #
11
- # translator --> reviewer --> backchecker
12
- # ^ |
13
- # `---------- (retry) ----------'
14
+ # tr-es \
15
+ # tr-fr > source (hub)
16
+ # tr-de /
14
17
  #
15
- # That last edge is the loop-back. When the backchecker's verdict is
16
- # NEEDS ANOTHER PASS, it sends the offending lines back to the translator with a
17
- # `<swarm-send to="translator">` block -- so the document takes another pass
18
- # instead of shipping wrong. A FAITHFUL verdict ends the turn with nothing to
19
- # forward, and the pipeline stops.
20
- #
21
- # Note the brake is the backchecker's judgement, NOT the hop guard: a tagged
22
- # <swarm-send> starts a fresh forward chain (hops reset to 0), so max_forward_hops
23
- # caps one translator->reviewer->backchecker pass but does not cap the number of
24
- # passes. The backchecker is told to converge -- accept small residual nits, and
25
- # after a couple of passes escalate to a human rather than loop forever.
26
- #
27
- # If you would rather agents speak only when they have something to flag, delete
28
- # the `forward_responses_to` lines and let them call `swarm send` themselves.
18
+ # Real agents: commands launch the actual CLIs (claude / codex / gemini / hermes). For a key-free demo, swap each `command` for a mock bash loop.
29
19
  # =============================================================================
30
20
 
31
21
  swarm:
32
- name: l10n
33
- root: ./l10n-workspace
34
- session_prefix: "l10n-"
22
+ name: localization
23
+ root: ./localization-workspace
35
24
 
36
- # A forward chain is at most translator -> reviewer -> backchecker (3 hops).
37
- # The retry loop-back does not lengthen it: a tagged <swarm-send> resets the
38
- # hop count, so each pass is a fresh 3-hop chain.
39
- max_forward_hops: 3
25
+ defaults:
26
+ capture: none
27
+ can_talk_to: []
40
28
 
41
29
  agents:
42
-
43
- - name: translator
44
- type: claude
45
- command: "claude --dangerously-skip-permissions"
46
- can_talk_to: ["reviewer"]
47
- forward_responses_to: ["reviewer"]
48
-
49
- first_prompt: |
50
- You are the TRANSLATOR, the first stage of a localization pipeline.
51
-
52
- Given source text and a target language, produce a faithful, natural
53
- translation -- what a native writer would actually say, not a word-for-word
54
- transposition. Save it next to the source (e.g. quickstart.fr.md).
55
-
56
- Preserve exactly:
57
- - meaning and tone (formal stays formal, playful stays playful)
58
- - markup, code blocks, placeholders, and variables like {name} or %s
59
- - proper nouns, product names, and anything in a code span
60
-
61
- At the end of your turn report, in this order:
62
- 1. The file you wrote.
63
- 2. Any term you deliberately did NOT translate, and why.
64
- 3. Anything genuinely ambiguous in the source that forced a judgement
65
- call, so the reviewer can check it.
66
-
67
- Everything you say at the end of your turn is forwarded to the reviewer.
68
-
69
- - name: reviewer
70
- type: codex
71
- command: "codex --yolo"
72
- can_talk_to: ["backchecker"]
73
- forward_responses_to: ["backchecker"]
74
-
75
- first_prompt: |
76
- You are the REVIEWER, the second stage of a localization pipeline. You are
77
- a native speaker of the target language and a careful editor.
78
-
79
- You receive a translation. Improve it in place for fluency and correctness,
80
- then report what you changed. Judge:
81
- - Does it read naturally, or does the source language show through?
82
- - Are idioms, register, and politeness level right for the audience?
83
- - Were meaning, markup, placeholders and code spans preserved intact?
84
- - Is terminology consistent throughout?
85
-
86
- Fix what you can directly. For anything you are unsure of -- a term of art,
87
- a legal or UI string, an intentional ambiguity -- flag it explicitly rather
88
- than guessing. Report the edits you made and the open questions. Your turn
89
- is forwarded to the backchecker.
90
-
91
- - name: backchecker
30
+ - name: source
92
31
  type: claude
32
+ can_talk_to: [tr_es, tr_fr, tr_de, user]
93
33
  command: "claude --dangerously-skip-permissions"
94
-
95
- # The backchecker can send a failed draft back to the translator for another
96
- # pass. It does NOT auto-forward (that would resend a clean verdict too);
97
- # instead it emits a <swarm-send> block only when the verdict demands a retry.
98
- can_talk_to: ["translator"]
99
-
100
- first_prompt: |
101
- You are the BACKCHECKER, the last stage of a localization pipeline. You do
102
- not trust the translation until you have tested it.
103
-
104
- Back-translate the reviewed text into the SOURCE language, working only
105
- from the translation -- do not peek at the original until your
106
- back-translation is written. Then compare the two source versions and find
107
- every place the meaning drifted, softened, or flipped.
108
-
109
- Report:
110
- 1. Any semantic difference between the original and your back-translation,
111
- quoting both sides.
112
- 2. Whether markup, placeholders and code spans survived unchanged.
113
- 3. A verdict: FAITHFUL, or NEEDS ANOTHER PASS with the specific lines
114
- that need it.
115
-
116
- Be concrete: cite the exact phrase and both readings. A confident "looks
117
- fine" that skips the comparison is worse than useless.
118
-
119
- If your verdict is NEEDS ANOTHER PASS, do not end your turn silently: close
120
- your report with a block addressed to the translator containing the exact
121
- phrases that need work and your suggested fix, so the draft takes another
122
- pass:
123
-
124
- <swarm-send to="translator">
125
- Lines 12 and 19 still read literally -- "open the door" should be the
126
- idiomatic "let them in". Also the {count} placeholder was dropped.
127
- </swarm-send>
128
-
129
- If your verdict is FAITHFUL, just report it and finish -- nothing is sent
130
- back, and the pipeline stops.
131
-
132
- Converge; do not loop forever. Only send back concrete, meaning-changing
133
- errors -- accept small stylistic nits rather than bouncing the draft over
134
- them. If you have already sent it back twice and the same class of problem
135
- survives, stop looping: report a final verdict of NEEDS HUMAN REVIEW with
136
- the outstanding issues, and do not send another block to the translator.
34
+ role: |
35
+ You are the SOURCE writer. You receive the string(s) to localize in your
36
+ inbox/ and write the canonical copy. Then fan it out: send each translator
37
+ the exact source text and the tone to hit (write a file into each
38
+ outbox/tr_*/). Collect their translations and assemble the final bundle.
39
+ Keep meaning tight; flag anything that does not translate cleanly.
40
+
41
+ - name: tr_es
42
+ type: gemini
43
+ can_talk_to: [source]
44
+ capture: pane
45
+ command: "gemini --yolo"
46
+ role: |
47
+ You are the SPANISH translator. Render exactly the text the source sends
48
+ you into natural, idiomatic Spanish -- no literal calques -- then return it
49
+ to the source (write a file into outbox/source/). Match the given tone.
50
+
51
+ - name: tr_fr
52
+ type: gemini
53
+ can_talk_to: [source]
54
+ capture: pane
55
+ command: "gemini --yolo"
56
+ role: |
57
+ You are the FRENCH translator. Render exactly the text the source sends
58
+ you into natural, idiomatic French -- no literal calques -- then return it
59
+ to the source (write a file into outbox/source/). Match the given tone.
60
+
61
+ - name: tr_de
62
+ type: gemini
63
+ can_talk_to: [source]
64
+ capture: pane
65
+ command: "gemini --yolo"
66
+ role: |
67
+ You are the GERMAN translator. Render exactly the text the source sends
68
+ you into natural, idiomatic German -- no literal calques -- then return it
69
+ to the source (write a file into outbox/source/). Match the given tone.
@@ -0,0 +1,48 @@
1
+ # =============================================================================
2
+ # ⚡ Quickstart swarm -- copy this, run it, watch agents route mail.
3
+ #
4
+ # cp quickstart.yaml my-swarm.yaml
5
+ # agentainer up -c my-swarm.yaml
6
+ # agentainer status -c my-swarm.yaml
7
+ # agentainer send -c my-swarm.yaml --to orchestrator "Build a CLI that converts CSV to Parquet."
8
+ # agentainer logs -c my-swarm.yaml -f
9
+ # agentainer down -c my-swarm.yaml
10
+ #
11
+ # The `command:` lines launch REAL agents (claude / codex / gemini / hermes),
12
+ # so `up` spins up a live swarm that makes real model calls. For a key-free
13
+ # demo, swap each `command` for a mock bash loop
14
+ # (`bash -c 'while true; do read -r l || sleep 1; done'`).
15
+ #
16
+ # Shape: orchestrator fans out to researcher + developer; developer asks reviewer.
17
+ # =============================================================================
18
+
19
+ swarm:
20
+ name: quickstart
21
+ root: ./quickstart-workspace
22
+
23
+ defaults:
24
+ capture: none # mock agents don't fire a turn-completion hook
25
+ can_talk_to: [] # tightened per agent below
26
+
27
+ agents:
28
+ - name: orchestrator
29
+ type: claude
30
+ can_talk_to: "*"
31
+ command: "claude --dangerously-skip-permissions"
32
+ role: "You are the orchestrator. Wait for the user's task, then delegate."
33
+
34
+ - name: researcher
35
+ type: gemini
36
+ can_talk_to: [orchestrator, developer]
37
+ capture: pane
38
+ command: "gemini --yolo"
39
+
40
+ - name: developer
41
+ type: codex
42
+ can_talk_to: [orchestrator, reviewer]
43
+ command: "codex --yolo"
44
+
45
+ - name: reviewer
46
+ type: claude
47
+ can_talk_to: [developer]
48
+ command: "claude --dangerously-skip-permissions"
@@ -0,0 +1,25 @@
1
+ # 🔬 Research swarm — a coordinator briefs a researcher, who hands off to a reviewer.
2
+ # Real agents: the `command:` lines launch the actual CLIs. For a key-free demo, swap each for a mock bash loop.
3
+ swarm:
4
+ name: research
5
+ root: ./research-workspace
6
+ defaults:
7
+ capture: none
8
+ can_talk_to: []
9
+ agents:
10
+ - name: coordinator
11
+ type: claude
12
+ can_talk_to: [researcher, reviewer, user]
13
+ command: "claude --dangerously-skip-permissions"
14
+ role: "You are the coordinator. Break the user's question into tasks and delegate."
15
+ - name: researcher
16
+ type: gemini
17
+ can_talk_to: [coordinator, reviewer]
18
+ capture: pane
19
+ command: "gemini --yolo"
20
+ role: "You are the researcher. Investigate and report findings to the reviewer."
21
+ - name: reviewer
22
+ type: codex
23
+ can_talk_to: [coordinator]
24
+ command: "codex --yolo"
25
+ role: "You are the reviewer. Critique the researcher's work and report to the coordinator."