Capturing Flow output

I have a flow with multiple crews and they have agents ands tasks respectively. when I kick off the flow (flow_output = flow.kickoff_async()) how do I capture the output of individual or last task from flow_output. what are the attributes of the flow output?

I tried to access task.output.raw but it doesnt work either.

If you are using a flow with a structured state you can save the results of your individual crews in the state and then you can access them after the flow finishes executing:

await your_flow.kickoff_async()

your_flow.state.message
your_flow.state.task_result_1
your_flow.state.task_result_2

1 Like