Name the three first-class primitives in a CrewAI Crew object and what each represents
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
CrewAI is a Python multi-agent framework whose three load-bearing fields on every Agent, role, goal, backstory, compile into the system prompt; a Crew runs Agents under a Sequential or Hierarchical Process.
Picture how a small company onboards a new hire. They write a job title (Customer Support Lead), a top-line goal (cut response time in half), and a one-paragraph back-story (you spent five years at a help-desk and you care about clarity). With those three things on a sticky note, a new colleague can roughly imagine how this person thinks and what they would prioritise. CrewAI does exactly that for software agents: you fill in those same three sticky-note fields for each agent, group them into a team, and tell the team whether to work in a line or under a manager.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 minutes: the three Agent fields as a compiled system prompt, the Agent/Task/Crew trio, Sequential vs Hierarchical Process, and when to reach for LangGraph instead.
from crewai import Agent, Task, Crew, Process
researcher = Agent(
role="Senior Research Analyst",
goal="Surface 3 cited primary sources on a given topic",
backstory="You spent 8 years as a librarian and you cite precisely.",
tools=[search_tool],
llm="claude-sonnet-4-6",
)
writer = Agent(
role="Technical Writer",
goal="Turn research into a 200-word summary that a busy PM can scan",
backstory="You write for engineering blogs; you hate filler.",
llm="claude-sonnet-4-6",
)
brief = Task(description="Summarise OpenTelemetry GenAI conventions.",
expected_output="200 words plus 3 citation URLs.",
agent=writer, context=[
Task(description="Find 3 primary sources.", expected_output="3 URLs", agent=researcher)
])
Crew(agents=[researcher, writer], tasks=[brief],
process=Process.sequential).kickoff()| Aspect | CrewAI | AutoGen | LangGraph |
|---|---|---|---|
| Agent definition | role / goal / backstory | AssistantAgent + system message | Node functions over a typed State |
| Orchestration unit | Crew + Process | GroupChat + Manager | StateGraph with edges |
| Durable state | Not first-class | Not first-class | Checkpointer (first-class) |
| Time-travel / HITL | Limited | Limited | First-class |
| Strength | Fastest to prototype | Conversation-shaped tasks | Production-shaped orchestration |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating role/goal/backstory as cosmetic strings instead of the system prompt itself. Vague fields mean a vague prompt, and the agent reasons accordingly.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.