@lov3kaizen/agentsea-crews 1.0.1 → 1.1.1

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.
package/README.md CHANGED
@@ -70,6 +70,32 @@ const result = await crew.kickoff();
70
70
  console.log(result.finalOutput);
71
71
  ```
72
72
 
73
+ > **Execution model.** By default, crew agents execute against real LLMs via
74
+ > `@lov3kaizen/agentsea-core` providers (a required peer dependency), so make
75
+ > sure the relevant API key is set (e.g. `ANTHROPIC_API_KEY`). Supported
76
+ > providers out of the box: `anthropic`, `openai`, `gemini`, `ollama`.
77
+ >
78
+ > - To plug in a different integration, pass an `execute` function on the crew
79
+ > config (or to `createCrewAgent`).
80
+ > - For offline scaffolding and tests, set `mock: true` on the crew config to
81
+ > get deterministic mock responses without any network calls.
82
+ >
83
+ > ```typescript
84
+ > // Offline / test mode
85
+ > const crew = createCrew({ ...config, mock: true });
86
+ >
87
+ > // Custom execution backend
88
+ > const crew2 = createCrew({
89
+ > ...config,
90
+ > execute: async (input, systemPrompt) => ({
91
+ > output: await myLlm(systemPrompt, input),
92
+ > tokensUsed: 0,
93
+ > latencyMs: 0,
94
+ > iterations: 1,
95
+ > }),
96
+ > });
97
+ > ```
98
+
73
99
  ### Using Templates
74
100
 
75
101
  ```typescript
@@ -154,6 +180,36 @@ const crew = createCrew({
154
180
  });
155
181
  ```
156
182
 
183
+ ### Concurrency
184
+
185
+ By default a crew runs ready tasks **sequentially**, which keeps event ordering
186
+ deterministic. For independent tasks you can opt into a bounded worker pool so
187
+ they execute in parallel — set it on the crew config or per `kickoff()` call:
188
+
189
+ ```typescript
190
+ // Crew-wide default
191
+ const crew = new Crew({
192
+ name: 'Research Crew',
193
+ agents: [...],
194
+ delegationStrategy: 'best-match',
195
+ maxConcurrentTasks: 4, // up to 4 ready tasks run at once
196
+ });
197
+
198
+ // Or override per run (takes precedence over the config value)
199
+ const result = await crew.kickoff({ maxConcurrentTasks: 4 });
200
+ ```
201
+
202
+ Notes:
203
+
204
+ - The default is `1` (fully sequential) — behavior is unchanged unless you opt in.
205
+ - Only tasks that are _ready_ in the same scheduling iteration run together, so
206
+ dependency ordering is still respected.
207
+ - With concurrency `> 1`, `task:assigned` / `task:completed` events from
208
+ different tasks interleave as workers settle (each task still emits its own
209
+ events in order). If a task fails after exhausting retries, no further tasks
210
+ are launched, in-flight tasks are allowed to settle, and the crew ends with the
211
+ same fatal `crew:error` as the sequential path.
212
+
157
213
  ### Memory Systems
158
214
 
159
215
  Share state and knowledge across agents: