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 concept | How the recipe does it | Recipe |
|---|---|---|
| Agent: role, goal, backstory, model | A map from agent(role, goal); the role and goal become the system prompt | sequential-crew |
| Task: description, expected output, context | A map in a list; the previous output is passed in the prompt | sequential-crew |
| Crew with the sequential process | A for loop over the task list | sequential-crew |
| Hierarchical process with a manager | The manager returns JSON naming the next worker; the script enforces the worker list and a round limit | hierarchical-manager |
| Delegation between agents | The manager assigns a task; the script runs the named worker and reports the result back | hierarchical-manager |
| Flow router | A validated label chooses the next agent | triage-router |
| Flow state and persistence | A state map written to state.json after each step | stateful-checkpoint |
| Checkpointing and resume | Finished steps are skipped on the next run in the same directory | stateful-checkpoint |
| Tools | The 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 files | tool-agent |
| Short-term memory | The session the host keeps for each agent; agent_open and a session_id resume it | tool-agent |
| Knowledge sources | Paragraphs from local files scored by question words and passed as sources | keyword-knowledge |
| Guardrails and structured output | json_validate on a JSON reply, with the errors fed back for a retry | fan-out-judge |
| Human input | prompt_human on a terminal, AGENTIC_APPROVE without one; the default is to reject | human-checkpoint |
| Asynchronous tasks | parallel_map with a concurrency limit; results keep input order | fan-out-judge |
| Event listeners and usage metrics | trace.jsonl with role, tokens, latency and attempts for each model call | sequential-crew |
Not covered yet
- Embedding-based memory and knowledge: the embedded agent has no embeddings call, so retrieval here is keyword scoring.
- Web search tools: the built-in webget tool fetches a known public address but does not search.
- Token streaming: agent_prompt returns the complete reply.
- Images and other files sent to the model: prompts are text only.
- Planning before acting (crewAI planning): no recipe does it yet; a plan-then-execute loop fits ask_json with a step list schema.
- Skill directories (crewAI SKILL.md packages): not mapped; the lmscript version is read_file of a skill file added to the system prompt.
- Evaluation runs and training (crewAI test, crewai train): the offline mock checks above play the role of repeatable tests; model training itself does not apply here.