Skip to content

Lesson 5 of 7 · 3 min read

CrewAI: Crews and Flows

CrewAI (crewai on PyPI, MIT; 1.15.44 in November 2026) models agents with a role, goal and backstory, and tasks with a description, expected output, assigned agent, context from earlier tasks, tools, guardrails and structured output. A Crew runs tasks with a sequential or hierarchical process, where a manager assigns work. Flows are event-driven workflows: methods decorated with start, listen and router, combined with or_ and and_, sharing unstructured or Pydantic-typed state. The persist decorator saves flow state (SQLite by default), a flow can resume by id or fork from a saved state, and tasks or flow steps can ask a person for feedback.

Premium lessonReviewed By the AIAgentInterviews editorial teamProduct details checked · What changed
Get full Premium access · $25

All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.

6 months · One payment · No auto-renewal

Practise it as an interviewer asks it

Related lessons