CrewAI agents work when each one is a narrow specialist with its own role, goal, backstory and only the tools its job needs, and when a Flow, not the agents, owns the order of steps. Start with a sequential crew, keep delegation off on specialists, put a guardrail or a human check between the steps that matter, and cap spend before the first long run. The open-source framework already ships every one of those controls. The hard limit to design around: CrewAI stops a task on the fifth identical tool call, meaning the same tool, the same arguments and the same result, and that limit cannot be changed [1]. Loops are the costly failure.
Agent, crew or Flow: choose the smallest unit that fits
CrewAI gives you three building blocks, and the vendor's own guidance is to reach for the smallest one. CrewAI advises a single agent for one intelligent task with tools, and a crew only when the work needs complex multi-step reasoning. Its docs recommend a crew when the path to the answer is open-ended and a Flow when you control which steps run, in what order and under what conditions. For anything headed to production, the docs go further: start with a Flow and run a crew inside one of its steps.
That split matters for cost as much as for structure. The docs say a direct LLM call is more efficient than a crew when you need a single structured output, and an agent can run inside a Flow as a lighter step with a Pydantic response format. A practical reading: let plain code and direct calls handle anything deterministic, give one agent the steps that need judgment, and save the full crew for open research or drafting. Our CrewAI Flows guide covers the decorators, state and routing that hold those pieces together.
CrewAI advises a single agent with tools for one intelligent task; add a crew only when the work needs complex multi-step reasoning.
Writing agents that stay in their lane
Every agent is defined by a role, a goal, a backstory, its tools and an optional model of its own. The role and goal tell the model what it is responsible for; the backstory sets the voice and judgment it brings. Keep each one narrow enough that a reviewer could say whether its output is right. CrewAI's case study on DocuSign describes exactly this shape: an outreach Flow with Identifier, Researcher, Composer and Validator agents, where the Validator checks quality, hallucination risk and personalization before anything is delivered or passed to human review.
Tools are the second half of the design. An agent can be extended in five ways: tools, MCP servers, apps (AMP integrations such as Gmail, Slack, Jira or Salesforce), skills and knowledge. The first three become callable actions, while skills and knowledge only change the prompt and add no new actions. Give each agent the fewest tools its task needs, because every extra tool is another choice the model can get wrong. CrewAI says custom tools can wrap deterministic logic so the model does not have to compute, and a tool can be capped with max_usage_count, which is unlimited by default.
Each task also needs a description and an expected output. Its context lists the earlier tasks whose output it reads, and forward references are rejected, so the chain stays explicit. Structured output through output_pydantic or output_json keeps answers short and machine-checkable; CrewAI says those schemas enforce concise responses. One catch: if conversion fails, only the raw text is set and the structured fields come back empty, so check for that before the next step trusts them.
Sequential first, a manager only when it earns its keep
A crew runs a sequential process by default: tasks go in a fixed order and each output feeds the next. The hierarchical process must be set on purpose and needs either a manager_llm or a manager_agent. The manager plans, delegates, reviews outputs and validates completion, so tasks are no longer pre-assigned. The docs advise starting sequential and moving to hierarchical only when workflow complexity requires it [2]. That is sound advice. A manager adds model calls of its own, and its choices are harder to predict than a fixed order.
Delegation needs the most care. It is off by default today. Setting allow_delegation to true gives an agent two extra tools, one to hand work to a coworker and one to ask a coworker a question. The docs warn that agents can delegate back and forth indefinitely and recommend keeping delegation off on specialist agents [3]. In practice, only a coordinator or the manager should hold it, while every other agent does the one job written into its task and returns.
Agents with delegation turned on can pass work back and forth indefinitely; the docs advise keeping allow_delegation off on specialist agents.
Checks between steps: guardrails, structured output and people
The docs name task guardrails and structured outputs as the control primitives for validating work between tasks. Guardrails come in two kinds: a Python function, or a plain-language rule checked by an LLM, which needs the task to have an agent because it uses that agent's model. Several guardrails run in sequence, each on the previous output. When one fails, the error goes back to the agent and the task retries, up to guardrail_max_retries, which defaults to 3. Put the cheap function checks first.
Human review sits at three depths. Setting human_input on a task makes a person review the agent's final answer; it defaults to off. In a Flow, @human_feedback (CrewAI 1.8.0 or newer) pauses for review, and with emit set, an LLM maps free-form feedback to one outcome that routes the flow, such as approve, reject or revise. Execution hooks go finer still: a pre-tool hook can ask a human to approve an action such as sending an email or making a payment before it runs. Gate every outbound action.
Outside tools deserve suspicion. MCP servers can run code and reach data or systems through their tools, so the docs say to connect agents only to servers you fully trust. A malicious server can inject instructions through its tool metadata simply by being connected and listing its tools. The recommended route is the mcps field on an agent, which opens a connection only when a tool is used and skips unreachable servers with a warning, so one dead server does not sink the run.
Memory, knowledge and planning: what runs behind the scenes
Memory today is one unified Memory class that replaces the older short-term, long-term, entity and external types [4]. It works with crews, agents and Flows, stores data in LanceDB under the project folder, and ranks recall by similarity, recency and importance. Two defaults matter. Without a custom embedder it uses OpenAI embeddings, so it needs an OpenAI key even when your agents run another provider. And memory content is sent to the configured LLM for analysis, so the docs advise a local model such as Ollama for sensitive data.
Knowledge sources give agents reference material: strings, text, PDF, CSV, Excel or JSON, attached at agent or crew level. Their embeddings also default to OpenAI, and by default they are re-embedded on every kickoff, which adds latency for large sources; initializing the knowledge parameter directly avoids that. Knowledge, like skills, changes what the agent reads, not what it can do, so it never replaces a tool. Our guide to CrewAI for research teams goes deeper on retrieval and the fully local Ollama path.
Planning has two levels. Agent planning now runs through planning_config with an effort of low, medium (the default) or high, and the older reasoning switch is deprecated. Crew planning adds a plan to each task description before every iteration, and it uses the default OpenAI model unless you set planning_llm. Turn planning on where tasks are vague, not where the steps are already scripted in the task text. Each plan is another model call.
Keeping loops and token use under control
Reviewers on G2 mostly praise how quickly role-based crews come together, but their recurring complaints are token use and run time that grow fast in multi-agent workflows, and agents that loop on tools. CrewAI's answer is a set of direct spend controls: max_iter, max_execution_time and max_rpm on agents, max_tokens on tasks, and a crew-level max_rpm that overrides the agents. Since October 2026 the agent executor also sends tool results larger than a quarter of the context window to a temporary file and summarizes long conversations before they overflow.
Measure before you tune. Token usage is reported per crew, and flow.usage_metrics totals every model call across a whole Flow, crews included. The experimental crewai eval command evaluates your last traced run, so switch tracing on first; built-in tracing needs a free CrewAI AMP account and the crewai login command. It then reports the role and Flow step where it failed, writes a markdown brief meant for a coding agent, and can swap models per role to compare quality, cost and speed. The crewai test command scores a crew over several runs, though the docs say OpenAI is its only testing provider for now.
The experimental crewai eval command evaluates the last traced run and names the role and Flow step where it failed; turn tracing on first, which needs a free AMP account and crewai login.
On CrewAI AMP (Agent Management Platform), Cost Limit policies in the Agent Control Plane watch spend per automation against a daily, weekly or monthly budget, but they only email recipients and never pause, throttle or stop a run. Treat them as an alarm. The hard stops live in your agent settings. AMP's free Basic plan includes 50 workflow executions a month, by our arithmetic about 1.7 a day on a 30-day month, with no additional executions on Basic, so iterate on loops locally before you deploy.
Frequently asked questions
Can one crew mix models from different providers?+
Yes. The docs recommend different models for different agents in one crew, with a separate manager_llm for hierarchical crews; agents inherit the crew's model unless you override it.
Can a CrewAI agent run without a crew?+
Yes. An agent can run alone through kickoff(), which returns the raw text, optional Pydantic output, the agent's role and token usage; kickoff_async() is the async version.
Can a failed crew resume where it stopped?+
Checkpointing, added in April 2026, saves crew, flow or agent state, by default once per finished task, so a run can resume after a failure or be forked. The crewai checkpoint command opens a terminal view to browse, resume and fork checkpoints.
Does CrewAI depend on LangChain?+
No. The crewai package does not depend on LangChain or other agent frameworks, though agents can still use wrapped LangChain and LlamaIndex tools.
What a dependable first crew looks like
Picture the smallest version that works: a Flow that collects inputs in code, one sequential crew of two or three narrow agents with delegation off, a function guardrail on the draft, a human approval before anything is sent, and spend caps on every agent. Run it locally with tracing on until crewai eval stops pointing at the same step, then add a manager, memory or planning only when a measured gap calls for it. The CrewAI examples show these patterns in starter crews and flows worth reading before you write your own.
- [1] CrewAI documentation: Agents (2026-11) https://docs.crewai.com/en/concepts/agents
- [2] CrewAI documentation: Crafting Effective Agents (2026-11) https://docs.crewai.com/en/guides/agents/crafting-effective-agents
- [3] CrewAI documentation: Collaboration (2026-11) https://docs.crewai.com/en/concepts/collaboration
- [4] CrewAI documentation: Memory (2026-11) https://docs.crewai.com/en/concepts/memory
All 8 sources we used for this article
- 1. CrewAI documentation: Agents (2026-11) https://docs.crewai.com/en/concepts/agents
- 2. CrewAI documentation: Crafting Effective Agents (2026-11) https://docs.crewai.com/en/guides/agents/crafting-effective-agents
- 3. CrewAI documentation: Collaboration (2026-11) https://docs.crewai.com/en/concepts/collaboration
- 4. CrewAI documentation: Memory (2026-11) https://docs.crewai.com/en/concepts/memory
- 5. CrewAI pricing https://crewai.com/pricing
- 6. CrewAI documentation: Installation https://docs.crewai.com/en/installation
- 7. CrewAI Terms of Use https://crewai.com/terms-of-use
- 8. AWS Marketplace: CrewAI Enterprise Platform reviews (from G2) https://aws.amazon.com/marketplace/reviews/reviews-list/prodview-2lisdk6meykru