Report issue – Saving Full Report Instead of Summary

Hi,
I’ve set up a crew in CrewAI with the following agents and tasks:

Agents:

  1. Company Research Agent - gathers company data from various sources.
  2. Reporting Analyst - creates detailed reports based on the data.

Tasks:

  1. Data Collection Task: Collects information about {company_name}.
  2. Report Generation Task: Generates a detailed report with sections like Introduction, Financial Analysis, and Recommendations.

When I run the crew, the output file only saves a summary or conclusioninstead of the full report:

“The comprehensive report on Apple has been completed… It includes all necessary sections like Introduction, Financial Analysis, etc., and provides actionable recommendations.”

But I want the entire detailed report with all sections saved in the file.
I saw in the crew logs that it has a report generated, but it is not saved correctly.

How can I make sure the file contains the full report instead of just a summary?

Here is my crew file:

from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
from dotenv import load_dotenv
from langchain_openai import ChatOpenAI
import agentops
import os
from crewai_tools import SerperDevTool, ScrapeWebsiteTool

load_dotenv()

# Retrieve the API key from the environment variables
agentops_api_key = os.getenv("AGENTOPS_API_KEY")

agentops.init(agentops_api_key)

# Uncomment the following line to use an example of a custom tool
# from company_radar.tools.custom_tool import MyCustomTool

# Check our tools documentations for more information on how to use them

@CrewBase
class CompanyRadar():
	"""CompanyRadar crew"""

	agents_config = 'config/agents.yaml'
	tasks_config = 'config/tasks.yaml'

	@agent
	def company_research_agent(self) -> Agent:
		return Agent(
			config=self.agents_config['company_research_agent'],
			tools=[SerperDevTool(), ScrapeWebsiteTool()],  # Include any tools if necessary
			verbose=True
		)

	@agent
	def reporting_analyst(self) -> Agent:
		return Agent(
			config=self.agents_config['reporting_analyst'],
			verbose=True
		)

	@task
	def data_collection_task(self) -> Task:
		return Task(
			config=self.tasks_config['data_collection_task'],
		)

	@task
	def report_generation_task(self) -> Task:
		return Task(
			config=self.tasks_config['report_generation_task'],
			output_file='company_analysis_report.md',
		)

	@crew
	def crew(self) -> Crew:
		"""Creates the CompanyRadar crew"""
		return Crew(
			agents=self.agents, # Automatically created by the @agent decorator
			tasks=self.tasks, # Automatically created by the @task decorator
			verbose=True,
			process=Process.hierarchical,
			manager_llm=ChatOpenAI(temperature=0, model="gpt-4o"),
			respect_context_window=True,  # Enable respect of the context window for tasks
    		memory=True,  # Enable memory usage for enhanced task execution
    		manager_agent=None,  # Optional: explicitly set a specific agent as manager instead of the manager_llm
    		planning=True,  # Enable planning feature for pre-execution strategy
		)

I’ve encountered this exact situation before. What worked for me was setting the human_input parameter to True for the agent responsible for writing the report. See the docs.

Here’s what happened in my case:

  • Case A: Sometimes, I received a summary like: “The comprehensive report on xxxxx has been completed… It includes all necessary sections like xxxxx, xxxxx, xxxxx, etc.”
  • Case B: Other times, I got the actual report saved as a markdown file.

When you use human input, you’ll always be prompted for feedback after the agent with human_input=True finishes its task. The feedback that resolved this issue for me was:

  • Case A: Reply with “Please write a full report.”
  • Case B: Reply with “Perfect, just continue.”

In both cases, the agent will repeat the task. In Case A, you should receive the full report after the second attempt.

1 Like