Name the three first class primitives in a CrewAI Crew object and what each represents
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.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
CrewAI sits in the part of the 2026 framework landscape that prizes ergonomics over orchestration depth. Its core bet is that most multi-agent systems are easier to design and ship when you describe each agent the way you would describe a hire, a job title, a goal, a one-paragraph backstory, and then let the framework do the prompt-compilation work for you.
This deep dive covers the three primitives that carry the framework, how they compile into runtime behaviour, the two Process modes, and where CrewAI legitimately wins versus where you should reach for something else.
Agent: role + goal + backstory IS the system prompt
Every CrewAI Agent is constructed with three load-bearing string fields plus a couple of structural ones.
role. The agent's job title or identity. 'Senior Research Analyst', 'Technical Writer', 'Code Reviewer'.goal. What the agent is trying to accomplish. 'Surface three cited primary sources on a given topic.'backstory. A paragraph of context shaping how the agent reasons. 'You spent eight years as a librarian and you cite precisely.'
Plus tools (callable functions the agent can invoke), llm (the underlying model), and a few execution flags.
Why the split is not cosmetic
At runtime, CrewAI joins those three fields with a deliberate template. Something like 'You are {role}. Your goal is {goal}. {backstory}'. And uses the result as the system prompt sent to the LLM. The agent's behaviour is entirely downstream of those strings.
This means vague role/goal/backstory is vague prompt code. Most CrewAI failures that look like 'the agent is confused' are actually 'the three fields are too vague to produce a useful system prompt.' Treat them as production prompts, not as documentation.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
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.
- CrewAI's own quickstart uses a Researcher + Writer crew to draft a blog post. The canonical illustration of Sequential Process.
- CrewAI Inc. raised funding in 2024 specifically around the role/goal/backstory framing as a productivity layer over multi-agent orchestration.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is the role/goal/backstory split better than a single 'system prompt' string?
Three labelled slots force the author to separate identity from objective from context, which produces tighter prompts and clearer crew designs. The compiler joins them with a deliberate template.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases 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.
60 second bullets to scan on the way to the call.
The three Agent fields and what each compiles into
Difference between role and goal. One is a job title, the other is the target outcome
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.