What is kickoff_for_each()?
kickoff_for_each(inputs=[{...}, ...]) reuses the same Crew configuration but executes a full kickoff for every dict in the list, returning a Python list of CrewOutput objects aligned with input order. That makes it the ergonomic choice for overnight sweeps over CRM rows, prompt variants, or evaluation datasets where you want deterministic ordering and simpler mental modeling than manual for-loops.
Runs are sequential by default: item n+1 does not start until item n completes. That protects you from accidental self-DDOS when your tools hit external APIs, but it also means wall-clock time scales linearly with batch size. When IO-bound parallelism is safe, switch to kickoff_for_each_async, or shard the list across worker processes at the orchestration layer.
Memory, entity stores, and cached embeddings persist between iterations unless you explicitly reset them. That is powerful when each row should learn from prior rows, dangerous when rows must stay isolated — call reset_memories() between batches or construct a fresh Crew per tenant when isolation matters.
Use Cases
- • Batch report generation
- • Per-customer enrichment
- • Sweep over prompt variations
Key Features
- ✓ Same crew, many inputs
- ✓ Sequential by default
- ✓ Returns list of CrewOutput
When NOT to Use
Streaming or chained scenarios — those want Flows.
Notes
State leakage between rows
Short-term memory and entity graphs accumulate across iterations. If each row is a different customer, reset or rebuild the crew between groups to avoid cross-customer contamination.
Failure handling
Decide whether one failed kickoff should abort the batch. The sequential API encourages all-or-nothing loops; wrap per-item try/except in your own orchestration if partial success is acceptable.
Cost forecasting
Token spend multiplies by the number of dicts. Pre-flight estimate with a dry-run on a single representative input before launching thousands of paid calls.
Ordering guarantees
Outputs match input order — rely on that for merges, but do not assume parallel speedups; those require kickoff_for_each_async or external workers.
Parameters
| Parameter | Type | Required | Purpose |
|---|---|---|---|
| inputs | list[dict] | No | List of input dicts; one kickoff per item. |
Code Examples
Batch
results = crew.kickoff_for_each(inputs=[{'topic': t} for t in topics])
Zip outputs with ids
rows = [{'id': r['id'], 'topic': r['summary']} for r in crm_rows]
outs = crew.kickoff_for_each(inputs=rows)
for row, out in zip(rows, outs):
save(row['id'], out.raw)
When to Use
Batch jobs over many inputs.
Common Mistakes
❌ Passing a single dict
✅ Pass a list of dicts.
Related: @tool decorator reference, Agent class reference, and the first Crew tutorial.
kickoff_for_each() FAQ
What is kickoff_for_each() in CrewAI?
Runs the crew once per item in a list of inputs, returning a list of CrewOutputs. kickoff_for_each(inputs=[{...}, ...]) reuses the same Crew configuration but executes a full kickoff for every dict in the list, returning a Python list of CrewOutput objects aligned with input order. That makes it the ergonomic choice for overnight sweeps over CRM rows, prompt variants, or evaluation datasets where you want deterministic ordering and simpler mental modeling than manual for-loops. Runs are sequential by default: item n+1 does not start until item n completes…
Which CrewAI types expose the method kickoff_for_each()?
DevShelfHub documents kickoff_for_each() on Crew. The reference maps it to Python module crewai.Crew — pin your installed crewai version and match imports to the snippet on this page.
When should I use kickoff_for_each()?
Batch jobs over many inputs.
When should I avoid kickoff_for_each()?
Streaming or chained scenarios — those want Flows.
How do I call kickoff_for_each() from Python?
results = crew.kickoff_for_each(inputs=batch)
Where can I explore more CrewAI API reference pages?
Open the CrewAI API reference index on DevShelfHub to search classes, methods, and decorators, each with runnable examples, parameters, common mistakes, and cross-links.