How to gather the outputs of some task into one

I have created a crew with:

  • 4 tasks do some analytics about a conversation
  • 1 task, summarizes those analytics
  • 2 agents: 1 for crew manager, 1 for some analytics

Each task has structured outputs.

I have created a crew like so:

Crew(
        tasks=[
            ConversationSentimentTask,
            ConversationSummarizationTask,
            ReputationTask,
            ServiceQualityTask,
            SalesRecommendationTask,
            ConversationAnalyticsReportTask,
        ],
        agents=[SalesRecommendationAgent],
        manager_agent=ConversationAnalyticsAgent,
        process=Process.sequential,
        verbose=True,
    )

Each task except the last one could be run async. And the last task contains all previous tasks as context.

There are some questions:

  1. Is this approach correct?
  2. Often, some tasks fail to generate desired structured output and the run fails. Then the crew stuck on “Task Completion\n Task Completed” but never outputs the final answer. What could be the issue?

What you are looking for is probably this feature Tasks - CrewAI. It does exactly what you described. Try it out.