Zenaique

Name the three first class primitives in a CrewAI Crew object and what each represents

Flashcard·Easy·4.0 · 0·~30s·Asked atCognizantContextual AiKore Ai
Attempt it
TL;DR

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.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

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.

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.

Task: the unit of work, with an expected_output contract
Crew + Process: Sequential or Hierarchical
Where CrewAI legitimately wins (and where it does not)
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
python
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()
AspectCrewAIAutoGenLangGraph
Agent definitionrole / goal / backstoryAssistantAgent + system messageNode functions over a typed State
Orchestration unitCrew + ProcessGroupChat + ManagerStateGraph with edges
Durable stateNot first-classNot first-classCheckpointer (first-class)
Time-travel / HITLLimitedLimitedFirst-class
StrengthFastest to prototypeConversation-shaped tasksProduction-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.
Sign in to see more production examples.

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?
A

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.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Treating role/goal/backstory as cosmetic strings instead of the system prompt itself. Vague fields mean a vague prompt, and the agent reasons accordingly.

Sign in to see all red flags and common mistakes.

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

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Design a sensible migration…
Short answer·Hard