Principle:CrewAIInc CrewAI Output Processing
| Knowledge Sources | |
|---|---|
| Domains | Data_Processing, Multi_Agent_Systems |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
A structured result pattern that provides multiple access formats (raw text, Pydantic model, JSON, per-task outputs) for the output of a multi-agent workflow execution.
Description
Output Processing addresses the need to consume crew execution results in different formats depending on the downstream use case. Rather than returning only raw text, the output model provides typed access to structured data (Pydantic models), JSON dictionaries, individual task outputs, and token usage metrics. This multi-format approach allows direct integration with APIs (JSON), type-safe application logic (Pydantic), logging (raw text), and cost tracking (token usage).
Usage
Use this principle when consuming the results of a crew execution. The output format depends on the output configuration of the final task: if output_pydantic was set, access .pydantic; if output_json was set, access .json_dict; raw text is always available via .raw.
Theoretical Basis
Output Processing implements the Adapter Pattern, providing multiple interfaces to the same underlying data. The crew's final task output is the source of truth, and the CrewOutput model adapts it into various formats without requiring the consumer to parse or transform the data.