Before Kickoff Hook
The before kickoff hook is executed before the crew starts its tasks. It receives the input dictionary and can modify it before passing it to the crew. You can use this hook to set up your environment, load necessary data, or preprocess your inputs. This is useful in scenarios where the input data might need enrichment or validation before being processed by the crew. Here’s an example of defining a before kickoff function in yourcrew.py
:
After Kickoff Hook
The after kickoff hook is executed after the crew has completed its tasks. It receives the result object, which contains the outputs of the crew’s execution. This hook is ideal for post-processing results, such as logging, data transformation, or further analysis. Here’s how you can define an after kickoff function in yourcrew.py
:
log_results
function, the results of the crew execution are simply printed out. You can extend this to perform more complex operations such as sending notifications or integrating with other services.