Agents
An Agent is an autonomous unit in CrewAI: it performs tasks, uses tools, may delegate when allowed, and can keep memory. Think of a specialist on a team — a researcher gathers, a writer drafts.
CLI projects can use agents/<name>.jsonc. This chapter uses Python so it matches the official attribute table.
The required trio
Common optionals: tools, llm, verbose, allow_delegation, max_iter (default 20), memory, knowledge_sources.
llm may be a provider/model-id string, an LLM(...) instance, or omitted (falls back to OPENAI_MODEL_NAME / the default model). Tool-calling can use a separate function_calling_llm (a cheaper model that only picks tools).
JSONC (CLI projects)
agents/researcher.jsonc:
"agents": ["researcher"] in crew.jsonc loads that file. {topic} comes from crew-level inputs.
Other switches
Write specific roles: weak role="assistant"; strong role="Market analyst for executives; cite only verifiable sources". Make goal a completable outcome, not “do your best”.
Without a Crew: kickoff()
messages can be a string or a list of {role, content} dicts. The return type is LiteAgentOutput (raw, pydantic, usage_metrics, …). Full pipelines still belong on Task + Crew.
vs LangChain agents
LangChain’s create_agent is a single-loop harness (model + tools + middleware). CrewAI’s Agent is a role card; real multi-role work happens on a Crew. Use LangGraph when you need graph checkpoints; use CrewAI when you need role-play teams. See LangChain.