Concept map

This page maps the main concepts of crewAI, a Python framework for agent crews and flows, to the recipes on this site. The recipes do not use crewAI; they show how each idea looks as plain lmscript.

crewAI conceptHow the recipe does itRecipe
Agent: role, goal, backstory, modelA map from agent(role, goal); the role and goal become the system promptsequential-crew
Task: description, expected output, contextA map in a list; the previous output is passed in the promptsequential-crew
Crew with the sequential processA for loop over the task listsequential-crew
Hierarchical process with a managerThe manager returns JSON naming the next worker; the script enforces the worker list and a round limithierarchical-manager
Delegation between agentsThe manager assigns a task; the script runs the named worker and reports the result backhierarchical-manager
Flow routerA validated label chooses the next agenttriage-router
Flow state and persistenceA state map written to state.json after each stepstateful-checkpoint
Checkpointing and resumeFinished steps are skipped on the next run in the same directorystateful-checkpoint
ToolsThe tools map of the agent spec (root, write, web): the host declares the built-in workspace tools, runs the calls and reports tool_calls and filestool-agent
Short-term memoryThe session the host keeps for each agent; agent_open and a session_id resume ittool-agent
Knowledge sourcesParagraphs from local files scored by question words and passed as sourceskeyword-knowledge
Guardrails and structured outputjson_validate on a JSON reply, with the errors fed back for a retryfan-out-judge
Human inputprompt_human on a terminal, AGENTIC_APPROVE without one; the default is to rejecthuman-checkpoint
Asynchronous tasksparallel_map with a concurrency limit; results keep input orderfan-out-judge
Event listeners and usage metricstrace.jsonl with role, tokens, latency and attempts for each model callsequential-crew

Not covered yet

Back to the recipe index