« Phase 19 README · Warmup · Hitchhiker's · Deep Dive · Principal Deep Dive · Core Contributor
Phase 19 — Staff Engineer Notes: Owning a CrewAI-Based Multi-Agent Platform
Anyone can cast three agents and call kickoff — CrewAI is the best framework in the world for a
demo, and that cuts both ways. The gap between listing CrewAI on a resume and being trusted to
own a multi-agent platform is judgment about things the framework makes easy to skip: which process
each crew runs and what it costs, when a Flow beats a bigger Crew, and how much reliability, cost, and
security discipline you have to wrap around a framework that gives you none of it. This is the Citi
VP-level lane, and this doc is about that judgment and the signal that proves you have it.
The decisions a staff engineer actually owns here
Process choice is an architecture decision with a cost, not a config flag. The single most
valuable sentence you can say about CrewAI is "the process is the execution model." Sequential is a
deterministic pipeline you can test, cost, and reason about — N LLM calls, fixed order. Hierarchical
hands your control flow to another unreliable LLM and bills you N+1 manager calls for the
privilege. Neither is better; the judgment is knowing which the task actually needs and being able to
say "we used hierarchical here because sub-tasks genuinely needed runtime routing across specialists,
and here is the manager overhead we accepted." You own that call and its defense.
Crews vs Flows is the boundary you draw. A Crew is a fixed sequence; a Flow is the event graph that composes crews with branching, persistence, and human-in-the-loop. You own recognizing when a requirement ("route on a runtime value," "wait for a human," "survive a restart," "compose several crews") has outgrown a Crew and become a Flow. Trying to express branching and durability by making a Crew bigger is the most common structural mistake, and catching it is your job.
Context topology is a correctness decision. The context three-way switch (feed-forward /
fan-in / isolated) silently decides what every task sees. You own making it explicit — a summarizer
that must read three sources gets context=[a, b, c], an independent second opinion gets context=[]
— because the default feed-forward will quietly produce half-right output that passes every green
run.
The engineering CrewAI does not give you is yours to bring. The trust boundary (tool calls are
untrusted, injection-carrying text — Phase 10), the reliability math (0.95^n — Phase 00), the cost
accounting (tool loops plus the manager — Phase 14), and the observability to see a delegation trail
when a hierarchical crew misbehaves. CrewAI gives you ergonomics; you bring the engineering.
The decision framework, out loud
- Order known and non-branching →
Process.sequential. Cheap, deterministic, the default. Reach for anything else only with a reason. - Runtime routing across specialists plus reconciliation genuinely needed →
Process.hierarchical, costed. Accept theN+1manager calls, instrumenttoken_usage, and keep the hierarchical part as small as possible — often one sub-crew, not the whole system. - Branching / multiple crews / wait-on-human / durability → that is a Flow, not a bigger Crew.
- Choosing the framework itself: CrewAI when you want a role-based team stood up fast; LangGraph when you need explicit state and durable, precisely-controlled execution; AutoGen when the task really is a conversation among agents. Naming the axis — and being able to argue against CrewAI for a given task — is the seniority tell, not naming a favorite.
Code-review red flags
hierarchicalwith no costed justification. Any switch to hierarchical that does not name why runtime routing is needed and account for theN+1manager calls. Demand the reason and the token math.contextleft at the feed-forward default where a fan-in was meant. A summarizer or reconciler that should read multiple upstream tasks but has no explicitcontext=[...]. Silent wrong output.- A Crew growing branching/HITL logic. Conditional task lists, retries, or human gates bolted onto a Crew instead of lifted into a Flow. That is a Flow trying to be born.
- A
@routerexpected to pass data to its branch. It emits a label; data goes throughself.state. Any code reading a payload off a route is confused about the model. - A Flow with human-in-the-loop but no
@persist. It will lose in-flight state on a restart. - No
token_usageinstrumentation on a hierarchical crew or long tool loops. The bill is exactly where it is not being measured. - Tool calls treated as trusted because "the framework runs them." The framework executes tools; it does not secure them. Validation, allow-listing, and sandboxing are still yours.
- Chaining many autonomous steps because it is easy. Reliability compounds; the instinct is fewer, larger, verified steps with the deterministic parts hard-coded.
War stories worth carrying
- The crew whose summary was always half-right. A three-source research crew left
contextat its feed-forward default, so the summarizer read only the last source. One line —context=[src_a, src_b, src_c]— fixed it. Context is the number-one silent CrewAI bug, and it hides behind a green run. - The hierarchical bill. A team flipped a 6-task crew to hierarchical because it "coordinated
better," and the token bill jumped ~2x from uncounted
N+1manager calls plus per-task tool loops. It went back to sequential with one deliberate hierarchical sub-crew. The fix was counting, not a cheaper model. - The manager who delegated to a ghost. A hierarchical manager hallucinated a worker role that did not exist and the crew silently produced nothing useful. Delegation to an unknown worker must be a hard, visible error, not a no-op.
- The "one giant agent" refund bot. Rebuilt as a sequential Crew (triage → draft → review) inside a
Flow with a
@routeron the refund amount and a@persisted human-approval gate. Cheaper, auditable, and it survived restarts. Flows earn their keep exactly there.
The interview / architecture-review signal
What a reviewer listens for: do you reason about CrewAI from the mechanism or the marketing? Can
you walk through what kickoff does under the sequential process and say why it is deterministic given
the model? Can you state the N+1 manager-call cost of hierarchical and when it is worth paying? Can
you draw "Crews are the sequences, a Flow is the conductor" on a whiteboard and place a @router
branch, an and_ fan-in, and a @persist gate? Can you name the three context modes and the
classic silent bug? And — the strongest signal — can you say, in one sentence each, when you would
reach for CrewAI vs LangGraph vs AutoGen, and when you would not use CrewAI at all? The market has a
lot of CrewAI on resumes because it is easy; the name alone is table stakes. The person who reasons
about process cost, the Crews/Flows boundary, and the engineering the framework does not give you is
who a bank pays to own the platform.
Closing takeaways
- The process is the execution model. Defend the process choice, with its LLM-call cost, in the design review — it is not a footnote.
- Hierarchical is not the "smart" upgrade. It is more autonomy, more cost (
N+1manager calls), and a second unreliable LLM in your control flow. Sequential is the right default. - Crews are sequences; Flows are the event graph that composes them. When a requirement branches, waits, or persists, lift it into a Flow.
- Context topology is a correctness decision. Set
contextexplicitly; the feed-forward default silently ships half-right output. - The framework gives ergonomics, not engineering. Bring the trust boundary, the
0.95^nreliability instinct, the cost accounting, and the observability yourself — that discipline is the staff signal.