AI / CrewAI Interview Questions
What is the difference between a Crew's kickoff() and kickoff_async()?
Both methods start a crew's execution and return its final result, the difference is purely about whether that execution blocks the calling code while it runs.
- kickoff(): runs synchronously, blocking further code from executing until the crew finishes
- kickoff_async(): runs asynchronously, letting other code continue running concurrently while the crew executes
Choosing between them depends on the surrounding application, a simple script might use kickoff() directly, while a Flow coordinating multiple crews concurrently, or a web application handling many requests, would typically use kickoff_async() to avoid blocking.
More Related questions...