Agentic AI Notebook
CrewAI
Phase 13Module 2 of 14

CrewAI Architecture

If you only memorize decorators, you cannot debug a stuck crew. The architecture is the map: who reasons, who executes, what state is shared, and who decides the next step.

Org chart plus calendar. Agents are people. Tasks are tickets. Crew is the team. Process is standup rules. Flow is the product roadmap.

Visual Workflows

Start here — scroll inside each diagram frame to explore, then use + / to zoom up to 200% if needed.

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

The loop under an Agent

100%
Loading diagram...

Scroll inside the frame to explore · use + / − to zoom up to 200%

CrewAI organizes loops into teams and workflows. The loop itself is still reason → tool → observe.

Key Takeaways

  • 1.The building blocks are Agent, Task, Crew, Process, Flow, Tool, Memory, Knowledge, and LLM. An Agent owns a role, a goal, a backstory, tools, an LLM, and optional memory/knowledge.
  • 2.A Crew binds agents + tasks + a process. A Flow binds Python methods + state + events. Process is how the crew runs. Flow is how the application runs.
  • 3.Kickoff starts a Crew: each Task is given to its Agent; the Agent's LLM runs a tool loop until expected_output is met or max iterations fire. Hierarchical process inserts a manager who assigns work.
  • 4.A Flow is a different runtime: @start / @listen / @router methods with typed state, and a Crew is something you call inside a method.

Learn elsewhere

  • Tool Calling — Phase 7
  • Agent Memory — Phase 5

Real Example

Scenario

A research product: Flow receives the topic. State holds topic and draft. A Crew researches then writes. Flow returns the report.

What you would do

In CrewAI, apply CrewAI Architecture to this scenario: A research product: Flow receives the topic. Identify the inputs, run the technique, validate the output, and note one thing you would monitor in production.

Commands

Commands to Remember

  • Nine building blocks
  • Process ≠ Flow
  • Memory ≠ Knowledge
  • Crew kickoff vs Flow kickoff

Cheat Sheet

Quick recap

quick ref
  • Blocks first
  • Crew vs Flow runtime
  • Loop still exists
  • State lives on Flow

Common Mistakes

  • Skipping evaluation for CrewAI Architecture before production
  • No logging or tracing around crewai architecture steps
  • Ignoring cost and latency implications