Post Content:
Hi everyone! I’m working with CrewAI for a professional project (SEO pages with internal linking, metadata, images, and well-defined sections).
Context / What I’m trying to achieve:
- I have a main (“parent”) Crew that manages other Crews, each specialized in a clear responsibility (e.g., generating page structure, metadata, backlinks, images, FAQ, etc.).
- I use CrewAI Flows and clear Pydantic models.
- I explicitly use
full_output=True
in my parent Crew to try accessing intermediate task outputs easily at the end.
My simplified current structure:
# structure_crew.py simplified example clearly below
@CrewBase
class StructureCrew:
agents_config = "config/agents.yaml"
tasks_config = "config/tasks.yaml"
@agent
def structure_generator(self) -> Agent:
return Agent(
config=self.agents_config["structure_generator"],
verbose=True,
)
@agent
def meta_generator(self) -> Agent:
return Agent(
config=self.agents_config["meta_generator"],
verbose=True,
)
@task
def generate_structure_task(self) -> Task:
return Task(
config=self.tasks_config["generate_structure_task"],
output_pydantic=PageStructure
)
@task
def generate_meta_task(self) -> Task:
return Task(
config=self.tasks_config["generate_meta_task"],
context=[self.generate_structure_task()],
output_pydantic=MetaData
)
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=[
self.generate_structure_task(),
self.generate_meta_task(),
],
process=Process.sequential,
verbose=True,
full_output=True # <-- explicitly to retrieve all task outputs later
)
My actual issue:
Even though I clearly specify full_output=True
, I still cannot precisely access intermediate task outputs. When I retrieve the CrewOutput
directly from .kickoff()
, I only get results from the LAST task executed (generate_meta_task
in this example). The outputs from previous tasks (generate_structure_task
) are empty or not available as expected.
When running:
result = StructureCrew().crew().kickoff(inputs=inputs)
print(result["generate_structure_task"]) # ❌ KeyError or None
print(result["generate_meta_task"]) # ✅ Only this is available
Results:
KeyError: 'generate_structure_task' not found in CrewOutput.
Even if setting task context clearly, intermediate task results seem unavailable at the final step.
What have I already tried clearly and exactly?:
- Ensured to explicitly set
full_output=True
in the Crew as per the CrewAI documentation:
Introduction - CrewAI - Explicitly did set context correctly between tasks (
context=[...]
). - Verified tasks execution in script clearly as well as YAML definition explicitly using Pydantic models correctly.
However, the problem of accessing intermediate tasks outputs remains:
- Final task output alone is accessible (e.g., meta), but not earlier tasks (e.g., structure).
My clear questions for CrewAI community members clearly:
- Is my current flow architecture (multiple small specific Crews aggregated by a “parent” Crew/Flow) the recommended CrewAI way for complex multi-step use-cases?
- If so, how exactly do you retrieve the results of several intermediate tasks reliably? Should I rather create one Crew per very specific task instead?
- Does CrewAI support (or not) implicit aggregation of outputs from intermediate tasks clearly defined with
full_output=True
?
If someone sees the precise error I’m making, please clearly point it out.