crewAI · Architecture

CrewAI: how the system is designed

Created · run_mwili5cqb9d827bd28eabbb3 · github.com/crewAIInc/crewAI @ main · commit 2817a951f308 · model claude-opus-5-5

How the CrewAI monorepo is built: six Python packages that let a developer define agents, tasks, crews and flows, run them against LLM providers and tools, and optionally deploy them to the CrewAI AMP platform.

6workspace packages
58CLI commands
9local stores
76hosts called from code
150env vars the evidence counted

1. What the system is

CrewAI is an open-source Python framework for building teams of AI assistants that work together on a job. A developer describes a few agents (each with a role, a goal and the tools it may use), the tasks they must complete, and how they cooperate: as a crew that works through the tasks in order or under a manager, or as a flow that strings steps, crews and human approvals into a longer process. CrewAI then runs that team inside the developer's own program, sending each agent's thinking to a large language model and letting it call search engines, scrapers, databases and other services on the way. It is a library and a command-line tool, not a hosted service: nothing in this repository runs on a server of its own, and the optional hosted side, the CrewAI AMP platform, lives outside it.

The repository is a uv workspace of six packages, all at version 1.15.41: crewai, crewai-core, crewai-tools, crewai-files, crewai-cli and crewai-devtools. The crewai package holds agents, tasks, crews, flows, memory, knowledge and the LLM layer; crewai-core holds what the library and the command line share (authentication, settings, the platform client, telemetry); crewai-tools ships 84 tool directories; crewai-files handles files passed to models; crewai-cli is the crewai command, whose console script points at crewai_cli.cli:crewai and is declared by both the crewai and crewai-cli packages; crewai-devtools is the maintainers' release tooling. Supported Python is >=3.10,<3.14, and the product ships as PyPI packages.

Actors

ActorWho or what it isHow it meets the system
The developerThe engineer building an AI application on CrewAI.Imports the library into their own code, and uses the crewai command to scaffold, run, train, test and deploy a project. The only actor who runs this repository's code directly.
The end user of the developer's appWhoever the developer built the application for.Never touches CrewAI directly; their requests arrive as the inputs a crew or flow is kicked off with, and their answers to a paused flow come back as human feedback.
The LLM providerThe model service that does the reasoning: seven native provider packages (anthropic, azure, bedrock, gemini, openai, openai_compatible, snowflake), with LiteLLM as an optional extra pinned >=1.105.3,<1.105.4 for the rest.Called over the network on every agent step with the developer's own API key, read from the environment.
Third-party tool APIsSearch, scraping, browser, database and SaaS services the 84 tools wrap, plus MCP servers and remote A2A agents.Called by an agent when it decides to use a tool, again with keys the developer supplies.
CrewAI AMPThe CrewAI platform at https://app.crewai.com by default, operated outside this repository.Optional. The CLI logs in to it with the OAuth2 device flow, deploys crews to it, publishes tools and skills to it, and sends execution traces to it when tracing is enabled. Anonymous telemetry, on by default, goes separately to https://telemetry.crewai.com:4319.
MaintainersThe CrewAI team releasing the packages.Use the five crewai-devtools console scripts and 19 GitHub Actions workflows to test, version and publish to PyPI.

What the system is for, in one line: to let a developer turn "a few specialised assistants working through a job together" into ordinary Python that runs where their application runs, with the hosted platform as an optional place to deploy and watch it.

Engineering standards

Engineering standards: 7/10, Good

Good, at the low end. Standards are enforced mechanically in CI (ruff lint and format checks, strict mypy with the pydantic plugin, pytest with the network blocked under random order and timeouts, pip-audit and CodeQL), with 542 test files for 985 source files and clear package boundaries. It is held back by concentration rather than sloppiness: 104 source files over 500 lines with several over 3,500, 168 functions over 100 lines, four two-way pairs between source packages in the module graph (two of them real cycles, section 4), 126 empty error handlers and 22 verified redundant items in section 17. The technical assessment gives the reasoning per criterion.

RatingScaleScore
Engineering standards7/10 Good
Security7/10 Good
Configuration and secrets6/10 Fair
Data and persistence6/10 Fair
Error handling and resilience7/10 Good
Availability and recovery5/10 Fair
Performance and scale6/10 Fair
Each rating is reasoned in the section it names; 6 or below is carried into the risk register.

2. Business process

The process CrewAI exists to serve is a developer's journey from an idea ("a researcher and a writer who produce a weekly market brief") to a running, improving AI team, and optionally to a hosted deployment. The steps below are the ones a developer would recognise from the documentation and the crewai command, in the order they are usually taken. Steps 1 to 5 are local; steps 6 and 7 involve the CrewAI AMP platform and are optional.

  1. Scaffold a project. The developer asks for a new crew, flow, standalone agent, tool, skill or template and names it. The command picks a model provider, asks for its key and writes a ready-to-run project folder.crewai create crew | flow | agent | tool | skill | template
  2. Define agents and tasks. The developer describes each agent (role, goal, backstory, tools) and each task (what to do, what a good answer looks like, which agent does it). A new crew project describes them in JSONC files (crew.jsonc, agent.jsonc, task.jsonc), because crewai create crew calls create_json_crew (lib/cli/src/crewai_cli/cli.py:310-317); the classic layout, produced only with --classic, uses YAML files (config/agents.yaml, config/tasks.yaml) with a Python crew class, and anything can also be written directly in Python. Flows add the order of steps, branching and points where a person must approve.lib/cli/src/crewai_cli/templates/json_crew/, templates/crew/config/
  3. Supply model keys. The developer gives the project credentials for the LLM provider and for any tool services it uses. Scaffolding saves the keys it was given to the project's .env file; the rest are set as environment variables..env in the project; provider keys such as OPENAI_API_KEY
  4. Run a crew or flow. The developer starts the team, usually with some inputs (a topic, a customer record). Agents work through their tasks, call the model and tools, and hand results to each other; a flow may pause for a person's feedback and resume later.crewai install, crewai run; or Crew.kickoff, Flow.kickoff, Agent.kickoff from the developer's own code
  5. Review outputs and memory. The developer reads the final answer and each task's output, browses what the agents remembered, and resumes a run from a saved checkpoint if it stopped part way.crewai log-tasks-outputs, crewai memory, crewai checkpoint resume
  6. Improve the crew. The developer trains the crew with human feedback over several iterations, tests it and scores the results, replays a run from a chosen task after changing something, or has the platform grade the last traced run.crewai train, crewai test, crewai replay, crewai eval
  7. Publish tools and skills. A developer who built a reusable tool or agent skill publishes it to their organisation on the platform so other projects can install it.crewai tool publish, crewai skill publish
  8. Deploy to CrewAI AMP. The developer logs in, creates a deployment for the project and pushes new versions to it; the platform then runs the crew as a hosted service with its own monitoring. That hosted side is outside this repository.crewai login, crewai deploy create, crewai deploy push

Two things follow from this shape. The library is useful on its own: a developer who never logs in still completes steps 1 to 6 (except the platform grading in crewai eval). And the platform is reached only through explicit commands, apart from anonymous telemetry, which is on by default, and trace export, which is controlled by CREWAI_TRACING_ENABLED and crewai traces enable or disable.

The commands behind each step

Each step is reached through a command of the crewai CLI, declared in lib/cli/src/crewai_cli/cli.py. The handlers named in the steps are these.

StepCommandHandlerWhereWhat it does
Scaffold a projectcrewai createcreatelib/cli/src/crewai_cli/cli.py:225Asks for the project type and name when they are missing, then scaffolds a crew, flow, agent, tool, skill or template project. For a new crew or flow in an interactive terminal it offers to start it at once in a fresh process running crewai run.
Run a crew or flowcrewai installinstalllib/cli/src/crewai_cli/cli.py:711Installs the project's dependencies with uv sync and exits with uv's status code when that fails.
Run a crew or flowcrewai runrunlib/cli/src/crewai_cli/cli.py:754Runs the crew, flow or standalone agent configured for the project in the current directory, or a definition file passed with --definition. A standalone agent opens a terminal chat unless --inputs asks for one kickoff.
Review outputs and memorycrewai log-tasks-outputslog_tasks_outputslib/cli/src/crewai_cli/cli.py:484Loads the task outputs stored from the latest crew kickoff and prints them, or says none were logged.
Review outputs and memorycrewai memorymemorylib/cli/src/crewai_cli/cli.py:613Opens a terminal interface for browsing memory scopes and recalling stored memories, with an optional storage path and embedder settings.
Review outputs and memorycrewai checkpoint resumecheckpoint_resumelib/cli/src/crewai_cli/cli.py:1593Records that a checkpoint was used and resumes the run from the named checkpoint, or the most recent one when none is named.
Improve the crewcrewai traintrainlib/cli/src/crewai_cli/cli.py:410Trains the crew for a number of iterations (5 by default), collecting human feedback into a trained-agents file (trained_agents_data.pkl by default).
Improve the crewcrewai testtestlib/cli/src/crewai_cli/cli.py:685Runs the crew several times and has an evaluating model score the results.
Improve the crewcrewai replayreplaylib/cli/src/crewai_cli/cli.py:457Re-runs the last crew execution starting from a chosen task, reusing the stored outputs of the tasks before it.
Improve the crewcrewai evaleval_commandlib/cli/src/crewai_cli/cli.py:819Has CrewAI AMP grade the project's last traced run, running the crew first when there is none or the project changed since; with --models it compares models on the project's deployment.
Publish tools and skillscrewai tool publishtool_publishlib/cli/src/crewai_cli/cli.py:1103Logs in to the tool repository and publishes the tool project in the current directory, publicly or privately.
Publish tools and skillscrewai skill publishskill_publishlib/cli/src/crewai_cli/cli.py:1155Publishes the skill in the current directory, scoped to the developer's organisation.
Deploy to CrewAI AMPcrewai loginloginlib/cli/src/crewai_cli/cli.py:914Clears the stored user settings and signs the developer in to CrewAI AMP through the OAuth2 device flow.
Deploy to CrewAI AMPcrewai deploy createdeploy_createlib/cli/src/crewai_cli/cli.py:959Creates a new deployment of the project on CrewAI AMP, validating the project first unless told to skip it.
Deploy to CrewAI AMPcrewai deploy pushdeploy_pushlib/cli/src/crewai_cli/cli.py:993Pushes the current project to an existing deployment, identified by UUID or by the project.

3. Entry points

Work enters CrewAI in six ways, and only one of them is how a production system uses it. A developer's own application imports the library and calls a kickoff method on a Crew, Flow or Agent: that is the runtime path, and it runs in the caller's process. Everything else is tooling around it: the crewai command line that scaffolds, runs, tests and deploys projects; five maintainer console scripts from crewai-devtools; eight Python scripts run by hand or by CI; nineteen GitHub Actions workflows; and the browser event listeners of the flow visualisation page that crewai flow plot generates. The inventory below has 125 rows: 58 CLI commands, 5 devtools scripts, 8 script entry points, 17 library kickoff methods, 19 workflows and 18 browser listeners.

There are no HTTP routes, queue consumers or webhook receivers in the repository. The A2A integration ships server authentication schemes and an agent card builder, but no server: an application that wants to expose an agent over A2A mounts those pieces in its own web framework. The only schedulers are GitHub Actions cron triggers (nightly, stale, build-uv-cache, vulnerability-scan).

The crewai command line

The crewai console script points at crewai_cli.cli:crewai and is declared by both the crewai and crewai-cli packages (lib/crewai/pyproject.toml lines 161 to 162, lib/cli/pyproject.toml lines 34 to 35), so installing either one puts the same command on the path. The crewai CLI has 58 invocable commands: 15 top-level commands plus 43 in 13 groups (eval, deploy, tool, skill, template, flow, triggers, org, enterprise, config, env, traces, checkpoint); eval and checkpoint also run when invoked bare. The org group is declared to run bare as well, but its body is empty, so crewai org on its own does nothing and is not counted. lib/cli/src/crewai_cli/cli.py line 1635 lets the module run as python -m crewai_cli.cli, which is how crewai create starts a run in a fresh process; it reaches the same commands. The old import path is kept as a shim: crewai.cli is a deprecated import shim that redirects crewai.cli.X to crewai_cli.X and emits a DeprecationWarning.

Most handlers are thin. Each imports its implementation lazily (the heavy modules load only when a command runs) and hands off to a command class or function in crewai_cli. The ones that run user code do it out of process: crewai run, install and related commands spawn uv run subprocesses inside the user's project (a project locked with Poetry gets poetry run instead). Commands that talk to CrewAI AMP go through the platform client and the stored login. Rows below give the command as typed, the line of the handler's def in lib/cli/src/crewai_cli/cli.py, and the handler.

crewai CLI commands 58 rows
CommandDeclared atHandlerWhat it does
crewai uvcli.py:144uvRuns any uv command in the current project with the credentials of every installed tool added to its environment. It needs a pyproject.toml and exits with uv's own code when uv fails.
crewai createcli.py:225createScaffolds a new crew, flow, agent, tool, skill or template project, prompting for the type and name when they are omitted (and refusing to prompt when CREWAI_DMN is set). At an interactive terminal it then offers to start the new crew or flow in a fresh process.
crewai versioncli.py:370versionPrints the installed crewai version, and with --tools the installed crewai-tools version.
crewai traincli.py:410trainBackfills the project id, then trains the crew for n iterations (default 5) and saves each agent's learned suggestions to a pickle (default trained_agents_data.pkl).
crewai replaycli.py:457replayRe-runs the crew from a given task id onward, reusing the stored outputs of the tasks before it, optionally with a trained-agents pickle. Errors are printed rather than raised.
crewai log-tasks-outputscli.py:484log_tasks_outputsPrints the task id, expected output and output of every task stored from the latest crew kickoff.
crewai reset-memoriescli.py:541reset_memoriesDeletes the selected stores: memory, knowledge, agent knowledge, the latest kickoff outputs, or all of them. The deprecated --long, --short and --entities flags are mapped to --memory.
crewai memorycli.py:613memoryOpens a Textual terminal UI over the LanceDB memory store (default ./.crewai/memory) to browse scopes and run recall queries with a chosen embedder.
crewai testcli.py:685testBackfills the project id, runs the crew n times (default 3) and has an evaluation model score each run.
crewai installcli.py:711installLocks and installs the project's dependencies with uv, passing any extra arguments through, and exits with uv's status when it fails so CI can key off it.
crewai runcli.py:754runRuns the crew, flow or standalone agent configured in the project's [tool.crewai] table, or a declarative flow named by --definition, with optional JSON inputs. The run happens in a subprocess inside the project's own environment.
crewai updatecli.py:898updateRewrites a Poetry project's pyproject.toml for uv and keeps the original as pyproject-old.toml. It does not upgrade CrewAI.
crewai logincli.py:914loginClears the saved user settings and signs in to CrewAI AMP through the OAuth2 device flow, storing the resulting token for later commands.
crewai logoutcli.py:929logoutDeletes the stored tokens and user settings, or with --reset returns every CLI setting to its default.
crewai chatcli.py:1276chatStarts a terminal conversation with the crew in which the chat LLM collects the crew's inputs and answers the user.
crewai eval (bare)cli.py:819eval_commandSends the project's last traced run to CrewAI AMP for grading, running and tracing the crew first when there is no current run, and exits 0 only when the goal gate passes. With --models it instead compares models on the project's deployment.
crewai eval exportcli.py:882eval_export_commandDownloads an evaluation's report, outputs, judge checks and traces into ./crewai-eval-ID/, with a .gitignore so the data is never committed.
crewai deploy createcli.py:959deploy_createBackfills the project id, runs the pre-deploy checks and creates a deployment on CrewAI AMP from the project's git remote, or from an uploaded ZIP with --zip.
crewai deploy listcli.py:971deploy_listLists the deployments the logged-in user can see on CrewAI AMP.
crewai deploy pushcli.py:993deploy_pushBackfills the project id, validates the project and redeploys it to an existing deployment (by --uuid or the project's own). AMP holds the push back while a model comparison is running unless --force is given.
crewai deploy validatecli.py:1005deploy_validateRuns the same pre-deploy checks locally without contacting the platform and exits non-zero on any blocking issue.
crewai deploy statuscli.py:1019deply_statusFetches the status of a deployment from CrewAI AMP. The handler's name is misspelt in the source; the command name is not.
crewai deploy logscli.py:1027deploy_logsFetches a deployment's logs from CrewAI AMP.
crewai deploy removecli.py:1035deploy_removeDeletes a deployment on CrewAI AMP.
crewai tool addcli.py:1048tool_addAdds tool references (a built-in tool, platform:app or custom:name) to the standalone agent project in the current directory, validating platform applications on AMP first.
crewai tool setupcli.py:1061tool_setupValidates the platform applications listed in the agent definition on AMP and saves the Enterprise Action Auth Token to the project's .env.
crewai tool createcli.py:1074tool_createDeprecated alias of crewai create tool: warns, then scaffolds a custom tool project.
crewai tool installcli.py:1085tool_installLogs in to the Tool Repository and installs a published tool by its handle into the current project.
crewai tool publishcli.py:1103tool_publishLogs in and publishes the current tool project to the Tool Repository as public or private; --force skips the git remote checks.
crewai skill createcli.py:1126skill_createDeprecated alias of crewai create skill: warns, then scaffolds an agent skill in ./skills/ or the current directory.
crewai skill installcli.py:1139skill_installDownloads a registry skill named @org/name and installs it into ./skills/ inside a project, or under ~/.crewai/skills/ outside one.
crewai skill publishcli.py:1155skill_publishPublishes the skill in the current directory, scoped to the user's organisation or --org; --force skips the git-state checks.
crewai skill listcli.py:1164skill_listLists the skills installed in the local cache.
crewai skill searchcli.py:1174skill_searchLists the organisation's skills on AMP, optionally filtered by a query.
crewai template listcli.py:1188template_listLists the available project templates and lets the user pick one to install.
crewai template addcli.py:1203template_addDeprecated alias of crewai create template: warns, then copies a named template into the current directory.
crewai flow kickoffcli.py:1218flow_runDeprecated: prints a warning and then runs the project exactly as crewai run does with no options.
crewai flow plotcli.py:1228flow_plotDraws the project's flow as the interactive HTML page, from the declarative definition when there is one and otherwise through the project's uv plot script.
crewai flow add-crewcli.py:1238flow_add_crewBackfills the project id and scaffolds a new crew inside an existing flow project.
crewai triggers listcli.py:1257triggers_listLists the triggers offered by the integrations connected to the user's organisation on AMP.
crewai triggers runcli.py:1267triggers_runFetches the sample payload of trigger app_slug/trigger_slug from AMP and runs the local crew with it.
crewai org listcli.py:1294org_listLists the organisations the logged-in user belongs to.
crewai org switchcli.py:1302switchMakes the given organisation the active one in the CLI settings.
crewai org currentcli.py:1309currentShows which organisation is currently active.
crewai enterprise configurecli.py:1322enterprise_configureBackfills the project id, fetches the OAuth2 settings published by an enterprise CrewAI AMP URL and writes them into the CLI settings.
crewai config listcli.py:1341config_listLists every CLI setting and its current value.
crewai config setcli.py:1352config_setSets one CLI setting to the given value.
crewai config resetcli.py:1361config_resetReturns every CLI setting to its default.
crewai env viewcli.py:1375env_viewPrints a table of the tracing variables (CREWAI_TRACING_ENABLED, CREWAI_TESTING, CREWAI_USER_ID, CREWAI_ORG_ID) and whether a .env file exists here.
crewai traces enablecli.py:1451traces_enableBackfills the project id and records trace consent in the user data file, so later crew and flow runs send traces to the platform.
crewai traces disablecli.py:1477traces_disableRecords that the user declined tracing; CREWAI_TRACING_ENABLED=true in the environment still overrides it.
crewai traces statuscli.py:1500traces_statusShows the environment variable, the recorded consent and whether tracing is in effect.
crewai checkpoint (bare)cli.py:1548checkpointResolves the checkpoint location (default ./.checkpoints, a directory or a SQLite file) for its subcommands, and with no subcommand opens the checkpoint terminal UI.
crewai checkpoint listcli.py:1564checkpoint_listLists the checkpoints in a directory or SQLite file.
crewai checkpoint infocli.py:1578checkpoint_infoShows the details of one checkpoint, or of the latest when given a directory.
crewai checkpoint resumecli.py:1593checkpoint_resumeResumes a run from the given checkpoint id, defaulting to the most recent.
crewai checkpoint diffcli.py:1605checkpoint_diffCompares two checkpoints side by side.
crewai checkpoint prunecli.py:1626checkpoint_pruneDeletes old checkpoints, keeping the newest N or removing those older than a duration, with a dry-run option.

Maintainer console scripts and scripts

crewai-devtools declares 5 console scripts: bump-version, tag, release, docs-check, devtools (lib/devtools/pyproject.toml lines 22 to 27). The package is private: both publishing workflows skip it. The devtools group also carries an agents-md-eval subcommand reached only through the devtools script, so it is not a console script of its own. Separately, eight Python files run as programs: seven under scripts/ and the tool spec generator in crewai-tools, which CI runs.

Devtools console scripts and script entry points 13 rows
Entry pointDeclared atHandlerWhat it does
bump-versionlib/devtools/src/crewai_devtools/cli.py:2107bumpSets a new version in every package under lib/, then commits and pushes unless told not to. It does not tag, publish or release.
taglib/devtools/src/crewai_devtools/cli.py:2223tagAfter the bump PR merges, reads the version from the packages and creates and pushes the git tag and a GitHub release with editable notes.
releaselib/devtools/src/crewai_devtools/cli.py:2348releaseRuns the whole release: a LiteLLM catalog refresh PR, the version bump PR (waiting for its merge), release notes, docs, tag and GitHub release, then the enterprise repository's release. Each phase can be skipped or resumed by flag.
docs-checklib/devtools/src/crewai_devtools/docs_check.py:352docs_checkDiffs the branch against a base ref and asks an OpenAI model which documentation the change needs. With --write it generates the English pages and their ar, ko and pt-BR translations.
devtoolslib/devtools/src/crewai_devtools/cli.py:2618mainRuns the devtools command group, which holds bump, tag, release, docs-check and agents-md-eval as subcommands.
scripts/age90_file_input_runner.pyscripts/age90_file_input_runner.py:201mainManual runner for PDF input handling: builds multimodal payloads from a PDF in fallback, payload or full kickoff mode so the result can be inspected.
scripts/docs/freeze_current_edge.pyscripts/docs/freeze_current_edge.py:42mainFreezes the current edge docs as the snapshot for a given version and registers it in docs.json; re-running for the same version does nothing.
scripts/docs/freeze_historical_versions.pyscripts/docs/freeze_historical_versions.py:160mainExtracts the docs as they were at each listed release tag from git and writes them under docs/v<tag>/, skipping tags already frozen unless --force.
scripts/docs/prefix_version_paths.pyscripts/docs/prefix_version_paths.py:396mainOne-time migration of docs.json to directory-based versions: points each version at its snapshot, adds the Edge entry and writes redirects for the canonical URLs.
scripts/jev_evaluation_runner.pyscripts/jev_evaluation_runner.py:573mainScores a recorded dataset of routing and guardrail decisions offline against confidence thresholds and prints the report as JSON.
scripts/update_litellm_catalog.pyscripts/update_litellm_catalog.py:26mainRefreshes the checked-in LiteLLM model catalog by hand; release runs the same update in its own PR.
scripts/wharf_runner.pyscripts/wharf_runner.py:230mainExercises SDK tracing end to end: runs one or more flows of three standalone agents that search and scrape through Firecrawl's hosted MCP server, printing each run's execution and trace ids.
generate_tool_specs.pylib/crewai-tools/src/crewai_tools/generate_tool_specs.py:194ToolSpecExtractor.extract_all_toolsWalks every exported tool class and builds its name, description, argument schema and required environment variables; the script then writes the result to tool.specs.json.

The library: kickoff methods

These seventeen public methods are where an application hands work to CrewAI. Each family offers a synchronous call, a thread-wrapped async call and a native async call; on Flow and Agent the native one is an alias. All three classes accept a checkpoint to resume from. Flow adds Flow.resume and Flow.resume_async, which continue a run paused for human feedback, possibly in a later process (section 7 draws that lifecycle).

Library kickoff methods 17 rows
MethodDeclared atWhat it does
Crew.trainlib/crewai/src/crewai/crew.py:954Runs a copy of the crew n times collecting human feedback, then has an evaluator turn each agent's feedback into suggestions saved to the named pickle. On failure it clears both training files and re-raises.
Crew.kickofflib/crewai/src/crewai/crew.py:1006Executes the crew's tasks with the given inputs and files and returns a CrewOutput, or a streaming output when streaming is on. It restores from a checkpoint first when one is given.
Crew.kickoff_for_eachlib/crewai/src/crewai/crew.py:1110Runs a fresh copy of the crew once per input dictionary, one after another, and returns the outputs with usage summed across runs.
Crew.kickoff_asynclib/crewai/src/crewai/crew.py:1146Async wrapper that runs the synchronous kickoff on a worker thread, with an async stream when streaming is on.
Crew.kickoff_for_each_asynclib/crewai/src/crewai/crew.py:1200Runs the crew once per input concurrently through the thread-wrapped async kickoff and gathers the results.
Crew.akickofflib/crewai/src/crewai/crew.py:1226Native async kickoff: task execution, memory and knowledge queries all use async and await instead of a worker thread.
Crew.akickoff_for_eachlib/crewai/src/crewai/crew.py:1329Runs the native async kickoff once per input concurrently and gathers the results, or one merged stream when streaming.
Crew.replaylib/crewai/src/crewai/crew.py:2118Loads the stored outputs of the last kickoff and re-executes the crew from the given task onward, reusing the earlier outputs as context. It raises when the task id is not among the stored outputs.
Crew.testlib/crewai/src/crewai/crew.py:2353Runs a copy of the crew n times while an evaluator LLM scores every task, then prints the score table.
Flow.resumelib/crewai/src/crewai/flow/runtime/__init__.py:1349Synchronous entry that continues a flow paused for human feedback by running the async resume in a new event loop. It refuses to run inside a running loop.
Flow.resume_asynclib/crewai/src/crewai/flow/runtime/__init__.py:1402Applies the human's feedback to the pending step (collapsing it to an outcome with an LLM when outcomes are declared), stores it and fires the downstream listeners. It returns the final output, or a new pending marker at the next feedback point.
Flow.kickofflib/crewai/src/crewai/flow/runtime/__init__.py:2118Synchronous entry that runs the async kickoff in a new event loop, or on a one-thread pool when a loop is already running. It also handles checkpoint restore and streaming.
Flow.kickoff_asynclib/crewai/src/crewai/flow/runtime/__init__.py:2183Restores persisted state when an id or source state is given, applies the inputs, emits the flow started event, runs every start method and its listeners, and returns the last method's output.
Flow.akickofflib/crewai/src/crewai/flow/runtime/__init__.py:2771Alias that calls the async kickoff with the same arguments.
Agent.kickofflib/crewai/src/crewai/agent/core.py:1952Runs one agent on its own, without a crew, on a message or message list with optional tools, structured output and files. Inside a running flow it returns a coroutine for the flow to await.
Agent.kickoff_asynclib/crewai/src/crewai/agent/core.py:2344Native async form of the standalone run: prepares the executor, emits the started event, runs the reasoning loop and builds the agent output.
Agent.akickofflib/crewai/src/crewai/agent/core.py:2429Alias that calls the async standalone run with the same arguments.

GitHub Actions workflows

The repository has 19 GitHub Actions workflows. They are entry points in the sense that a GitHub event starts work: pull requests start the checks, a push to main refreshes caches, cron starts the nightly build and housekeeping, and a maintainer starts a release by hand through publish.yml. CI runs ruff check, ruff format --check, mypy (strict, pydantic plugin) over lib/, pytest with --block-network --timeout=60 under xdist and pytest-randomly, pip-audit and CodeQL. The rows here say what starts each one; section 10 places the workflows in the deployment topology and is where their part in testing and release is described.

Workflows by trigger 19 rows
WorkflowTrigger atTriggerWhat it does
agents-md-eval.yml.github/workflows/agents-md-eval.yml:9pull_request_target to main touching the template AGENTS.md or CLAUDE.mdAsks four coding-agent models what the scaffolded AGENTS.md teaches, with the base and the PR versions, and fails on a drop of more than 10%. It runs base-branch code only and skips forks, because it spends API keys.
agents-md.yml.github/workflows/agents-md.yml:7pull_request to main touching templates, the eval or linked docsRuns the AGENTS.md guard tests and the eval's own tests, which the main test workflow skips.
build-uv-cache.yml.github/workflows/build-uv-cache.yml:3push to main changing uv.lock or pyproject.toml; cron every 5 days; manualInstalls every dependency group for Python 3.10 to 3.13 and saves the uv cache the other workflows restore.
close-associated-prs.yml.github/workflows/close-associated-prs.yml:3issues closedWhen someone with triage rights or higher closes an issue as completed, closes the open pull requests in this repository linked to it.
codeql.yml.github/workflows/codeql.yml:14push and pull_request to main, ignoring templatesRuns CodeQL static analysis.
docs-broken-links.yml.github/workflows/docs-broken-links.yml:3pull_request or push to main touching docs/; manualPrunes all but the edge and default doc versions and runs the Mintlify broken-link check.
first-contributor-welcome.yml.github/workflows/first-contributor-welcome.yml:3pull_request_target closedPosts a thank-you comment with share links on a first-time contributor's merged pull request, once.
ftc-require-issue.yml.github/workflows/ftc-require-issue.yml:3pull_request_target opened, edited or reopenedCloses a first-time contributor's pull request that names no open issue, with a comment and a needs-issue label; authors with write access are exempt.
generate-tool-specs.yml.github/workflows/generate-tool-specs.yml:3pull_request to main touching crewai_tools; manualRuns generate_tool_specs.py and commits a changed tool.specs.json back to the branch with a GitHub App token.
linter.yml.github/workflows/linter.yml:3pull_requestRuns ruff check and ruff format --check over lib/ when code changed.
nightly.yml.github/workflows/nightly.yml:3cron daily 06:00 UTC; manualWhen main has commits from the last 25 hours, stamps a .devYYYYMMDD version on every package, builds them and publishes all but crewai-devtools to PyPI.
pr-size.yml.github/workflows/pr-size.yml:3pull_request opened, synchronized or reopenedLabels the pull request by the size of its diff.
pr-title.yml.github/workflows/pr-title.yml:3pull_request opened, edited, synchronized or reopenedChecks that the pull request title is a semantic (conventional commit) title. The step runs with continue-on-error, so a bad title is reported but does not fail the workflow.
publish.yml.github/workflows/publish.yml:3workflow_dispatch with an optional release_tagBuilds every package at the tag, publishes all but crewai-devtools to PyPI with the PyPI token, and posts the release notes to Slack.
stale.yml.github/workflows/stale.yml:8cron daily 12:10 UTC; manualMarks issues stale after 30 days and closes them 5 days later; marks pull requests stale after 45 days without closing them.
tests.yml.github/workflows/tests.yml:3pull_requestRuns the crewai, tools, and CLI, core and files suites in eight duration-balanced groups per Python version with the network blocked and a 60 second timeout.
type-checker.yml.github/workflows/type-checker.yml:3pull_requestRuns mypy over lib/ for each Python version when code changed.
update-test-durations.yml.github/workflows/update-test-durations.yml:3push to main touching tests/**/*.py; manualRuns the whole suite per Python version and caches the timings that tests.yml uses to balance its groups.
vulnerability-scan.yml.github/workflows/vulnerability-scan.yml:3pull_request; push to main; cron Mondays 09:00 UTCRuns pip-audit over the installed dependencies and publishes the report as an artifact and job summary.

Browser listeners in the flow visualisation

crewai flow plot writes an HTML page that loads lib/crewai/src/crewai/flow/visualization/assets/interactive.js. Its event listeners are the entry points of that page: a click or key press in the browser starts work there, with no server behind it. The file has 19 matching lines; the one at line 2325 (an export-json button) is commented out, which leaves 18 live listeners. Each row names the method that registers the listener; the "What it does" column describes the listener that row adds. Two of them (the PNG and PDF exports) fetch scripts from cdnjs.cloudflare.com at click time, which section 12 lists.

interactive.js listeners 18 rows
Event and elementDeclared atRegistered byWhat it does
resize on windowinteractive.js:649setupCanvasResizes the highlight canvas to the new window size.
click on drawer overlayinteractive.js:1400setupEventListenersCloses the node details drawer.
click on drawer close buttoninteractive.js:1401setupEventListenersCloses the node details drawer.
keydown on documentinteractive.js:1403setupEventListenersCloses the drawer when the key is Escape.
click on a code copy buttoninteractive.js:1804attachContentEventListenersCopies the method's source to the clipboard and marks the button as copied for two seconds.
click on an accordion headerinteractive.js:1819attachContentEventListenersExpands or collapses that section of the drawer.
click on a triggered-by linkinteractive.js:1829attachContentEventListenersHighlights the node that triggers this method.
click on a trigger groupinteractive.js:1841attachContentEventListenersHighlights every node in the group of triggers listed on the element.
click on a condition groupinteractive.js:1854attachContentEventListenersHighlights the trigger nodes of an AND or OR condition.
click on a router event linkinteractive.js:1866attachContentEventListenersHighlights the path a router takes for that event.
click on the router events titleinteractive.js:1878attachContentEventListenersHighlights every path out of the router.
change on the IDE selectorinteractive.js:2251setupControlsSaves the preferred IDE for open-in-IDE links to local storage.
click on zoom ininteractive.js:2255setupControlsZooms the graph in by 20% with a short animation.
click on zoom outinteractive.js:2263setupControlsZooms the graph out by 20% with a short animation.
click on fitinteractive.js:2271setupControlsFits the whole graph into the space left beside the legend and drawer.
click on export PNGinteractive.js:2279setupExportControlsLoads html2canvas 1.4.1 from cdnjs, renders the graph and downloads it as flow.png.
click on export PDFinteractive.js:2296setupExportControlsLoads html2canvas 1.4.1 and jspdf 2.5.1 from cdnjs, renders the graph and downloads it as flow.pdf.
click on the theme toggleinteractive.js:2460setupThemeSwitches between light and dark themes, saves the choice to local storage and recolours the edges.

What the evidence matched and this inventory leaves out

The evidence's entry-point search returned 114 matches across 37 files. Two groups of them are in the inventory above: the 18 live listeners, and the 8 script entry points (each of the seven files under scripts/ matched twice, once for its main function and once for its __main__ block). The remaining matches are not entry points of this system: cli.py line 1635 and the devtools cli.py lines 2618 and 2623 are already counted as the CLI and devtools rows; the @task decorators and the __main__ block under crewai_cli/templates/ belong to projects that crewai create generates, not to this repository; triggers/main.py lines 82 to 98 are dictionary lookups on a variable called app (app.get calls); and the rest are recorded HTTP cassettes, tool READMEs, docstring examples in the ChromaDB client, items in the devtools AGENTS.md eval data, and test files (including the commented-out export-json listener above). The library entry points, the console scripts and the CLI commands were taken from the source and the pyproject files rather than from that search, which does not look for them.

4. Module boundaries

A filesystem has no modules, so the boundaries here are drawn by path prefix from the call and import graph, using the grouping rule modules.cjs prints on its second line, verbatim: grouped by path prefix under ./, starting at depth 2; a group over 25 files is split one level deeper, and only children with 8+ files are promoted. It ran with its defaults (--big 25, --min-child 8), which put 1543 files into 35 module groups. The variable depth is why lib/crewai/src/crewai (552 files) sits as one row beside test directories of 8 to 89 files: the source packages have no subdirectory of their own large enough to be promoted, while the test trees split by area.

The repository is a uv workspace of six packages, all at version 1.15.41: crewai, crewai-core, crewai-tools, crewai-files, crewai-cli and crewai-devtools. Five of them appear below as a source group under lib/<package>/src, a test group (or several) under lib/<package>/tests, and a one-file group holding the package's pyproject.toml. crewai-devtools is small enough (14 files) to stay whole as lib/devtools. The library proper is lib/crewai/src/crewai, and the packages split out of it are lib/crewai-core/src/crewai_core (shared platform plumbing), lib/cli/src/crewai_cli (the command line), lib/crewai-tools/src/crewai_tools (the tool catalogue) and lib/crewai-files/src/crewai_files (file inputs and provider uploads).

Module groups

One row per group, in the order modules.cjs prints them (by file count), with what each owns. To see the files and symbols inside a group, with their callers and callees, open the symbol index and filter by path.

Module groups 35 rows
FilesModuleKindWhat it owns
552lib/crewai/src/crewaiSource packageThe framework itself: Agent, Task, Crew, Flow and the AgentExecutor, LLM providers, memory, knowledge, RAG, events and tracing, telemetry, A2A, MCP, hooks, skills, checkpoint state, plus the deprecated crewai.cli shim and re-exports of crewai_core.
268lib/crewai-tools/src/crewai_toolsSource packageThe tool catalogue (84 tool directories), MCP and enterprise adapters, the RAG adapter, AWS Bedrock toolkits and the SSRF-validating HTTP security layer.
97lib/cli/src/crewai_cliSource packageThe crewai command line: project scaffolding and templates, run, train, test, replay, deploy, tools and skills publishing, triggers, org and config commands, authentication and the Textual TUIs.
89lib/crewai/testsTestsTop-level framework tests: crews, flows, checkpoints, streaming, human feedback, multimodal input, SQLite lifecycle and project loading.
55lib/cli/testsTestsTests for crewai_cli commands: run, deploy, tools, templates, settings and the TUIs.
52lib/crewai-tools/tests/toolsTestsOne test module per tool in the crewai_tools catalogue.
43lib/crewai/tests/llmsTestsLLM provider tests (OpenAI, Anthropic, Azure, Bedrock, Gemini and the rest), mostly against recorded cassettes.
41lib/crewai/tests/utilitiesTestsTests for the shared utilities: agent helpers, converters, the event bus wiring, file handling and prompts.
36lib/crewai-files/src/crewai_filesSource packageFile inputs for agents: resolution, processing and validation, spreadsheet parsing, provider uploaders (Anthropic, Bedrock, Gemini, OpenAI) and the upload cache.
30lib/crewai-core/src/crewai_coreSource packagePlumbing shared by the library and the CLI: OAuth2 device-flow auth and providers, the token manager, CLI settings, storage paths, the PlusAPI platform client, telemetry helpers and platform app catalogues.
27lib/crewai/tests/telemetryTestsTests for anonymous telemetry spans and their opt-out switches.
25lib/crewai/tests/agentsTestsAgent and AgentExecutor tests: the reasoning loop, tool use, retries and guardrails.
23lib/crewai/tests/cliTestsCLI tests that reach crewai_core through crewai's re-export modules (and, in 8 files, import crewai_cli directly), copying lib/cli/tests (section 17). None imports the deprecated crewai.cli shim.
22lib/crewai-tools/tests/ragTestsTests for the crewai_tools RAG layer: loaders, chunkers and the adapter.
20lib/crewai/tests/ragTestsTests for the library's RAG clients and embedding configuration.
15lib/crewai/tests/memoryTestsTests for unified memory, the LanceDB store and kickoff task output storage.
15lib/crewai-files/testsTestsTests for crewai_files processing, uploaders and the upload cache.
14lib/devtoolsMaintainer toolingThe crewai-devtools package and its tests: the bump-version, tag, release, docs-check and devtools console scripts, and the LiteLLM catalogue updater.
13lib/crewai/tests/toolsTestsTests for BaseTool, tool usage and the tool result cache.
13lib/crewai/tests/mcpTestsTests for the MCP client, transports and tool resolution.
12lib/crewai/tests/skillsTestsTests for agent skills loading and use.
12lib/crewai/tests/hooksTestsTests for the before and after LLM-call and tool-call hooks.
12lib/crewai-core/testsTestsTests for crewai_core settings, auth and the platform client.
11lib/crewai/tests/experimentalTestsTests for the experimental modules (evaluation and the agent-level experiments).
10lib/crewai-tools/testsTestsTop-level crewai_tools tests: base tool, file and URL readers, safe path and safe request helpers, the MCP adapter and tool spec generation.
9lib/crewai/tests/eventsTestsTests for the event bus and event types.
9lib/cli/tests/authenticationTestsTests for CLI login: the OAuth2 device flow, providers and token storage.
8lib/crewai/tests/tracingTestsTests for execution trace batches sent to the CrewAI platform.
4scriptsScriptsStandalone runners and maintenance scripts: evaluation runners, a file-input runner and the LiteLLM catalogue update.
1(repo root)Test configurationThe workspace conftest.py shared by every test suite.
1lib/crewai-filesPackage manifestThe crewai-files pyproject.toml.
1lib/crewaiPackage manifestThe crewai pyproject.toml, which also declares the crewai console script.
1lib/cliPackage manifestThe crewai-cli pyproject.toml, which declares the same crewai console script.
1lib/crewai-corePackage manifestThe crewai-core pyproject.toml.
1lib/crewai-toolsPackage manifestThe crewai-tools pyproject.toml.

Cross-module edges

modules.cjs prints 20 cross-module edges of 89 (69 below the top 20). It also ignored 2235 edges with an end outside ./, which it describes as mostly test-to-source and a measure of coverage rather than coupling. Every one of the 20 printed edges runs from a test group to a source group, so test-to-source dominates edge weight: the heaviest edge, lib/crewai/tests into lib/crewai/src/crewai, carries 2049 calls and imports. Coupling between the source packages sits in the 69 edges below the cut, and the two-way pairs below are where it shows. The individual calls behind any edge can be traced in the symbol index.

Cross-module edges, top 20 20 rows
CountFromTo
2049lib/crewai/testslib/crewai/src/crewai
664lib/crewai/tests/agentslib/crewai/src/crewai
631lib/cli/testslib/cli/src/crewai_cli
499lib/crewai/tests/utilitieslib/crewai/src/crewai
498lib/crewai-files/testslib/crewai-files/src/crewai_files
382lib/crewai/tests/llmslib/crewai/src/crewai
334lib/crewai/tests/hookslib/crewai/src/crewai
274lib/crewai/tests/telemetrylib/crewai/src/crewai
239lib/crewai/tests/eventslib/crewai/src/crewai
225lib/crewai-tools/tests/raglib/crewai-tools/src/crewai_tools
213lib/crewai-tools/tests/toolslib/crewai-tools/src/crewai_tools
191lib/crewai/tests/skillslib/crewai/src/crewai
178lib/crewai/tests/toolslib/crewai/src/crewai
173lib/crewai-tools/testslib/crewai-tools/src/crewai_tools
160lib/crewai/tests/raglib/crewai/src/crewai
147lib/crewai/tests/clilib/crewai-core/src/crewai_core
120lib/crewai/tests/memorylib/crewai/src/crewai
98lib/cli/tests/authenticationlib/crewai-core/src/crewai_core
77lib/crewai/tests/tracinglib/crewai/src/crewai
73lib/crewai/tests/telemetrylib/crewai-core/src/crewai_core
module dependencies 73 77 98 120 147 160 173 178 191 213 225 239 274 334 382 498 499 631 664 2049 no edge drawn lib/cli 1 file lib/cli/src/crewai_cli 97 files lib/cli/tests 55 files lib/cli/tests/authentication 9 files lib/crewai 1 file lib/crewai-core 1 file lib/crewai-core/src/crewai_core 30 files lib/crewai-core/tests 12 files lib/crewai-files 1 file lib/crewai-files/src/crewai_files 36 files lib/crewai-files/tests 15 files lib/crewai-tools 1 file lib/crewai-tools/src/crewai_tools 268 files lib/crewai-tools/tests 10 files lib/crewai-tools/tests/rag 22 files lib/crewai-tools/tests/tools 52 files lib/crewai/src/crewai 552 files lib/crewai/tests 89 files lib/crewai/tests/agents 25 files lib/crewai/tests/cli 23 files lib/crewai/tests/events 9 files lib/crewai/tests/experimental 11 files lib/crewai/tests/hooks 12 files lib/crewai/tests/llms 43 files lib/crewai/tests/mcp 13 files lib/crewai/tests/memory 15 files lib/crewai/tests/rag 20 files lib/crewai/tests/skills 12 files lib/crewai/tests/telemetry 27 files lib/crewai/tests/tools 13 files lib/crewai/tests/tracing 8 files lib/crewai/tests/utilities 41 files lib/devtools 14 files scripts 4 files
Figure 1 · module dependenciesGenerated from modules.cjs, so it matches the tables in this section exactly. Columns are dependency depth: a module sits one column right of everything that calls into it. Line thickness is the number of calls and imports crossing that boundary. The 10 modules under “no edge drawn” take part in none of the edges shown, heaviest first. The accented box is the module with the most files.

The figure draws 34 of the 35 groups. The one it leaves out is (repo root), the single conftest.py.

Two-way pairs

A layered diagram cannot show a cycle, so the cycles are listed here. modules.cjs prints 11 two-way pairs, meaning the dependency runs both ways. Seven involve a test group. In those, the reverse count is small (1 to 9). The graph produced those edges by matching calls by name: a call to a generic method name on a passed-in callback is attributed to a same-named function in a test file. No source module imports a test module. Four of the two-way pairs are between source packages: crewai <-> crewai_core (60 / 3), crewai_cli <-> crewai (53 / 2), crewai_tools <-> crewai (37 / 4), crewai <-> crewai_files (25 / 12). These four matter, because the packages were split out of crewai so that each would depend on the core and not the other way round. The source shows only two of them are real: crewai_core and crewai_files never import crewai (a search for from crewai. in both returns nothing), and their reverse edges are the graph resolving the stdlib import logging to the module crewai/a2a/utils/logging.py.

One sideOther sideForward / reverseWhat the source shows
lib/crewai/testslib/crewai/src/crewai2049 / 3Test to source. The 3 reverse edges are calls inside the LLM call wrappers, the retry helper and the project wrappers, resolved by name to functions defined in test files.
lib/cli/testslib/cli/src/crewai_cli631 / 1Test to source, with one reverse name match.
lib/crewai/tests/llmslib/crewai/src/crewai382 / 2Test to source, with two reverse name matches.
lib/crewai-tools/tests/toolslib/crewai-tools/src/crewai_tools213 / 1Test to source, with one reverse name match.
lib/crewai/testslib/crewai/tests/agents63 / 2Two test trees. The edges between them are calls resolved by name to same-named helpers in the other tree.
lib/crewai/src/crewailib/crewai-core/src/crewai_core60 / 3Real one way only. crewai imports crewai_core (auth, settings, paths, PlusAPI, telemetry helpers). crewai_core contains no import of crewai. Its reverse edges are its stdlib import logging resolved by the graph to crewai/a2a/utils/logging.py, plus method names matched by name.
lib/cli/src/crewai_clilib/crewai/src/crewai53 / 2A real cycle. The CLI imports the framework to run crews and flows. The framework imports the CLI back in one place: flow/conversational_mixin.py:685-686 lazily imports the interactive prompt and the conversational flow TUI from crewai_cli.
lib/crewai-tools/src/crewai_toolslib/crewai/src/crewai37 / 4A real cycle. Tools subclass the framework's BaseTool and import its RAG and MCP types. The framework calls back into crewai_tools to build platform tools for an agent and for JSON crews, to wrap MCP servers in project/crew_base.py, and to fetch spreadsheet inputs through the SSRF-safe bounded GET.
lib/crewai/src/crewailib/crewai-files/src/crewai_files25 / 12Real one way only. crewai imports crewai_files for file inputs and uploads. crewai_files contains no import of crewai. Its 12 reverse edges come from its own stdlib import logging lines, which the graph resolves to crewai/a2a/utils/logging.py.
lib/crewai/testslib/cli/tests23 / 9Calls resolved by name across the two suites, for example a CLI test's agent factory matched to a helper of the same name in a crew thread-safety test. Not shared fixtures. (The overlap between lib/crewai/tests/cli and lib/cli/tests is a separate matter, covered in section 17.)
lib/crewai/tests/agentslib/crewai/tests/tools2 / 1One tool-failure test call resolved by name to a recording LLM class in an agent test, and the reverse.

So the two genuine cycles between packages are crewai with crewai_cli and crewai with crewai_tools. In both, the dependency back into crewai is a lazy import inside a function, which avoids an import-time cycle but still means neither package can be installed and used without the other.

5. Layered call graph

This is the backbone of a run, taken from graphdata.json and checked against the source. A crew run goes down six layers: CLI, Crew, Task, Agent, Executor, LLM. The Flow runtime is drawn beside them because it is not a separate path. AgentExecutor is itself a Flow (class AgentExecutor(Flow[AgentExecutorState], BaseAgentExecutor)), and its reasoning loop is a set of @start, @listen and @router methods, so every agent turn runs on the same machinery as a user's flow.

Solid edges are in the graph. Dashed edges are calls that are in the source but that the graph does not resolve, because they are calls on another object rather than on self. Each dashed edge was found by reading the source:

The step from run_crew in run_crew.py down to kickoff on Crew is not an edge at all. crewai run, install and related commands spawn uv run subprocesses inside the user's project, and the project's own entry point calls kickoff there. That process boundary is drawn in section 6.

CLI Crew Task Agent Executor LLM run() crewai_cli/cli.py:754 run_crew() crewai_cli/cli.py:54 run_crew() crewai_cli/run_crew.py:1137 spawns uv run in the user's project: a process boundary (section 6) Crew.kickoff() crew.py:1006 prepare_kickoff() crews/utils.py:243 _run_sequential_process() crew.py:1533 _run_hierarchical_process() crew.py:1537 _execute_tasks() crew.py:1586 _process_task_result() crew.py:1906 execute_sync() task.py:626 _execute_core() task.py:850 _invoke_guardrail_function() task.py:1425 execute_task() agent/core.py:1003 _execute_task() agent/core.py:1031 _execute_with_timeout() agent/core.py:1090 _execute_without_timeout() agent/core.py:1130 invoke() agent_executor.py:3132 invoke_async() agent_executor.py:3229 call_llm_and_parse() agent_executor.py:1643 a @router step of AgentExecutor, dispatched by the Flow runtime on the right get_llm_response() utilities/agent_utils.py:713 _call_llm_retrying_empty() utilities/agent_utils.py:529 enforce_rpm_limit() utilities/agent_utils.py:463 BaseLLM.call() llms/base_llm.py:541 abstract; implemented by the seven native providers and the LiteLLM path Flow runtime Flow.kickoff() runtime/__init__.py:2118 _run_flow() runtime/__init__.py:2164 Flow.kickoff_async() runtime/__init__.py:2183 _execute_start_method() runtime/__init__.py:2837 _execute_method() runtime/__init__.py:2927 default_flow_persistence() persistence/factory.py:48 _execute_listeners() runtime/__init__.py:3171 listeners re-enter start methods when a router triggers one, which is how the agent loop cycles edge present in graphdata.json found in source, not resolved by the graph entry point abstract method
Figure 2 · layered call graphOne crewai run, layer by layer, with the Flow runtime alongside. The dashed edge from the executor into the Flow column is the one the source cannot show at a glance: the agent's reasoning loop is a Flow, so an agent turn re-enters the same dispatch code that runs a user's flow. Line numbers are where each function is defined.

Two more calls in the source loop back up the layers without new functions. When a guardrail rejects an output, _invoke_guardrail_function calls execute_task on the agent again (task.py:1508). And _execute_with_timeout runs _execute_without_timeout on a worker thread, so a timed task reaches invoke by the same route as an untimed one. A synchronous invoke outside an event loop calls the executor's own Flow kickoff, and inside a loop it hands back the invoke_async coroutine, so both entry points end in the Flow column.

Functions drawn

Every function in Figure 2, one row each, in the order the figure draws them.

Functions in the layered call graph 30 rows
FunctionOwnerWhereLayerWhat it does
runcrewai_clilib/cli/src/crewai_cli/cli.py:754CLIThe click handler for crewai run. It rejects a trained-agents file combined with a flow definition, then passes the file, definition and inputs to run_crew.
run_crewcrewai_clilib/cli/src/crewai_cli/cli.py:54CLIA thin wrapper that imports the real run_crew from the crewai_cli run_crew module on first use and forwards its arguments, keeping the CLI module cheap to load.
run_crewcrewai_clilib/cli/src/crewai_cli/run_crew.py:1137CLIWorks out what the project is (declarative flow, JSON crew, Python flow, agent or classic crew), asks for any missing model API key, and starts it inside the project's environment. The run itself happens in a uv run subprocess.
kickoffCrewlib/crewai/src/crewai/crew.py:1006CrewRuns the crew: resumes from a checkpoint when asked, prepares inputs and agents, runs the tasks under the sequential or hierarchical process, and returns a CrewOutput (or a streaming output). A failure emits a kickoff-failed event.
prepare_kickoffcrews/utils.pylib/crewai/src/crewai/crews/utils.py:243CrewGets a crew ready to run: before-kickoff callbacks, the start event, input interpolation into tasks and agents, task callbacks, agent setup and planning.
_run_sequential_processCrewlib/crewai/src/crewai/crew.py:1533CrewRuns the crew's tasks in their declared order by handing them all to _execute_tasks.
_run_hierarchical_processCrewlib/crewai/src/crewai/crew.py:1537CrewCreates the manager agent that delegates the work (or validates the one supplied), then runs the tasks through _execute_tasks.
_execute_tasksCrewlib/crewai/src/crewai/crew.py:1586CrewWalks the task list from the start or the replay index, runs synchronous tasks with execute_sync and collects asynchronous ones as futures, and builds the CrewOutput. Each finished synchronous task goes to _process_task_result and its execution log is stored for replay.
_process_task_resultCrewlib/crewai/src/crewai/crew.py:1906CrewWrites a completed task's output to the crew's output log file when one is configured.
execute_syncTasklib/crewai/src/crewai/task.py:626TaskRecords the start time and runs the task on the calling thread through _execute_core.
_execute_coreTasklib/crewai/src/crewai/task.py:850TaskRuns the task with its agent: emits the start event, calls the agent's execute_task, builds the TaskOutput, applies the guardrails and saves any output file. A failure emits TaskFailedEvent before the error propagates.
_invoke_guardrail_functionTasklib/crewai/src/crewai/task.py:1425TaskChecks a task output against one guardrail and, when it fails, asks the agent to redo the task, up to guardrail_max_retries more attempts. It raises when the attempts run out.
execute_taskAgentlib/crewai/src/crewai/agent/core.py:1003AgentThe public entry for an agent working one task. It opens a scope for any spreadsheet inputs and delegates to _execute_task.
_execute_taskAgentlib/crewai/src/crewai/agent/core.py:1031AgentBuilds the task prompt (knowledge retrieval, spreadsheets, tools), emits the agent-started event, and runs the executor with or without a timeout depending on max_execution_time. Errors other than a timeout go to the retry handler, bounded by max_retry_limit.
_execute_with_timeoutAgentlib/crewai/src/crewai/agent/core.py:1090AgentRuns _execute_without_timeout on a worker thread and raises TimeoutError if it has not finished within max_execution_time seconds.
_execute_without_timeoutAgentlib/crewai/src/crewai/agent/core.py:1130AgentCalls the agent executor's invoke with the prompt and tool descriptions and returns its output. It refuses to run synchronously inside a running event loop.
invokeAgentExecutorlib/crewai/src/crewai/agents/agent_executor.py:3132ExecutorThe synchronous entry to the reasoning loop. Inside an event loop it returns the invoke_async coroutine; otherwise it resets the executor state and runs the loop by calling the Flow kickoff on itself.
invoke_asyncAgentExecutorlib/crewai/src/crewai/agents/agent_executor.py:3229ExecutorThe asynchronous entry to the reasoning loop. It sets up messages and file inputs, awaits the executor's own Flow kickoff_async, and returns the final answer.
call_llm_and_parseAgentExecutorlib/crewai/src/crewai/agents/agent_executor.py:1643ExecutorThe @router step that runs on continue_reasoning: it calls the model through get_llm_response, parses the answer into an action or a final answer, and routes to parsed, parser_error or context_error.
get_llm_responseagent_utilslib/crewai/src/crewai/utilities/agent_utils.py:713LLMPrepares the messages (before-call hooks, and summarising the context when it is near the window limit), calls the model through _call_llm_retrying_empty, and runs the after-call hooks.
_call_llm_retrying_emptyagent_utilslib/crewai/src/crewai/utilities/agent_utils.py:529LLMMakes the LLM call and, if the answer is empty, repeats it once after admitting it through the RPM limiter. It raises EmptyLLMResponseError if the retry is empty too.
enforce_rpm_limitagent_utilslib/crewai/src/crewai/utilities/agent_utils.py:463LLMCalls the requests-per-minute limiter when one is configured. The limiter sleeps until the next minute once the limit is reached.
callBaseLLMlib/crewai/src/crewai/llms/base_llm.py:541LLMThe abstract method every LLM provider implements: it sends the messages, and any tool schemas, to the model and returns text, tool calls or a structured response.
kickoffFlowlib/crewai/src/crewai/flow/runtime/__init__.py:2118Flow runtimeThe synchronous entry for a flow. It runs kickoff_async through _run_flow under asyncio.run, on a one-worker thread pool when an event loop is already running.
_run_flowFlowlib/crewai/src/crewai/flow/runtime/__init__.py:2164Flow runtimeA coroutine defined inside kickoff that awaits kickoff_async with the inputs, files and restore id.
kickoff_asyncFlowlib/crewai/src/crewai/flow/runtime/__init__.py:2183Flow runtimeRestores state from persistence when an id is given, applies the inputs, emits the flow-started event and runs every start method. It emits the flow-finished event and returns the final output.
_execute_start_methodFlowlib/crewai/src/crewai/flow/runtime/__init__.py:2837Flow runtimeRuns one @start method (or, when resuming, skips one that already completed) and then triggers the listeners waiting on it.
_execute_methodFlowlib/crewai/src/crewai/flow/runtime/__init__.py:2927Flow runtimeRuns one flow method between started and finished (or failed) events. When the method raises HumanFeedbackPending, it saves the paused state through persistence, defaulting to default_flow_persistence.
default_flow_persistenceflow/persistence/factory.pylib/crewai/src/crewai/flow/persistence/factory.py:48Flow runtimeReturns the backend from a registered persistence factory, or a built-in SQLiteFlowPersistence when none is registered.
_execute_listenersFlowlib/crewai/src/crewai/flow/runtime/__init__.py:3171Flow runtimeAfter a method completes, runs the triggered routers one at a time and then the triggered listeners in parallel. When a router's result triggers a start method, it re-enters _execute_start_method, which is how cyclic flows and the agent loop repeat.

6. Boundary-crossing flows

Most of CrewAI runs inside one Python process, and inside that process the call graph in section 5 is the whole story. Nine flows leave it: they cross into another operating-system process, onto the network, onto another thread, or across time into a later process that picks up where an earlier one stopped. The table names each one and the boundary it crosses. Four of them are drawn as sequence diagrams, because the hop is something the call graph cannot follow: the crewai run subprocess, A2A delegation, human feedback pause and resume, and telemetry and trace export. The other five are described in their row only, since each is one request and one answer, or one thread and one join.

FlowBoundary crossedWhat crosses itWhere
crewai run subprocessProcess: the CLI spawns uv run inside the user's projectThe project script name, and an environment built from os.environ plus private-index credentials. Only the exit code comes back. Drawn in Figure 6.1.lib/cli/src/crewai_cli/run_crew.py:1348-1383
LLM provider callNetwork: HTTPS to the provider's APIMessages, tool schemas and the API key. Every provider's call and acall is wrapped by run_with_rate_limit_retry: 3 attempts, 1 s initial delay, 8 s cap, 20% jitter, only for 429/throttling errors, and a provider's Retry-After hint wins over the computed delay.lib/crewai/src/crewai/llms/retry.py:13-37,124; base_llm.py:246-284
OAuth2 device loginNetwork, plus a human in a browser_get_device_code asks the identity provider for a device code; the user approves in the browser; _poll_for_token polls the token URL at the server's interval until the code's lifetime ends (600 s if the provider gives none); validate_jwt_token checks the JWT against the provider's JWKS and save_tokens writes it encrypted to disk.lib/crewai-core/src/crewai_core/auth/oauth2.py:111-200
Deploy to CrewAI AMPNetwork: HTTPS to https://app.crewai.com (or CREWAI_PLUS_URL)A bearer token and either the git remote URL (_create_payload) or a zip of the project (_create_crew_from_zip), plus the values in the project's .env. Build and run happen on the platform, outside this repository; deploy redeploys and the status and log commands read back.lib/cli/src/crewai_cli/deploy/main.py:432,567,722,793
Telemetry and trace exportThread and network: spans leave from a background exporter thread; trace batches go to the platformAnonymous OpenTelemetry spans to https://telemetry.crewai.com:4319, and, when tracing is on, a buffered batch of execution events sent through PlusAPI at the end of the run. Drawn in Figure 6.4.lib/crewai-core/src/crewai_core/telemetry.py:307-315; trace_batch_manager.py:91-386
A2A delegationNetwork: HTTP JSON-RPC (default), gRPC or HTTP+JSON to a remote agent; a thread when called from a running event loopThe agent card fetch, a user message, then streamed, polled or pushed task updates until a terminal or input-needing state. Drawn in Figure 6.2.lib/crewai/src/crewai/a2a/utils/delegation.py:135-650
MCP tool callProcess for stdio servers (a spawned subprocess); network for HTTP and SSE serversTool discovery and tool invocations. _retry_operation gives tool discovery and each tool call up to 3 attempts with 1 s then 2 s waits, each attempt under a 30 s timeout, and does not retry connection or authentication errors; the connect step itself is not retried (section 13). A new client and transport is opened per tool call.lib/crewai/src/crewai/mcp/client.py:53-56,702-754; mcp/transports/
Human feedback pause and resumeTime across processes: state is written to SQLite in one process and read back by anotherFlow state, method outputs and the pending feedback context, keyed by the flow id. Drawn in Figure 6.3.lib/crewai/src/crewai/flow/runtime/__init__.py:1260-1693,2452-2506; flow/persistence/sqlite.py:285-383
Async task executionThread: each async_execution task runs on its own daemon threadThe task, its context (only the last synchronous output) and a copy of the context variables go out; a Future carries the result back. execute_async starts the thread and _process_async_tasks joins the futures in order before the next synchronous task. kickoff_async runs the whole synchronous kickoff on a worker thread, while akickoff is native asyncio throughout.lib/crewai/src/crewai/task.py:650-679; crew.py:1146-1198,1226,1586-1655,2035

crewai run subprocess

The crewai command a developer types is not the process that runs their crew. run hands to run_crew, which reads the project's pyproject.toml, works out whether it is a crew, a Python flow, a declarative flow or a JSON crew, and for a classic crew calls _execute_uv_script. That function builds the child environment with build_env_with_all_tool_credentials (the parent's environment plus UV_INDEX_* credentials for each private package index the project names) and runs uv run run_crew. uv resolves the project's own virtual environment and starts the project's script there, so the crew imports the project's pinned dependencies, not the CLI's. JSON crews take the same path through _project_run_command, with the crew definition and inputs passed as environment variables. Nothing but the exit code comes back: on a non-zero code _handle_run_error prints what it can and the CLI exits with the child's code.

Developer terminal crewai CLI process uv Project process (.venv) LLM provider process boundary network crewai run read_toml, project type, key prompt build_env_with_all_tool_credentials() uv run run_crew (env) start script in project .venv Crew().kickoff(inputs) HTTPS request, per step completion exit code returncode only non-zero: error, same exit code
Figure 6.1 · crewai run subprocessThe crew runs in a different process from the command that started it, under the project's own environment. Output streams straight to the terminal (capture_output is off); the CLI sees only the return code.

A2A delegation

An agent configured with remote A2A agents delegates through _delegate_to_a2a, which runs up to the configured maximum number of turns and calls execute_a2a_delegation once per turn. That synchronous wrapper drives the async implementation with asyncio.run, on a single worker thread when an event loop is already running in the caller, so delegation crosses a thread boundary as well as the network. _aexecute_a2a_delegation_impl fetches the remote agent card through _afetch_agent_card_cached (an HTTP GET of /.well-known/agent-card.json, cached for 300 s and retried on 401 by retry_on_401), checks the configured client auth against the card with validate_auth_against_agent_card, negotiates a transport (JSON-RPC unless the card and config agree on gRPC or HTTP+JSON), attaches auth headers and sends the message. One of three update handlers then waits for the task: streaming by default, polling through _poll_task_until_complete (2 s interval, 300 s timeout by default), or push notifications. Whatever arrives is reduced by process_task_state; an input-required answer goes back to the local agent, which may send another turn.

Local agent Delegation (worker thread) Update handler Remote A2A agent thread network delegate turn n GET /.well-known/agent-card.json (cached 300 s) agent card: skills, transports, security schemes check auth, pick transport, build headers handler.execute(message) send_message (JSON-RPC) stream events | get_task polls | push until terminal or input/auth required state + text (process_task_state) completed, failed or input_required next turn
Figure 6.2 · A2A delegationEach turn is a card fetch (usually from cache), one message, and an update loop on the remote task. The turn loop on the left repeats while the remote agent asks for input, up to the configured maximum turns.

Human feedback pause and resume

A Flow method decorated with human_feedback asks a feedback provider for a human's answer. A synchronous provider blocks; an asynchronous one raises HumanFeedbackPending, which the runtime treats as a pause rather than an error. _execute_method emits a paused event instead of a failed one, and the kickoff path writes the flow state and the pending context to SQLite through save_pending_feedback, then returns the pending object to the caller and lets the process end. Hours later, possibly on another machine sharing the storage directory, a new process calls from_pending with the flow id, which reads the row back with load_pending_feedback and rebuilds the flow. resume (or resume_async) then runs _resume_async_body, which applies the feedback, marks the method complete, deletes the pending row with clear_pending_feedback, and continues with the method's listeners. If a later listener pauses again, the cycle repeats with a new pending row.

Process A: Flow.kickoff Feedback provider flow_states.db (SQLite) Process B: resume request_feedback(context) raises HumanFeedbackPending paused events emitted save_pending_feedback: flow_states + pending_feedback kickoff returns the pending object; process may exit time passes: the human answers through the provider's channel feedback text, flow id from_pending: load_pending_feedback state + pending context resume(feedback): apply, mark method complete clear_pending_feedback (DELETE row) run listeners, then finished (or pause again)
Figure 6.3 · Human feedback pause and resumeThe boundary is time: the only thing that connects the two processes is the SQLite file under the storage directory (section 11), keyed by the flow id. The state row written at pause is kept; only the pending_feedback row is deleted.

Telemetry and trace export

Two separate streams leave a run. Anonymous telemetry is on by default: the Telemetry class records spans such as crew_creation (versions, process type, counts, agent roles, tool names; goals, backstories, task text and inputs only when the crew sets share_crew), and an OpenTelemetry batch processor exports them from a background thread over OTLP HTTP to https://telemetry.crewai.com:4319 with a 30 s timeout. It is off when OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY or CREWAI_DISABLE_TRACKING is set. Execution traces are the second stream, decided by should_enable_tracing (an explicit tracing argument, then CREWAI_TRACING_ENABLED, then the user's stored consent). When on, initialize_batch opens a batch on the CrewAI platform through initialize_trace_batch (or its ephemeral variant for a user who is not logged in), every event on the bus is buffered by add_event, and at crew completion, failure or a termination signal finalize_batch sends the whole buffer with send_trace_events in one request and closes the batch with finalize_trace_batch.

Crew or Flow run Span exporter thread telemetry.crewai.com TraceBatchManager CrewAI platform network network span (crew_creation, task...) OTLP HTTP, batched kickoff started (tracing enabled) POST tracing/batches every bus event: add_event (buffer only) kickoff completed, failed, or SIGTERM/SIGINT POST .../events (all) PATCH .../finalize process exit: flush
Figure 6.4 · Telemetry and trace exportSpans leave continuously from a background thread to CrewAI's telemetry collector; trace events are held in memory and leave once, at the end of the run. A failed export is logged at debug level and does not affect the run (section 13).
Functions named in this section 47 rows
FunctionWhereWhat it does
runlib/cli/src/crewai_cli/cli.py:754The click handler for crewai run. It parses the options and calls run_crew.
run_crewlib/cli/src/crewai_cli/run_crew.py:1137Reads the project's pyproject.toml, decides which kind of project it is, prompts for missing model keys, and dispatches to the right runner.
_execute_uv_scriptlib/cli/src/crewai_cli/run_crew.py:1348Runs a project script through uv run as a subprocess with the augmented environment. A non-zero exit becomes ProjectScriptFailed with the child's code.
build_env_with_all_tool_credentialslib/crewai-core/src/crewai_core/tool_credentials.py:35Copies os.environ and adds UV_INDEX credentials for each private package index named under tool.uv.sources. Errors reading the project file are swallowed and the plain copy is returned.
_project_run_commandlib/cli/src/crewai_cli/run_crew.py:596Builds the command that runs inline Python inside the project's environment: uv run --no-sync python -c, or poetry run for a Poetry project.
_handle_run_errorlib/cli/src/crewai_cli/run_crew.py:1386Prints the subprocess error and any captured output. It adds a hint to run crewai update when the project still uses Poetry.
calllib/crewai/src/crewai/llms/base_llm.py:541The synchronous LLM call each provider class implements. BaseLLM wraps every subclass's version with the rate-limit retry when the subclass is defined.
acalllib/crewai/src/crewai/llms/base_llm.py:611The asynchronous counterpart of call, wrapped with the async rate-limit retry in the same way.
run_with_rate_limit_retrylib/crewai/src/crewai/llms/retry.py:124Runs an LLM call up to three times, sleeping between attempts only when the error is a provider throttle. Nested calls inside an active retry run once, so retries do not multiply.
_get_device_codelib/crewai-core/src/crewai_core/auth/oauth2.py:111Posts the client id, scopes and audience to the provider's device authorisation URL and returns the device code, user code and verification URL.
_poll_for_tokenlib/crewai-core/src/crewai_core/auth/oauth2.py:136Polls the token URL at the server's interval until the user approves or the code expires. It continues on authorization_pending and slow_down and exits with an error on timeout.
validate_jwt_tokenlib/crewai-core/src/crewai_core/auth/utils.py:13Verifies the access token's RS256 signature against the provider's JWKS and checks issuer, audience, expiry and the required claims.
save_tokenslib/crewai-core/src/crewai_core/token_manager.py:50Encrypts the access token and its expiry with Fernet and writes it atomically to tokens.enc with owner-only permissions.
deploylib/cli/src/crewai_cli/deploy/main.py:432Handles crewai deploy push: validates the project, reads its deployment status, and redeploys from git or uploads a fresh zip depending on how AMP holds the code.
create_crewlib/cli/src/crewai_cli/deploy/main.py:567Handles crewai deploy create: registers a new deployment on AMP from the git remote or, without one, from a zip.
_create_payloadlib/cli/src/crewai_cli/deploy/main.py:793Builds the create request body: deployment name, the git clone URL and the variables from the project's .env.
_create_crew_from_ziplib/cli/src/crewai_cli/deploy/main.py:722Archives the project and posts it as a multipart upload to AMP, with the .env values as form fields.
crew_creationlib/crewai/src/crewai/telemetry/telemetry.py:254Records the telemetry span for a new crew: versions, process type, counts and agent and tool names, plus prompts and inputs only when share_crew is set.
should_enable_tracinglib/crewai/src/crewai/events/listeners/tracing/utils.py:144Decides whether execution traces are collected, from an explicit override, then CREWAI_TRACING_ENABLED, then eval runs, then the user's stored consent.
initialize_batchlib/crewai/src/crewai/events/listeners/tracing/trace_batch_manager.py:91Creates the local trace batch and opens it on the platform, authenticated or ephemeral. On a 401 or 403 it falls back to ephemeral.
add_eventlib/crewai/src/crewai/events/listeners/tracing/trace_batch_manager.py:283Appends one trace event to the in-memory buffer. Nothing is sent at this point.
finalize_batchlib/crewai/src/crewai/events/listeners/tracing/trace_batch_manager.py:327At the end of a run, waits for pending handlers, sends all buffered events and closes the batch. A timeout marks the batch as failed.
initialize_trace_batchlib/crewai-core/src/crewai_core/plus_api.py:599POSTs a new trace batch to the CrewAI platform's tracing API with the user's bearer token.
send_trace_eventslib/crewai-core/src/crewai_core/plus_api.py:616POSTs a list of trace events to an open batch on the platform.
finalize_trace_batchlib/crewai-core/src/crewai_core/plus_api.py:636PATCHes a batch on the platform to mark it finished.
_delegate_to_a2alib/crewai/src/crewai/a2a/wrapper.py:1233Runs the multi-turn delegation loop for an agent that has remote A2A agents, calling the delegation once per turn up to the configured maximum.
execute_a2a_delegationlib/crewai/src/crewai/a2a/utils/delegation.py:135Synchronous wrapper that runs the async delegation with asyncio.run. If an event loop is already running, it does this on a one-thread executor.
_aexecute_a2a_delegation_impllib/crewai/src/crewai/a2a/utils/delegation.py:375One delegation turn: fetches the card, checks auth and extensions, negotiates the transport, builds the message, and runs the chosen update handler.
_afetch_agent_card_cachedlib/crewai/src/crewai/a2a/utils/agent_card.py:227Fetches and validates a remote agent card over HTTP, caching it for 300 seconds.
retry_on_401lib/crewai/src/crewai/a2a/auth/utils.py:194Retries a request that got a 401, waiting with exponential backoff and reapplying the client auth scheme before each new attempt.
validate_auth_against_agent_cardlib/crewai/src/crewai/a2a/auth/utils.py:149Checks that the client auth configured for a remote agent matches a security scheme its card declares.
_poll_task_until_completelib/crewai/src/crewai/a2a/updates/polling/handler.py:45Calls get_task on the remote agent at a fixed interval until the task is terminal or needs input. It raises a timeout error when the time or poll limit is reached.
process_task_statelib/crewai/src/crewai/a2a/task_helpers.py:138Turns a remote task's state and messages into the result the local agent sees: completed with text, input or auth required, failed (rejected folds in here), canceled, or nothing yet.
_retry_operationlib/crewai/src/crewai/mcp/client.py:702Runs an MCP operation up to three times under a per-attempt timeout, with exponential waits. Connection, authentication and not-found errors are not retried.
execute_asynclib/crewai/src/crewai/task.py:650Starts the task on a daemon thread with a copy of the current context variables and returns a Future for its output.
_process_async_taskslib/crewai/src/crewai/crew.py:2035Waits on each pending async task's Future in order, then records the output and the execution log as for a synchronous task.
kickoff_asynclib/crewai/src/crewai/crew.py:1146Runs the synchronous crew kickoff on a worker thread with asyncio.to_thread, so async callers can await it.
akickofflib/crewai/src/crewai/crew.py:1226Native async kickoff: tasks, memory and knowledge calls are awaited directly instead of running the sync path on a thread.
human_feedbacklib/crewai/src/crewai/flow/human_feedback.py:453Decorator that marks a Flow method as needing a human's answer on its output before the flow continues.
_execute_methodlib/crewai/src/crewai/flow/runtime/__init__.py:2927Runs one Flow method with its events and hooks. A pending-feedback signal is reported as a pause rather than a failure and re-raised.
save_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:285Saves the flow state row and inserts or replaces the pending_feedback row for the flow id.
from_pendinglib/crewai/src/crewai/flow/runtime/__init__.py:1260Class method that rebuilds a paused flow from persistence by flow id: it restores state, method outputs and the pending context, and raises if nothing is pending.
load_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:329Reads the pending_feedback row for a flow id and returns the saved state and context, or None.
resumelib/crewai/src/crewai/flow/runtime/__init__.py:1349Synchronous resume with the human's feedback. It runs resume_async under asyncio.run and refuses if an event loop is already running.
resume_asynclib/crewai/src/crewai/flow/runtime/__init__.py:1402Async resume. It requires a pending context, runs the resume body, and emits a flow-failed event if anything raises.
_resume_async_bodylib/crewai/src/crewai/flow/runtime/__init__.py:1469Applies the feedback, marks the paused method complete, deletes the pending row, and runs the downstream listeners to completion or the next pause.
clear_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:368Deletes the pending_feedback row for a flow id.

7. State machines

Three genuine state machines exist in the source, each with named states and explicit transitions: the AgentExecutor reasoning loop, the Flow human feedback lifecycle, and the A2A task lifecycle. Each is drawn below with a table of its states. Elsewhere the code has status fields (a task's output being present or not, a trace batch marked failed), but none has a set of states and transitions a reader could name, so none is drawn.

AgentExecutor reasoning loop

AgentExecutor is itself a Flow (class AgentExecutor(Flow[AgentExecutorState], BaseAgentExecutor), at lib/crewai/src/crewai/agents/agent_executor.py:203), so the agent's reasoning loop is written as Flow methods decorated with @start, @listen and @router. Each router returns a string, and the Flow runtime's _execute_listeners fires whichever methods listen for that string or for the method's own name. The returned strings are the machine's states. After the run starts with generate_plan and initialize_reasoning, each iteration goes the same way: check_max_iterations either forces a final answer (max_iter, 25 by default, reached, or the same tool called too many times in a row) or sends the agent to one of two reasoning paths. Text tool calling goes through call_llm_and_parse and route_by_answer_type. Native function calling goes through call_llm_native_tools and execute_native_tool. Tool results, parser errors and context-length errors all return to initialized for the next iteration, and the loop ends in agent_finished, which finalize turns into the agent's output.

Twelve core states are drawn. A second set handles planning when it is enabled: check_todos_available returns planning_disabled, no_todos or has_todos, and the todo machinery adds single_todo_ready, multiple_todos_ready, todo_injected, step_executed, step_observed_low, step_observed_medium, step_observed_high, continue_plan, replan_now, refine_and_continue, goal_achieved, needs_replan, todo_satisfied, todo_not_satisfied, todo_marked and all_todos_complete. Without planning, the tool paths pass through check_todo_completion or check_native_todo_completion, which return todo_not_satisfied, and increment_and_continue returns initialized. Two more strings end the loop beside agent_finished: native_finished (a native-tools answer with no tool calls) and tool_result_is_final (a tool flagged as returning the final answer).

start (after planning) initialized check_max_iterations continue_reasoning call_llm_and_parse continue_reasoning_native call_llm_native_tools force_final_answer ensure_force_final_answer parsed route_by_answer_type parser_error to initialized context_error to initialized native_tool_calls execute_native_tool execute_tool tool_completed to initialized execute_tool_action native_tool_completed to initialized agent_finished finalize: completed tool_result_is_final native_finished
Figure 7.1 · AgentExecutor reasoning loopBoxes are the strings the routers return; labels in monospace are the router that leaves each state. Every red state and both tool-result states return to initialized, incrementing the iteration count, so the loop is bounded by max_iter and ends at agent_finished. Dashed edges are exits named native_finished and tool_result_is_final, which finalize treats like agent_finished.
StateReturned byWhat it meansLeaves to
initializedinitialize_reasoning, increment_and_continue, recover_from_parser_error, recover_from_context_lengthA new iteration is about to start.continue_iteration, then check_max_iterations: continue_reasoning, continue_reasoning_native or force_final_answer
continue_reasoningcheck_max_iterations; also call_llm_native_tools when the model turns out not to support native toolsAsk the LLM for a ReAct-style text answer and parse it.call_llm_and_parse: parsed, parser_error or context_error
continue_reasoning_nativecheck_max_iterations when the agent uses native function callingAsk the LLM with tool schemas attached.call_llm_native_tools: native_tool_calls, native_finished, context_error or continue_reasoning
parsedcall_llm_and_parseThe text answer was parsed into a tool action or a final answer.route_by_answer_type: execute_tool or agent_finished
execute_toolroute_by_answer_typeThe parsed action names a tool to run.execute_tool_action: tool_completed or tool_result_is_final
native_tool_callscall_llm_native_toolsThe model returned one or more structured tool calls.execute_native_tool: native_tool_completed or tool_result_is_final
tool_completedexecute_tool_actionThe tool's result has been added to the conversation.check_todo_completion, then increment_and_continue: initialized
native_tool_completedexecute_native_toolThe native tool results have been added to the conversation.check_native_todo_completion, then increment_and_continue: initialized
parser_errorcall_llm_and_parseThe model's text could not be parsed as an action or a final answer.recover_from_parser_error: initialized, with an error message added for the model
context_errorcall_llm_and_parse, call_llm_native_toolsThe request exceeded the model's context window.recover_from_context_length: summarises the history (or raises when respect_context_window is off), then initialized
force_final_answercheck_max_iterationsThe iteration cap or the repeated-tool-call limit was reached.ensure_force_final_answer: agent_finished
agent_finishedroute_by_answer_type, ensure_force_final_answerA final answer is available.finalize: completed (terminal)

Flow human feedback lifecycle

A Flow with a human_feedback step can stop in the middle and continue later in a different process (the sequence is Figure 6.3). The states are the flow's, seen from outside: running, paused, resumed, completed and failed. Paused is the HumanFeedbackPending signal, persisted as a row in the pending_feedback table of the flow SQLite store (section 11). The source has no event or field named resumed: a resume is visible as a fresh flow-started event followed by a method-started event for the method that paused, inside _resume_async_body.

kickoff running paused resumed completed failed HumanFeedbackPending from_pending + resume (later process) pauses again listeners done all methods done exception exception
Figure 7.2 · Flow human feedback lifecyclePaused is the only state that survives the process: it is the pending_feedback row. Resumed lasts from loading that row until the row is deleted and the downstream listeners run.
StateEntered whenVisible asWhat is persisted
runningkickoff, kickoff_async or akickoff starts the flowFlowStartedEvent, then a started and finished event per methodThe flow_states row after each method, when persistence is configured
pausedAn asynchronous feedback provider raises HumanFeedbackPending inside a human_feedback stepMethodExecutionPausedEvent, then FlowPausedEvent; kickoff returns the pending object and the flow's pending_feedback property is setsave_pending_feedback writes the state row and the pending_feedback row (context, state, created_at), keyed by flow_uuid
resumedA later process calls from_pending with the flow id, then resume or resume_async with the feedbackNo dedicated event: FlowStartedEvent again and a method-started event for the paused methodclear_pending_feedback deletes the pending row once the feedback is applied; the state row stays
completedThe last listener finishes, in the first process or after a resumeFlowFinishedEventFinal state row, when persistence is configured
failedA method raises anything other than HumanFeedbackPending, before or after a resumeMethodExecutionFailedEvent and FlowFailedEvent, emitted by _emit_flow_failedNothing new; if the failure comes during a resume before the delete, the pending row is kept and the resume can be retried

A2A task lifecycle

A task on a remote A2A agent moves through the protocol's eight task states. The state values come from the a2a SDK. crewai groups them in lib/crewai/src/crewai/a2a/task_helpers.py:38-58: submitted and working are pending, input_required and auth_required are actionable (the remote side wants something), and completed, failed, canceled and rejected are terminal. The update handlers wait until a task is terminal or actionable, and process_task_state maps that state to what the delegating agent sees (Figure 6.2). When crewai is the server, the code it runs itself sets only two states: completed, at the end of _execute_impl, and canceled, in cancel. A failure raises a server error and leaves the failed state to the SDK, and submitted and working are also set by the SDK.

pending submitted working completed failed canceled rejected terminal input_required auth_required actionable client sends the next turn
Figure 7.3 · A2A task lifecycleThe protocol's eight states as crewai's client handles them. The actionable states hand control back to the delegating agent, and the loop back to working is a new message in the next delegation turn. process_task_state reports rejected as failed.
StateGroupWho sets itHow crewai's client handles it
submittedPendingThe remote server, through the a2a SDK, when it accepts the messageKeeps waiting: streaming skips the update, polling polls again
workingPendingThe remote server, through the a2a SDKKeeps waiting until the polling or push timeout
input_requiredActionableThe remote agent, when it needs more from the callerReturned with the remote agent's message; the delegation loop may send another turn
auth_requiredActionableThe remote agent, when the caller must authenticate furtherReturned as auth_required to the delegating agent
completedTerminalThe remote server; crewai's own server code sets it at the end of _execute_implReturned as completed with the result text and artifacts
failedTerminalThe remote server; crewai's server raises a server error and leaves the state to the SDK; crewai's handlers also build failed results on transport errors and timeoutsReturned as failed with the error
canceledTerminalThe remote server; crewai's own server code sets it in cancelReturned as canceled
rejectedTerminalThe remote server, when it refuses the taskFolded into failed by process_task_state
Functions named in this section 30 rows
FunctionWhereWhat it does
_execute_listenerslib/crewai/src/crewai/flow/runtime/__init__.py:3171After a Flow method finishes, it starts every method that listens for that method's name or, for a router, for the string it returned.
generate_planlib/crewai/src/crewai/agents/agent_executor.py:573The executor's start method. It builds a plan of todos when planning is enabled and does nothing otherwise.
check_todos_availablelib/crewai/src/crewai/agents/agent_executor.py:1281Routes after planning to planning_disabled, no_todos or has_todos.
initialize_reasoninglib/crewai/src/crewai/agents/agent_executor.py:1604Prepares the reasoning loop and returns initialized.
continue_iterationlib/crewai/src/crewai/agents/agent_executor.py:2514A bridge listener on initialized that hands each new iteration to the iteration check.
check_max_iterationslib/crewai/src/crewai/agents/agent_executor.py:2520Returns force_final_answer when max_iter or the repeated-tool-call limit is reached. Otherwise it picks the native or text reasoning path.
call_llm_and_parselib/crewai/src/crewai/agents/agent_executor.py:1643Calls the LLM for a text answer and parses it into a tool action or a final answer. It returns parsed, parser_error or context_error.
route_by_answer_typelib/crewai/src/crewai/agents/agent_executor.py:1906Sends a parsed tool action to execute_tool and a final answer to agent_finished, or to the todo path when planning is on.
call_llm_native_toolslib/crewai/src/crewai/agents/agent_executor.py:1724Calls the LLM with tool schemas and routes on whether it returned tool calls, a final answer or a context error. It falls back to text reasoning when the model does not support native tools.
execute_tool_actionlib/crewai/src/crewai/agents/agent_executor.py:1920Runs the tool named by a parsed action and appends its result. It returns tool_result_is_final when the tool's result is the answer.
execute_native_toollib/crewai/src/crewai/agents/agent_executor.py:2010Runs the structured tool calls the model returned and appends their results to the conversation.
check_todo_completionlib/crewai/src/crewai/agents/agent_executor.py:2535After a text-path tool run, decides whether the current todo is satisfied. With no todo it returns todo_not_satisfied.
check_native_todo_completionlib/crewai/src/crewai/agents/agent_executor.py:2498The native-path counterpart: any tool run satisfies an active todo, and with no todo it returns todo_not_satisfied.
increment_and_continuelib/crewai/src/crewai/agents/agent_executor.py:2646Counts the iteration and returns initialized to start the next one.
recover_from_parser_errorlib/crewai/src/crewai/agents/agent_executor.py:3094Adds a parser-error message for the model, counts the iteration and returns initialized.
recover_from_context_lengthlib/crewai/src/crewai/agents/agent_executor.py:3117Summarises the conversation to fit the context window (or raises when that is disabled), counts the iteration and returns initialized.
ensure_force_final_answerlib/crewai/src/crewai/agents/agent_executor.py:1619Asks the model for a final answer from what it has so far and returns agent_finished.
finalizelib/crewai/src/crewai/agents/agent_executor.py:2663Listens for any finishing state and turns the current answer into the executor's result. It returns completed, or skipped if the run already finished.
human_feedbacklib/crewai/src/crewai/flow/human_feedback.py:453Decorator that marks a Flow method as needing a human's answer on its output before the flow continues.
_resume_async_bodylib/crewai/src/crewai/flow/runtime/__init__.py:1469Applies the feedback, marks the paused method complete, deletes the pending row, and runs the downstream listeners to completion or the next pause.
kickofflib/crewai/src/crewai/flow/runtime/__init__.py:2118Starts a flow synchronously, running its async runtime under asyncio.run. It returns the final output or, on a pause, the pending object.
save_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:285Saves the flow state row and inserts or replaces the pending_feedback row for the flow id.
from_pendinglib/crewai/src/crewai/flow/runtime/__init__.py:1260Class method that rebuilds a paused flow from persistence by flow id. It raises if nothing is pending.
resumelib/crewai/src/crewai/flow/runtime/__init__.py:1349Synchronous resume with the human's feedback. It runs the async resume under asyncio.run.
resume_asynclib/crewai/src/crewai/flow/runtime/__init__.py:1402Async resume. It requires a pending context and emits a flow-failed event if the resume raises.
clear_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:368Deletes the pending_feedback row for a flow id.
_emit_flow_failedlib/crewai/src/crewai/flow/runtime/__init__.py:2730Emits FlowFailedEvent with the error so listeners and traces record the failure.
process_task_statelib/crewai/src/crewai/a2a/task_helpers.py:138Turns a remote task's state and messages into the delegating agent's result: completed, input or auth required, failed (including rejected), canceled, or nothing yet.
_execute_impllib/crewai/src/crewai/a2a/utils/task.py:306Server side: runs the local agent on an incoming A2A task and enqueues the task as completed with its artifacts. On an exception it emits a failure event and raises a server error.
cancellib/crewai/src/crewai/a2a/utils/task.py:458Server side: marks a running task canceled and enqueues the final status update. It does nothing if the task is already terminal.

8. Security model

CrewAI is a library and a CLI. It runs inside the developer's own process with that process's rights, serves nothing on the network by default, and holds no users of its own. Its security model is therefore about what it reaches out to and what it lets an agent do: the credentials it reads, the hosts it calls, the code and data it loads from disk, and the guards it puts between a model's output and the machine. The CrewAI AMP platform, which holds accounts and deployments, is outside this repository; the CLI is its client.

Trust boundaries

Six boundaries matter. Everything inside the developer's process is trusted equally: an agent, its tools and the developer's own code share one address space, one set of environment variables and one filesystem view. Everything a model returns is untrusted input to that process, which is why the guards in the controls table sit where a model's output becomes a URL, a SQL statement or a callable.

BoundaryWhat crosses itWhat protects it
The developer's processEnvironment variables (every provider and tool key), the working directory, local stores (section 11)Operating-system user permissions only. The library adds no isolation between agents, tools and the host code.
LLM providersPrompts, task text, tool results and memory snippets out; completions and tool calls backHTTPS and the provider's API key. Model output is treated as data, then parsed into actions the guards below constrain.
Tool APIs and URLs an agent may fetchQueries and URLs chosen by the model; page and API content back into the promptThe SSRF guard on URL-fetching tools and loaders; each vendor tool's own API key; nothing filters returned content.
MCP serversTool calls and results; for stdio servers, a subprocess the developer configuredWhatever the server's transport offers. A stdio server runs with the developer's rights.
Remote A2A agentsDelegated messages out; task states, text and artifacts backClient auth schemes (bearer, basic, digest, API key, OAuth2 client credentials and authorisation code, mutual TLS) and a check that they match the remote agent card.
The CrewAI platformLogin, deployments (git URL or zip, plus .env values), trace batches, anonymous telemetry spansOAuth2 device-flow login and a bearer token; the platform enforces its own authorisation and answers 401 or 403.

Authentication

The CLI. crewai login uses the OAuth2 device flow (RFC 8628). The identity source is a configurable provider, workos by default, with auth0, entra_id, keycloak and okta also supported, and the platform URL defaults to https://app.crewai.com. _get_device_code obtains a device and user code, the user approves in a browser, and _poll_for_token waits for the token. validate_jwt_token then verifies the RS256 signature against the provider's JWKS and checks issuer, audience, expiry, not-before and issued-at with 10 s leeway. Token lifetime is the JWT's own exp claim: save_tokens records it, get_token treats the token as absent once it has passed, and no refresh token is stored, so an expired session means logging in again. get_auth_token is what every platform call uses, and PlusAPI sends the token as a bearer header with the organisation id.

Token storage. The token is Fernet-encrypted in tokens.enc, with the key generated by _get_or_create_key and kept in secret.key in the same directory (~/.local/share/crewai/credentials on Linux), which is created 0700, with both files written 0600. Because the key and the ciphertext sit side by side, the encryption stops a casual read of one file, not someone who can read the user's files. CLI settings, including the organisation, OAuth2 settings and the tool repository username and password, are written as JSON to ~/.config/crewai/settings.json with mode 0600.

Provider API keys. Model and tool keys come from environment variables (for example OPENAI_API_KEY, read by _normalize_openai_fields) or from constructor arguments, and are sent only to the provider they belong to. A missing key is found when the client is built: _get_client_params raises MissingAPIKeyError at that point, not at startup. crewai run passes the whole environment to the project subprocess (section 6).

A2A servers. For an agent exposed over A2A, crewai defines six server auth schemes in lib/crewai/src/crewai/a2a/auth/server_schemes.py: SimpleTokenAuth, EnterpriseTokenAuth, OIDCAuth, OAuth2ServerAuth, APIKeyServerAuth and MTLSServerAuth, each with an authenticate method. OIDCAuth and OAuth2ServerAuth validate JWTs against a JWKS (OAuth2ServerAuth can also use RFC 7662 token introspection). SimpleTokenAuth and APIKeyServerAuth compare a shared secret. MTLSServerAuth accepts every request and relies on the TLS layer having checked the client certificate. EnterpriseTokenAuth raises NotImplementedError. The schemes are configuration for whatever HTTP server hosts the agent: crewai builds and signs the agent card, but no code in its src tree runs an A2A HTTP server or calls authenticate: the only reference to a scheme is the A2AServerConfig.auth field (a2a/config.py:684). So five of the six schemes are implemented, none is invoked by crewai itself, and enforcement is left to the server the developer mounts the agent in.

Authorisation

There is none inside the library. No role, permission or access check exists in lib/crewai/src/crewai: an agent can call any tool it was given, every tool acts with whatever credentials the environment holds, and code an agent reaches runs with the developer's operating-system rights. Authorisation is delegated to two places. The CrewAI platform enforces its own, answering 401 or 403 to the CLI and to trace uploads (the trace manager then falls back to an anonymous ephemeral batch). And a small set of opt-in guards limit what model output can do locally: these are the controls in the table below. When a developer does not narrow an agent's tools, nothing else does, so what an agent can do is decided entirely by the tools and keys the developer hands it.

What is deliberately public or outbound by default

Nothing is served. What leaves by default is outbound only: anonymous telemetry spans to https://telemetry.crewai.com:4319 unless OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY or CREWAI_DISABLE_TRACKING is set; the LiteLLM model price catalog, a JSON file the CLI fetches from raw.githubusercontent.com; and, when a developer opens the flow visualisation page, vis-network 9.1.2 from unpkg.com and html2canvas 1.4.1 and jspdf 2.5.1 from cdnjs.cloudflare.com, pinned by version but without subresource integrity. Execution traces leave only when tracing is enabled. The outbound evidence found no install hooks, and its three non-test risk-pattern lines are all that price catalog, which is data, not code. Section 12 gives each host and flagged line its row.

Controls

ControlWhat it doesDefaultWhere
OAuth2 device flowCLI login against a configurable identity provider. The JWT is verified against the provider's JWKS (RS256; issuer, audience and time claims) before it is stored.On for every platform command; workos providerlib/crewai-core/src/crewai_core/auth/oauth2.py:97-200; auth/utils.py:13
Token storageFernet-encrypted tokens.enc with an owner-only key file beside it. Expiry is enforced on read; there is no refresh.Alwayslib/crewai-core/src/crewai_core/token_manager.py:19-136
Provider API keysRead from the environment or constructor arguments and sent only to the matching provider. A missing key raises when the client is first built.Environmentlib/crewai/src/crewai/llms/providers/openai/completion.py:422-444,563-570
A2A server authenticationSix scheme classes for an agent exposed over A2A: shared token, enterprise token (not implemented), OIDC, OAuth2 (JWKS or introspection), API key, mutual TLS.Off unless configured; not invoked by crewai's own codelib/crewai/src/crewai/a2a/auth/server_schemes.py:108-744
SSRF guardResolves the host, refuses any non-global address (private ranges, loopback, link-local and the cloud metadata addresses), connects to the checked address, then checks the connected peer again. Each redirect hop is validated, credentials are stripped across origins, and proxies are refused.On for URL-fetching tools and RAG loaders. CREWAI_TOOLS_ALLOW_UNSAFE_PATHS turns it off and CREWAI_TOOLS_ALLOWED_PRIVATE_HOSTS allowlists hosts.lib/crewai-tools/src/crewai_tools/security/ssrf_adapter.py:60-316; safe_path.py:201; safe_requests.py:129
NL2SQL DML guardRead-only by default. It rejects multiple statements, comments, writable CTEs, EXPLAIN ANALYZE of a write and any write command, and rolls back non-write transactions.Read-only; writes need allow_dml or CREWAI_NL2SQL_ALLOW_DML=truelib/crewai-tools/src/crewai_tools/tools/nl2sql/nl2sql_tool.py:234-372
Callback deserialisationA callback stored as a dotted path (for example in a checkpoint) is only imported and resolved when the developer opts in. Otherwise the string is refused.Off; needs CREWAI_DESERIALIZE_CALLBACKSlib/crewai/src/crewai/types/callback.py:26-75
Training picklescrewai train writes training_data.pkl and trained_agents_data.pkl to the working directory, and agents load them with pickle on every run, with no integrity check.Loaded whenever the file is presentlib/crewai/src/crewai/utilities/file_handler.py:120-170; agent/core.py:1529,1556
TelemetryAnonymous spans with versions, counts, agent roles and tool names. Goals, backstories, task text and inputs are added only when a crew sets share_crew.On; three environment variables turn it offlib/crewai-core/src/crewai_core/telemetry.py:45,286-359; lib/crewai/src/crewai/telemetry/telemetry.py:254

The SSRF guard covers less than all tool HTTP. The adapter does check the connected peer IP, but only the callers of security/safe_requests.py go through it: the website scraping, URL read and element scraping tools and the RAG web, PDF, DOCX and docs-site loaders (8 files in crewai-tools), plus crewai's own spreadsheet input fetch. Vendor API tools call their fixed hosts with requests or httpx directly.

Around the code, the repository adds supply-chain controls: CodeQL and pip-audit run in GitHub Actions, ruff runs the bandit (S) rules over lib/, and uv resolves with exclude-newer = "3 days" (a supply-chain cooldown) and pins named packages past known CVEs (pyproject.toml [tool.uv]).

Functions named in this section 11 rows
FunctionWhereWhat it does
_get_device_codelib/crewai-core/src/crewai_core/auth/oauth2.py:111Posts the client id, scopes and audience to the provider's device authorisation URL. It returns the device code, user code and verification URL.
_poll_for_tokenlib/crewai-core/src/crewai_core/auth/oauth2.py:136Polls the token URL at the server's interval until the user approves or the device code expires (600 s when the provider states no lifetime).
validate_jwt_tokenlib/crewai-core/src/crewai_core/auth/utils.py:13Verifies the access token's RS256 signature against the provider's JWKS and checks issuer, audience, time claims and the required claims.
save_tokenslib/crewai-core/src/crewai_core/token_manager.py:50Encrypts the access token and its expiry with Fernet and writes it atomically to tokens.enc with owner-only permissions.
get_tokenlib/crewai-core/src/crewai_core/token_manager.py:65Decrypts tokens.enc and returns the access token, or None when there is none or it has expired.
_get_or_create_keylib/crewai-core/src/crewai_core/token_manager.py:32Reads the Fernet key from secret.key in the credentials directory, creating it exclusively with mode 0600 on first use.
get_auth_tokenlib/crewai-core/src/crewai_core/auth/token.py:12Returns the stored platform token, or raises an authentication error telling the user to log in.
_normalize_openai_fieldslib/crewai/src/crewai/llms/providers/openai/completion.py:422Fills the OpenAI model's API key from OPENAI_API_KEY and its base URL from OPENAI_BASE_URL or OPENAI_API_BASE when they were not passed in.
_get_client_paramslib/crewai/src/crewai/llms/providers/openai/completion.py:563Assembles the OpenAI client's parameters and raises MissingAPIKeyError if no key was found.
authenticatelib/crewai/src/crewai/a2a/auth/server_schemes.py:118The abstract method each A2A server scheme implements: it checks a presented credential and returns the authenticated user or raises a 401 (503 when a JWKS cannot be reached).
crewai loginlib/cli/src/crewai_cli/cli.py:914The CLI command that clears stored user settings and runs the device-flow login, then lets the user pick an organisation.

Security rating

Security: 7/10, Good

Good. The controls are deliberate for a library that runs with the caller's rights: an SSRF-validating HTTP path for URL-fetching tools, NL2SQL writes and callback deserialisation off unless opted in, OAuth2 device-flow login, CodeQL, pip-audit, ruff bandit rules and a three-day dependency cooldown with CVE pins, and every outbound host is one an LLM framework is expected to call. The gaps are known and local: the CLI token's key sits beside the token, telemetry is opt-out, the visualisation pulls pinned CDN scripts without SRI, and trained-agent data is loaded with pickle. The technical assessment gives the reasoning per criterion.

9. Configuration and secrets

CrewAI has no configuration file of its own for the library. Every setting is either a constructor argument (an LLM(api_key=...), a tool's api_key field) or an environment variable read at the point of use, usually with the argument taking precedence and the variable as the fallback. Importing crewai also loads a .env file from the working directory (python-dotenv's loader runs at module level in lib/crewai/src/crewai/llm.py:90 and project/crew_base.py:130), and crewai run loads the project's .env into the project subprocess it spawns. The CLI keeps its own small settings file, ~/.config/crewai/settings.json, for the platform URL, OAuth2 provider and organisation, and its login token in an encrypted file beside it (see "Secrets" below).

The evidence counted 150 distinct environment variables read through an accessor or declared in a .env sample; CREWAI_DISABLE_TRACKING is read in lib/crewai-core/src/crewai_core/telemetry.py:358 but is not in that list, so the inventory below carries 151 rows, one per variable. The scope column separates what a user of the library sets (Library, LLM provider, Tool, Files, Core, CLI) from what only CI, the maintainers' devtools, a script or the test suite reads; none were dropped. Six names in the evidence are Python constants that hold a variable name rather than variables themselves (AWAITING_ENV, EVAL_TOKEN_ENV, PASTED_KEYS_ENV, RUN_COUNTED_ENV, TRACING_ENV_VAR, and CREWAI_TRAINED_AGENTS_FILE_ENV); their rows name the real variable they stand for. Where the evidence lists a variable that no code reads (it appears only in a README or a recorded cassette), the row says so.

The variables group into a few families. Telemetry and tracing: OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY and CREWAI_DISABLE_TRACKING each switch off the anonymous OpenTelemetry export, which is on by default; CREWAI_TRACING_ENABLED opts a run in or out of sending execution traces to the CrewAI platform. Storage: CREWAI_STORAGE_DIR names the per-project directory under the user data directory where the SQLite, LanceDB and checkpoint stores live, defaulting to the name of the current directory. Model selection and provider keys: MODEL, OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY and the rest, read when a provider client is built. Tool keys: one or two per third-party tool in crewai-tools. Platform: CREWAI_PLUS_URL, the personal access and integration tokens. Opt-in guards: CREWAI_DESERIALIZE_CALLBACKS and CREWAI_NL2SQL_ALLOW_DML keep unsafe behaviour off unless set. CLI plumbing: variables the CLI sets for the project subprocess it starts and reads back there.

Environment variables in the evidence 151 rows
VariableDefaultRead atScopeWhen absent
A2A_TEST_ENDPOINThttp://localhost:9999lib/crewai/tests/a2a/test_a2a_integration.py:16Test-onlyThe A2A integration tests target a local agent on port 9999.
ACTOR_LOGINnone (set by the workflow).github/workflows/ftc-require-issue.yml:48CI-onlySet at line 34 from the event sender; if missing the inline script raises KeyError and the check step fails.
AGENTOPS_API_KEYnonelib/crewai/tests/cassettes/test_crew_kickoff_streaming_usage_metrics.yamlNot read by codeNothing: the name appears only inside recorded LLM response text in two cassettes.
AGENT_HANDLER_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/merge_agent_handler_tool/merge_agent_handler_tool.py:65ToolThe Merge Agent Handler tool has no key unless one is passed; its calls to Merge cannot authenticate.
ANTHROPIC_API_KEYnonelib/crewai/src/crewai/llms/providers/anthropic/completion.py:457LLM providerBuilding an Anthropic client without an explicit key raises MissingAPIKeyError. Also a CI secret in agents-md-eval.yml:53.
APIFY_API_TOKENnonelib/crewai-tools/src/crewai_tools/tools/apify_actors_tool/apify_actors_tool.py:58ToolThe Apify Actors tool has no token unless one is passed and cannot call Apify.
API_BASEnonelib/crewai/src/crewai/utilities/llm_utils.py:532LibraryThe default LLM is built with its provider's own base URL; the CLI model picker also falls through to OLLAMA_HOST and then localhost:11434 (model_catalog.py:303).
AUTHOR_ASSOCIATION"".github/workflows/ftc-require-issue.yml:52CI-onlyTreated as no association, so the author gets no maintainer exemption from the linked-issue rule.
AUTHOR_LOGINnone (set by the workflow).github/workflows/ftc-require-issue.yml:47CI-onlySet at line 33 from the PR author; if missing the script raises KeyError.
AUTH_TOKENnonelib/crewai/src/crewai/a2a/auth/server_schemes.py:151Library (A2A server)A SimpleTokenAuth scheme built without a token has no expected value to compare against.
AWAITING_ENV"" (stands for CREWAI_EVAL_AWAITING_RUN)lib/crewai-core/src/crewai_core/eval_handshake.py:48,80Core (constant name)The run is not one an evaluation is waiting on, so no evaluation handshake happens.
AWS_ACCESS_KEY_IDnonelib/crewai/src/crewai/llms/providers/bedrock/completion.py:300LLM providerNone is passed to boto3, which falls back to its own credential chain (profile, instance role); with none, Bedrock calls fail.
AWS_DEFAULT_REGIONus-east-1 (Bedrock LLM); us-east-1 or us-west-2 in toolslib/crewai/src/crewai/llms/providers/bedrock/completion.py:311LLM provider, Tool, FilesBedrock falls back to AWS_REGION_NAME, then us-east-1; the knowledge-base retriever uses us-east-1 and the agent invoker us-west-2.
AWS_REGION_NAMEus-east-1lib/crewai/src/crewai/llms/providers/bedrock/completion.py:312LLM providerRegion defaults to us-east-1.
AWS_SECRET_ACCESS_KEYnonelib/crewai/src/crewai/llms/providers/bedrock/completion.py:303LLM providerAs AWS_ACCESS_KEY_ID: boto3's credential chain decides.
AZURE_API_BASEnonelib/crewai/src/crewai/llms/providers/azure/completion.py:136LLM providerThird fallback for the Azure endpoint after AZURE_ENDPOINT and AZURE_OPENAI_ENDPOINT; with none, the Azure client has no endpoint.
AZURE_API_KEYnonelib/crewai/src/crewai/llms/providers/azure/completion.py:131LLM providerThe Azure client uses azure-identity credentials, or for the OpenAI-shaped delegate falls back to OPENAI_API_KEY (line 211).
AZURE_API_VERSION2024-06-01lib/crewai/src/crewai/llms/providers/azure/completion.py:139LLM providerAPI version 2024-06-01 is used.
AZURE_CREDENTIAL_SCOPESnonelib/crewai/src/crewai/llms/providers/azure/completion.py:173LLM providerThe client's default token scopes are used.
AZURE_DOCUMENTDB_CONNECTION_STRING""lib/crewai-tools/src/crewai_tools/tools/azure_documentdb_vector_search_tool/vector_search.py:58ToolNo connection unless connection_string is passed to the tool.
AZURE_DOCUMENTDB_E2E_CONNECTION_STRINGnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:21Test-onlyThe local end-to-end tests are skipped.
AZURE_DOCUMENTDB_LIVE_CONNECTION_STRINGnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:151Test-onlyThe live Azure tests are skipped.
AZURE_DOCUMENTDB_LIVE_EMBEDDING_DEPLOYMENTnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:159Test-onlyRead only inside the live test, which is skipped without the connection string.
AZURE_DOCUMENTDB_LIVE_IDENTITYenvironmentlib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:168Test-onlyThe live test authenticates with the environment credential.
AZURE_DOCUMENTDB_LIVE_OPENAI_API_VERSIONnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:160Test-onlyLive test only; KeyError if the live test runs without it.
AZURE_DOCUMENTDB_LIVE_OPENAI_ENDPOINTnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:158Test-onlyLive test only; KeyError if the live test runs without it.
AZURE_DOCUMENTDB_LIVE_TENANT_IDnonelib/crewai-tools/tests/tools/test_azure_documentdb_vector_search_e2e.py:171Test-onlyNeeded only for the Azure CLI identity branch of the live test.
AZURE_ENDPOINTnonelib/crewai/src/crewai/llms/providers/azure/completion.py:134LLM providerFalls back to AZURE_OPENAI_ENDPOINT, then AZURE_API_BASE.
AZURE_OPENAI_ENDPOINTnonelib/crewai/src/crewai/llms/providers/azure/completion.py:135LLM provider, ToolSecond endpoint fallback for Azure; the DocumentDB tool (vector_search.py:177) has no embedding endpoint without it.
AZURE_TENANT_IDnonelib/crewai-tools/src/crewai_tools/tools/azure_documentdb_vector_search_tool/README.md:75Documented onlyNot read by CrewAI code; the README example and azure-identity read it.
BASE_URLnonelib/crewai/src/crewai/utilities/llm_utils.py:527LibraryFirst of four base-URL fallbacks for the default LLM; with none set, the provider default is used.
BEDROCK_AGENT_ALIAS_IDnonelib/crewai-tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py:61ToolThe Bedrock agent invoker has no alias unless one is passed.
BEDROCK_AGENT_IDnonelib/crewai-tools/src/crewai_tools/aws/bedrock/agents/invoke_agent_tool.py:60ToolThe Bedrock agent invoker has no agent unless one is passed.
BEDROCK_KB_IDnonelib/crewai-tools/src/crewai_tools/aws/bedrock/knowledge_base/retriever_tool.py:60ToolThe knowledge-base retriever has no knowledge base unless one is passed.
BRAVE_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/brave_search_tool/base.py:126ToolThe Brave search tools cannot authenticate; brave_search_tool.py:129 indexes the variable directly and raises KeyError.
BRIGHTDATA_API_URLhttps://api.brightdata.comlib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_dataset.py:20ToolThe public Bright Data API is used.
BRIGHTDATA_DEFAULT_POLLING_INTERVAL1lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_dataset.py:23ToolDataset jobs are polled every second.
BRIGHTDATA_DEFAULT_TIMEOUT600lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_dataset.py:21ToolDataset jobs wait up to 600 seconds.
BRIGHT_DATA_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_unlocker.py:99ToolThe Bright Data tools have no key unless one is passed.
BRIGHT_DATA_ZONEnonelib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_unlocker.py:100ToolThe unlocker and SERP tools have no zone unless one is passed.
BROWSERBASE_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py:16ToolBrowserbase and Stagehand (stagehand_tool.py:208) cannot open a remote browser.
BROWSERBASE_PROJECT_IDnonelib/crewai-tools/src/crewai_tools/tools/browserbase_load_tool/browserbase_load_tool.py:17ToolAs BROWSERBASE_API_KEY.
CONTAINER_ID""lib/crewai/src/crewai/events/listeners/tracing/utils.py:386LibraryRead only when HOSTNAME is unset; the machine fingerprint for traces simply omits a container id.
CREWAI_AGENT_INPUTS"" (set by the CLI)lib/cli/src/crewai_cli/run_agent.py:38CLI plumbingSet at line 100 before the agent subprocess starts; empty means the agent runs with no inputs.
CREWAI_BEDROCK_S3_BUCKETnonelib/crewai-files/src/crewai_files/uploaders/factory.py:196FilesCreating a Bedrock file uploader raises ValueError ("Bedrock file uploads are not configured") unless bucket_name is passed.
CREWAI_BEDROCK_S3_BUCKET_OWNERnonelib/crewai-files/src/crewai_files/formatting/api.py:333FilesNo expected bucket owner is sent with S3 references.
CREWAI_CLI_RUNNER_PACKAGE_DIRnone (set by the CLI)lib/cli/src/crewai_cli/run_crew.py:87CLI plumbingRead inside the project subprocess bootstrap; the CLI always sets it, and without it the bootstrap raises KeyError.
CREWAI_DEPLOYMENT_INSTANCE_UUIDnonelib/crewai-tools/src/crewai_tools/tools/crewai_platform_tools/integrations_client.py:229ToolPlatform integration requests carry no deployment-instance header.
CREWAI_DESERIALIZE_CALLBACKS""lib/crewai/src/crewai/types/callback.py:28Library (guard)Callback references read from checkpoint data are refused rather than imported by dotted path.
CREWAI_DISABLE_TELEMETRYunsetlib/crewai-core/src/crewai_core/telemetry.py:357CoreTelemetry stays on unless OTEL_SDK_DISABLED or CREWAI_DISABLE_TRACKING is set.
CREWAI_DISABLE_VERSION_CHECK""lib/crewai/src/crewai/events/utils/console_formatter.py:75LibraryThe console checks PyPI for a newer crewai version (skipped anyway under CI).
CREWAI_DMNnonelib/cli/src/crewai_cli/utils.py:102CLIThe CLI treats the session as possibly interactive and may prompt.
CREWAI_ENTERPRISE_ACTION_AUTH_TOKENnonelib/crewai/src/crewai/context.py:47Library, ToolPlatform action tools have no integration token unless one is set in the run context; the CLI sets it (agent_tools.py:114).
CREWAI_EVAL_AWAITING_RUN""lib/crewai-core/src/crewai_core/eval_handshake.py:80Core, CLI plumbingNo evaluation is waiting on this run.
CREWAI_FACTORYfalselib/crewai-tools/src/crewai_tools/tools/crewai_platform_tools/integrations_client.py:161ToolTLS certificates are verified on platform integration calls. Set to true, it turns verification off on all four call sites (lines 161, 199, 256, 306).
CREWAI_JSON_CREW_DEFINITIONnonelib/cli/src/crewai_cli/run_crew.py:128CLI plumbingThe JSON crew runner uses its default crew file.
CREWAI_JSON_CREW_INPUTSnonelib/cli/src/crewai_cli/run_crew.py:130CLI plumbingThe JSON crew runs without inputs.
CREWAI_NL2SQL_ALLOW_DML""lib/crewai-tools/src/crewai_tools/tools/nl2sql/nl2sql_tool.py:272Tool (guard)Write statements are refused unless the tool was built with allow_dml.
CREWAI_ORGANIZATION_UUIDnonelib/crewai/src/crewai/skills/registry.py:254LibraryThe skills registry client is built without an organisation.
CREWAI_ORG_ID""lib/crewai/src/crewai/events/listeners/tracing/trace_listener.py:204Library, CLITrace context carries no organisation id; crewai traces status shows it unset (cli.py:1415).
CREWAI_PASTED_API_KEYS""lib/cli/src/crewai_cli/api_keys.py:308CLI plumbingNo keys were pasted at a prompt in this session; the CLI clears it at startup (cli.py:136).
CREWAI_PERSONAL_ACCESS_TOKENnonelib/crewai-tools/src/crewai_tools/tools/generate_crewai_automation_tool/generate_crewai_automation_tool.py:32ToolThe automation generator tool cannot authenticate to the platform unless a token is passed.
CREWAI_PLATFORM_INTEGRATION_TOKEN""lib/crewai-tools/src/crewai_tools/tools/crewai_platform_tools/misc.py:8ToolPlatform tools send an empty bearer token and the platform rejects the call.
CREWAI_PLUS_URLhttps://app.crewai.comlib/crewai-core/src/crewai_core/plus_api.py:291Core, CLI, ToolThe URL saved in settings.json is used, then https://app.crewai.com.
CREWAI_RUNNER_SOURCE_DIRnonelib/cli/src/crewai_cli/run_crew.py:66CLI plumbingNo local crewai source checkout is put first on the subprocess path; the installed package is used.
CREWAI_STORAGE_DIRname of the current directorylib/crewai-core/src/crewai_core/paths.py:13CoreStores go under the user data directory in a folder named after the working directory, so two projects with the same folder name share stores.
CREWAI_TESTING""lib/crewai/src/crewai/events/listeners/tracing/utils.py:232Library (test switch)Normal behaviour: tracing prompts may show. conftest.py:277 sets it to true for the suite.
CREWAI_TRACING_ENABLED""lib/crewai/src/crewai/events/listeners/tracing/utils.py:168Library, CLIThe user's saved choice from crewai traces enable or disable decides; false or 0 turns tracing off, true or 1 turns it on.
CREWAI_TRAINED_AGENTS_FILE_ENVtrained_agents_data.pkl (stands for CREWAI_TRAINED_AGENTS_FILE)lib/crewai/src/crewai/agent/core.py:1553Library (constant name)Agents load trained suggestions from trained_agents_data.pkl in the working directory, if present.
CREWAI_USER_IDanonymouslib/crewai/src/crewai/events/listeners/tracing/trace_listener.py:203LibraryTraces are attributed to "anonymous".
CREWAI_USER_PATnonelib/crewai/src/crewai/skills/registry.py:251LibraryFalls back to the platform integration token, then the saved CLI login token.
CREW_AWS_ACCESS_KEY_IDnonelib/crewai-tools/src/crewai_tools/aws/s3/reader_tool.py:37ToolThe S3 reader and writer tools pass no key, leaving boto3's credential chain to decide.
CREW_AWS_REGIONus-east-1lib/crewai-tools/src/crewai_tools/aws/s3/reader_tool.py:36ToolS3 tools use us-east-1.
CREW_AWS_SEC_ACCESS_KEYnonelib/crewai-tools/src/crewai_tools/aws/s3/reader_tool.py:38ToolAs CREW_AWS_ACCESS_KEY_ID.
DAYTONA_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/daytona_sandbox_tool/daytona_base_tool.py:35ToolThe Daytona sandbox tools cannot create a sandbox unless a key is passed.
DAYTONA_API_URLnonelib/crewai-tools/src/crewai_tools/tools/daytona_sandbox_tool/daytona_base_tool.py:40ToolThe Daytona SDK's default URL is used.
DAYTONA_TARGETnonelib/crewai-tools/src/crewai_tools/tools/daytona_sandbox_tool/daytona_base_tool.py:45ToolThe Daytona SDK's default target is used.
DECL_FLOW_ENV_PROBEnonelib/cli/tests/test_run_declarative_flow.py:378Test-onlyA probe the test writes to a .env file to check it is loaded.
E2B_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/e2b_sandbox_tool/e2b_base_tool.py:36ToolThe E2B sandbox tools cannot create a sandbox unless a key is passed.
E2B_DOMAINnonelib/crewai-tools/src/crewai_tools/tools/e2b_sandbox_tool/e2b_base_tool.py:43ToolThe E2B SDK's default domain is used.
ENTERPRISE_CREWAI_DEP_PATHnonelib/devtools/src/crewai_devtools/cli.py:1312DevtoolsThe release tool skips or cannot locate the enterprise dependency path to bump.
ENTERPRISE_EXTRA_PACKAGES""lib/devtools/src/crewai_devtools/cli.py:1315DevtoolsNo extra enterprise packages are bumped.
ENTERPRISE_REPOnonelib/devtools/src/crewai_devtools/cli.py:1308DevtoolsThe release tool has no enterprise repository to update.
ENTERPRISE_VERSION_DIRS""lib/devtools/src/crewai_devtools/cli.py:1310DevtoolsNo enterprise version directories are bumped.
ENTERPRISE_WORKFLOW_PATHS""lib/devtools/src/crewai_devtools/cli.py:1320DevtoolsNo enterprise workflow files are updated.
EVAL_TOKEN_ENV"" (stands for CREWAI_EVAL_AWAITING_RUN)lib/cli/src/crewai_cli/run_crew.py:913,933CLI (constant name)As CREWAI_EVAL_AWAITING_RUN: nothing to pass on to the project subprocess.
EVENT_ACTIONnone.github/workflows/ftc-require-issue.yml:111CI-onlyNot treated as a reopen, so the reopen-by-maintainer exemption does not apply.
EXA_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/exa_tools/exa_search_tool.py:58ToolThe Exa tool has no key unless one is passed.
EXA_BASE_URLnonelib/crewai-tools/src/crewai_tools/tools/exa_tools/exa_search_tool.py:63ToolThe Exa SDK's default URL is used.
FIRECRAWL_API_KEYnone ("" in the script)lib/crewai-tools/src/crewai_tools/tools/firecrawl_search_tool/firecrawl_search_tool.py:69Tool, ScriptThe three Firecrawl tools declare it as their required key; scripts/wharf_runner.py:70 sends an empty key to the Firecrawl MCP server.
FROM_THE_PROJECTnonelib/cli/tests/test_run_crew.py:1835Test-onlyA probe the test writes to a project .env to check it reaches the subprocess.
GEMINI_API_KEYnonelib/crewai/src/crewai/llms/providers/gemini/completion.py:53LLM providerSecond choice after GOOGLE_API_KEY; with neither, Gemini needs Vertex AI credentials.
GITHUB_ACTIONSnoneconftest.py:466Test-onlyThe cassette configuration takes its local, not CI, branch.
GOOGLE_API_KEYnonelib/crewai/src/crewai/llms/providers/gemini/completion.py:53LLM provider, FilesFalls back to GEMINI_API_KEY; the Gemini file uploader (crewai_files uploaders/gemini.py:108) has no key.
GOOGLE_CLOUD_LOCATIONnonelib/crewai/src/crewai/llms/providers/gemini/completion.py:108LLM providerVertex AI runs without an explicit location.
GOOGLE_CLOUD_PROJECTnonelib/crewai/src/crewai/llms/providers/gemini/completion.py:106LLM providerVertex AI mode is not selected from a project id.
GOOGLE_GENAI_USE_VERTEXAI""lib/crewai/src/crewai/llms/providers/gemini/completion.py:113LLM providerThe Gemini API, not Vertex AI, is used.
HOSTnonelib/cli/tests/test_api_keys.py:533Test-onlyAppears inside generated project source in a test fixture; no product code reads it.
HTTPS_PROXYnonelib/crewai-core/src/crewai_core/plus_api.py:160-176Core, CLIDirect connections. Platform requests take the proxy from the machine environment captured at import, never from a project .env.
HYPERBROWSER_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/hyperbrowser_load_tool/hyperbrowser_load_tool.py:49ToolThe Hyperbrowser tool has no key unless one is passed.
LINKUP_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/linkup/linkup_search_tool.py:54ToolThe Linkup tool has no key unless one is passed.
LITELLM_FAILURE_CALLBACKS""lib/crewai/src/crewai/llm.py:2716LibraryNo LiteLLM failure callbacks are registered.
LITELLM_SUCCESS_CALLBACKS""lib/crewai/src/crewai/llm.py:2709LibraryNo LiteLLM success callbacks are registered.
LOCALAPPDATAnonelib/crewai-core/src/crewai_core/token_manager.py:88Core (Windows)On Windows, the CLI has no base directory for its encrypted token store.
MANAGED_AGENT_TEST_CONFIGnonelib/cli/tests/test_run_agent.py:76Test-onlyA probe the test writes to a project .env.
MANAGED_AGENT_VALIDATION_ENVnonelib/cli/tests/test_create_agent.py:170Test-onlyA probe the test writes to a project .env.
MINDS_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/ai_mind_tool/ai_mind_tool.py:47ToolThe AI Minds tool has no key unless one is passed.
MODELnone (template: openai/gpt-6-luna)lib/crewai/src/crewai/utilities/llm_utils.py:501LibraryFalls back to MODEL_NAME, then OPENAI_MODEL_NAME, then the library default model.
MODEL_NAMEnonelib/crewai/src/crewai/utilities/llm_utils.py:502LibrarySecond model-name fallback.
MULTION_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/multion_tool/multion_tool.py:52ToolThe MultiOn tool has no key unless one is passed.
OLLAMA_API_BASEhttp://localhost:11434lib/cli/src/crewai_cli/model_catalog.py:302CLIThe model picker asks the local Ollama server on port 11434.
OLLAMA_HOSThttp://localhost:11434lib/cli/src/crewai_cli/model_catalog.py:304CLI, LLM providerAs above; also the base-URL variable of the Ollama entry in openai_compatible/completion.py:64.
OPENAI_API_BASEnonelib/crewai/src/crewai/llms/providers/openai/completion.py:430LLM providerSecond choice after OPENAI_BASE_URL; with neither, the OpenAI default endpoint.
OPENAI_API_KEYnonelib/crewai/src/crewai/llms/providers/openai/completion.py:568LLM provider, ToolBuilding an OpenAI client without an explicit key raises MissingAPIKeyError; several tools also use it for embeddings. A CI secret in agents-md-eval.yml.
OPENAI_BASE_URLnonelib/crewai/src/crewai/llms/providers/openai/completion.py:429LLM providerFalls back to OPENAI_API_BASE, then the OpenAI default.
OPENAI_MODEL_NAMEnonelib/crewai/src/crewai/utilities/llm_utils.py:503LibraryThird model-name fallback; then the library default.
OPENROUTER_API_KEYnonelib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:50LLM providerThe OpenRouter provider and embedder (openrouter_provider.py:31) have no key unless one is passed.
OPEN_ROUTER_API_KEYnonelib/crewai/tests/test_llm.py:587Test-onlyThe OpenRouter live test is skipped.
ORACLE_DB_DSNnonelib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/README.md:38Documented onlyNot read by code; the README example reads it to build a connection.
ORACLE_DB_SECRETnonelib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/README.md:37Documented onlyAs ORACLE_DB_DSN.
ORACLE_DB_USERNAMEnonelib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/README.md:36Documented onlyAs ORACLE_DB_DSN.
OTEL_SDK_DISABLEDunsetlib/crewai-core/src/crewai_core/telemetry.py:356CoreTelemetry stays on unless another opt-out is set. The OpenTelemetry SDK reads it too.
OXYLABS_PASSWORDnonelib/crewai-tools/src/crewai_tools/tools/oxylabs_base_tool/oxylabs_base_tool.py:181ToolThe Oxylabs tools have no credentials unless they are passed.
OXYLABS_USERNAMEnonelib/crewai-tools/src/crewai_tools/tools/oxylabs_base_tool/oxylabs_base_tool.py:180ToolAs OXYLABS_PASSWORD.
PARALLEL_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/parallel_tools/parallel_search_tool.py:78ToolThe Parallel search tool has no key unless one is passed.
PASTED_KEYS_ENV"" (stands for CREWAI_PASTED_API_KEYS)lib/cli/src/crewai_cli/api_keys.py:42CLI (constant name)As CREWAI_PASTED_API_KEYS.
PATRONUS_API_KEYnone ("" in the predefined-criteria tool)lib/crewai-tools/src/crewai_tools/tools/patronus_eval_tool/patronus_eval_tool.py:43Toolpatronus_eval_tool.py indexes the variable directly and raises KeyError; the predefined-criteria tool sends an empty key.
PR_NUMBERnone (set by the workflow).github/workflows/ftc-require-issue.yml:46CI-onlyKeyError in the check step.
PYTEST_VCR_RECORD_MODEonceconftest.py:458Test-onlyCassettes are recorded once and replayed after.
REDIS_URLnonelib/crewai-core/src/crewai_core/lock_store.py:33Core, Library (A2A)Locks are file locks in the system temp directory instead of Redis locks, and the A2A task cache (a2a/utils/task.py:102) stays in memory.
RELEASE_TAGthe package version.github/workflows/publish.yml:118CI-onlyThe release notification links the tag named after the version.
REPOnone (set by the workflow).github/workflows/ftc-require-issue.yml:45CI-onlyKeyError in the check step.
RUN_BEDROCK_LIVE_TESTSfalselib/crewai/tests/agents/test_native_tool_calling.py:800Test-onlyThe live Bedrock tool-calling test is skipped.
RUN_COUNTED_ENVunset (stands for CREWAI_RUN_COUNTED)lib/cli/src/crewai_cli/run_crew.py:721CLI (constant name)The project subprocess counts its own run; the CLI sets it to 1 when it has already counted (run_declarative_flow.py:587).
SCRAPEGRAPH_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/scrapegraph_scrape_tool/scrapegraph_scrape_tool.py:113ToolThe ScrapeGraph tool has no key unless one is passed.
SCRAPFLY_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/scrapfly_scrape_website_tool/scrapfly_scrape_website_tool.py:66ToolThe Scrapfly tool has no key unless one is passed.
SERPAPI_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/serpapi_tool/serpapi_base_tool.py:44ToolThe SerpApi tools have no key unless one is passed.
SERPER_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/serper_dev_tool/serper_dev_tool.py:251ToolThe Serper search tool indexes the variable directly and raises KeyError when it runs.
SERPLY_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/serply_api_tool/serply_web_search_tool.py:67ToolThe five Serply tools index the variable directly and raise KeyError.
SINGLESTOREDB_URLnonelib/crewai-tools/src/crewai_tools/tools/singlestore_search_tool/singlestore_search_tool.py:53ToolDeclared as the tool's connection variable; without it the connection comes from SINGLESTOREDB_HOST or arguments.
SNOWFLAKE_ACCOUNTnonelib/crewai/src/crewai/llms/providers/snowflake/completion.py:122LLM providerSecond account fallback after SNOWFLAKE_ACCOUNT_URL.
SNOWFLAKE_ACCOUNT_IDnonelib/crewai/src/crewai/llms/providers/snowflake/completion.py:123LLM providerThird account fallback.
SNOWFLAKE_ACCOUNT_IDENTIFIERnonelib/crewai/src/crewai/llms/providers/snowflake/completion.py:124LLM providerFourth account fallback; with none, the Snowflake client has no account URL.
SNOWFLAKE_ACCOUNT_URLnonelib/crewai/src/crewai/llms/providers/snowflake/completion.py:114LLM providerThe URL is built from an account name instead.
SSL_CERT_FILEnone (the CLI sets certifi's bundle)lib/crewai-core/src/crewai_core/plus_api.py:232Core, CLIPlatform requests use the default CA store; the CLI's provider download overwrites it with certifi's bundle (provider.py:162).
TAVILY_API_KEYnonelib/crewai-tools/src/crewai_tools/tools/tavily_search_tool/tavily_search_tool.py:61ToolThe four Tavily tools have no key unless one is passed.
TOKENIZERS_PARALLELISMfalse (written, not read)lib/crewai/src/crewai/knowledge/knowledge.py:66LibraryNot read: importing the knowledge module sets it to false for the Hugging Face tokenizers library.
TRACING_ENV_VAR(stands for CREWAI_TRACING_ENABLED)lib/cli/src/crewai_cli/experimental/eval_crew.py:77CLI (constant name)As CREWAI_TRACING_ENABLED; crewai eval refuses a project where it is false because evaluation needs the trace.
UV_RUN_RECURSION_DEPTHnonelib/cli/src/crewai_cli/run_declarative_flow.py:612CLIThe CLI concludes it is not already inside uv run.
ZAPIER_API_KEYnonelib/crewai-tools/src/crewai_tools/adapters/zapier_adapter.py:62ToolThe Zapier adapter and action tool have no key unless one is passed.
CREWAI_DISABLE_TRACKINGunsetlib/crewai-core/src/crewai_core/telemetry.py:358CoreTelemetry stays on unless another opt-out is set. Not in the evidence list; added because the source reads it.

The evidence scan matched only variables named as string literals in an accessor call or a .env sample, so it missed variables read through a tuple, a prefix test or an SDK. Reading the source turned up twelve more, in the ten rows below (one row covers three proxy variables). They are listed separately so the evidence count above stays checkable. The source therefore reads at least 163 variables, the 151 in the inventory above plus these 12, and this section carries 161 variable rows.

VariableDefaultRead atScopeWhen absent
AWS_SESSION_TOKENnonelib/crewai/src/crewai/llms/providers/bedrock/completion.py:306LLM providerNo session token; long-lived keys or boto3's chain are used.
CI""lib/crewai/src/crewai/events/utils/console_formatter.py:72LibraryThe console runs its PyPI version check (unless disabled).
HOSTNAMEnonelib/crewai/src/crewai/events/listeners/tracing/utils.py:385LibraryFalls back to CONTAINER_ID for the trace fingerprint.
SSL_CERT_DIRnonelib/crewai-core/src/crewai_core/plus_api.py:234CorePlatform requests use the default CA store.
HTTP_PROXY, ALL_PROXY, NO_PROXYnonelib/crewai-core/src/crewai_core/plus_api.py:160Core, CLIAny variable ending in _PROXY is captured from the machine environment at import; absent, connections are direct.
UV_ENV_FILEnonelib/crewai-core/src/crewai_core/plus_api.py:164CoreTreated as a transport variable because uv loads that file before Python starts.
DATABRICKS_HOSTnonelib/crewai-tools/src/crewai_tools/tools/databricks_query_tool/databricks_query_tool.py:147ToolThe Databricks tool falls back to a configured profile.
DATABRICKS_TOKENnonelib/crewai-tools/src/crewai_tools/tools/databricks_query_tool/databricks_query_tool.py:147ToolAs DATABRICKS_HOST.
SINGLESTOREDB_HOSTnonelib/crewai-tools/src/crewai_tools/tools/singlestore_search_tool/singlestore_search_tool.py:62ToolThe tool needs SINGLESTOREDB_URL or explicit arguments.
KUBERNETES_SERVICE_HOSTnonelib/crewai-core/src/crewai_core/runtime_env.py:147CoreA presence marker for the runtime context telemetry reports; absent, a container is recognised only by /.dockerenv. runtime_env.py checks dozens of similar presence markers (CI, serverless, PaaS, hosted IDE, notebook), not itemised here.

Functions named in this section

FunctionWhereWhat it does
_is_telemetry_disabledlib/crewai-core/src/crewai_core/telemetry.py:354Returns true when any of OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY or CREWAI_DISABLE_TRACKING is set to a truthy value. Every telemetry call checks it first.
_env_flag_enabledlib/crewai-core/src/crewai_core/telemetry.py:327Reads one variable as a boolean, accepting true/1/yes/on and false/0/no/off. An unrecognised value logs one warning and counts as unset.
_sets_transportlib/crewai-core/src/crewai_core/plus_api.py:153Decides whether a variable affects the proxy or CA bundle of platform requests. Those variables are frozen from the machine environment at import so a project's .env cannot redirect the saved login.
load_env_varslib/cli/src/crewai_cli/utils.py:257Reads KEY=VALUE pairs from a project folder's .env file into a dictionary.
write_env_filelib/cli/src/crewai_cli/utils.py:270Writes the API keys collected by crewai create to the project's .env with owner-only permissions. It refuses to write through a symlink.
_get_or_create_keylib/crewai-core/src/crewai_core/token_manager.py:32Loads the Fernet key from secret.key in the credential directory, or generates and writes a new one there.
save_tokenslib/crewai-core/src/crewai_core/token_manager.py:50Encrypts the access token and its expiry time and writes them atomically to tokens.enc.
get_tokenlib/crewai-core/src/crewai_core/token_manager.py:65Decrypts tokens.enc and returns the access token, or nothing if it is missing or expired.

Secrets: storage and rotation

Where secrets come from. Model and tool keys are read from the process environment or passed as constructor arguments; the library never stores them. crewai create prompts for the provider's keys and writes them to the new project's .env with owner-only permissions (write_env_file), and crewai run loads that file into the subprocess it starts. The repository holds no .env.example or other sample file and no single configuration reference: the variables a project needs are described per tool in each tool's README and in crewai_cli/constants.py's ENV_VARS prompt table, which covers model providers only.

The CLI login. crewai login runs the OAuth2 device flow and stores the access token Fernet-encrypted at rest in tokens.enc, with the key generated and kept on the same disk; section 8 ("Token storage") describes the key file, its permissions and what the encryption does and does not protect against. Organisation and platform settings live in ~/.config/crewai/settings.json, written atomically with mode 0600 into a directory tightened to 0700.

CI secrets. GitHub Actions secrets reach workflows as environment variables: PYPI_API_TOKEN as UV_PUBLISH_TOKEN in publish.yml:84 and nightly.yml:120, ANTHROPIC_API_KEY and OPENAI_API_KEY in agents-md-eval.yml, and GITHUB_TOKEN in the PR housekeeping workflows. The test workflow uses a fake OPENAI_API_KEY and replays recorded cassettes.

Rotation. Nothing in the repository rotates a secret. The only lifetime handled in code is the CLI token's expiry: get_token returns nothing once the stored expiry passes and the user must log in again. Provider and tool keys live as long as the user keeps them in the environment.

Validation. Nothing validates configuration at startup. A missing provider key surfaces when that provider's client is built (Anthropic and OpenAI raise MissingAPIKeyError), and a missing tool key surfaces when the tool is constructed or first called, some as a bare KeyError. The exceptions are the opt-in guards, which fail safe: CREWAI_DESERIALIZE_CALLBACKS and CREWAI_NL2SQL_ALLOW_DML keep the risky path off when unset. One switch goes the other way: CREWAI_FACTORY=true turns off TLS verification on all platform integration calls.

Configuration and secrets rating

Configuration and secrets: 6/10, Fair

Fair. Configuration is externalised (at least 163 environment variables: the 151 in the evidence inventory and 12 more found in the source, a pydantic settings file for the CLI, CI secrets through GitHub Actions) and the defaults are sensible. But reads are scattered through os.environ across hundreds of files with no central schema, and there is no .env.example or single configuration reference in the repository. A missing provider key surfaces only when the client is first built, and nothing rotates secrets beyond the CLI token's expiry. The technical assessment gives the reasoning per criterion.

10. Infrastructure and deployment topology

The repository deploys no runtime infrastructure. There is no Dockerfile, compose file, IaC, Procfile, Makefile or .env.example: of the 26 probed infrastructure paths only .github/workflows and pyproject.toml are present, and the product ships as PyPI packages. The repository is a uv workspace of six packages, all at version 1.15.41: crewai, crewai-core, crewai-tools, crewai-files, crewai-cli and crewai-devtools. Five of them are published; crewai-devtools is skipped by the publish loop as a private package. Once installed, the framework runs inside the developer's own Python process (supported Python is >=3.10,<3.14), so "production" is wherever the developer's application runs, and none of that is described here.

Environments

Four environments appear in the code. Only GitHub Actions is configured by this repository; the developer machine is whatever runs the installed package, and CrewAI AMP is a hosted platform that the CLI talks to but whose infrastructure lives elsewhere.

EnvironmentWhat runs thereShared with othersIsolatedHow code reaches it
Developer machineThe user's project, the installed crewai packages, the crewai CLI, and the local stores of section 11 under appdirs.user_data_dir.The same PyPI artefacts every other user installs; provider API keys from the user's own environment.Local stores are keyed by the project directory name (or CREWAI_STORAGE_DIR), so two projects on one machine do not share flow state, memory or knowledge.uv add crewai or pip install from PyPI; crewai run spawns uv run subprocesses inside the project.
GitHub Actions19 workflows: tests on Python 3.10 to 3.13 in 8 groups each with network blocked, ruff, mypy, CodeQL, pip-audit, docs link checks, repository housekeeping, and the two publish workflows.The repository, a uv cache keyed on uv.lock, and stored test durations.Secrets are scoped to GitHub environments: pypi holds the publish token, agents-md-eval holds model API keys and runs only for same-repository branches.Pull requests, pushes to main, schedules and manual dispatch (table below).
PyPIThe five published packages, plus a nightly .devYYYYMMDD pre-release of each when main has changed.Every user of the framework.Nothing environment-specific: one release serves all users.publish.yml (manual, optional release tag) and nightly.yml (daily at 06:00 UTC), both via uv publish with the PYPI_API_TOKEN secret.
CrewAI AMPDeployed crews and flows, the execution trace viewer, organisations and the tool repository. Hosted at https://app.crewai.com by default; outside this repository.The platform account and organisation the CLI is logged in to.Each deployment is a separate AMP crew identified by UUID or project name.crewai deploy create and crewai deploy push: AMP redeploys from the user's git remote, or the CLI uploads a ZIP of the project together with the variables from its .env.
configured in this repository GitHub Actions 19 workflows: tests (3.10 to 3.13 x 8 groups), ruff, mypy, CodeQL, pip-audit, housekeeping publish.yml (manual dispatch) nightly.yml (daily 06:00 UTC) package registry PyPI crewai, crewai-core, crewai-tools, crewai-files, crewai-cli release 1.15.41 and nightly .dev builds outside this repository CrewAI AMP app.crewai.com deployed crews and flows, trace viewer, organisations, tool repository wherever the developer runs Python Developer machine User project crews, flows, agents, tools, .env keys crewai packages + CLI runs in the user's process; crewai run spawns uv run Local stores (section 11) user_data_dir/<project>, ./.checkpoints, ~/.config/crewai uv publish uv add crewai git push, pull request crewai deploy git remote or ZIP + .env
Figure 10.1 · deployment topologyThe only infrastructure this repository configures is the left box. Code reaches users through PyPI, not through any server this repository deploys; the dashed arrow to CrewAI AMP crosses into a platform whose hosting is not in the repository.

How a release and a deploy travel

A release is a manual dispatch of publish.yml: it checks out the given tag (or the current ref), runs uv build --all-packages, hands the dist/ artefact to a second job in the pypi GitHub environment, publishes every wheel and sdist except crewai_devtools, and posts a Slack message built from the GitHub release notes. That job is granted id-token: write, but the upload authenticates with the PYPI_API_TOKEN secret. nightly.yml does the same each day at 06:00 UTC when main has a commit in the last 25 hours, after stamping every package and every cross-package pin with BASE.devYYYYMMDD; its uv publish --check-url skips files already on PyPI, so a same-day re-run is harmless. The maintainer console scripts bump-version, tag and release in crewai-devtools (section 3) prepare the version and tag before a dispatch.

A deploy to CrewAI AMP starts from the developer machine. deploy runs the pre-deploy validation, asks AMP how it holds the deployment's code, and then either asks AMP to redeploy from its git source (deploy_by_uuid or deploy_by_name) or builds a ZIP of the project with create_project_zip and uploads it through update_crew_from_zip together with the .env variables that fetch_and_json_env_file reads. Everything after the upload (build, hosting, scaling) happens inside AMP and is not visible here.

FunctionWhereWhat it does
deploylib/cli/src/crewai_cli/deploy/main.py:432Validates the local project, opens a deployment telemetry span, and redeploys the crew on AMP either from AMP's own source or from the local git remote or ZIP. It then prints the deployment details and opens the deployment page.
create_project_ziplib/cli/src/crewai_cli/deploy/archive.py:48Collects the project's deployable files (from git when there is a repository, otherwise by walking the directory), stages them and writes a ZIP archive. It raises an error and leaves no partial archive when nothing deployable is found.
update_crew_from_ziplib/crewai-core/src/crewai_core/plus_api.py:556Uploads a project ZIP and its environment variables to an existing AMP deployment with a POST to the crews API.
deploy_by_uuidlib/crewai-core/src/crewai_core/plus_api.py:475Asks AMP to redeploy the crew with the given UUID from the source AMP already holds, optionally forcing it while a model comparison runs.
deploy_by_namelib/crewai-core/src/crewai_core/plus_api.py:460Asks AMP to redeploy the crew with the given project name, sending the project id from [tool.crewai] when one is set.
fetch_and_json_env_filelib/cli/src/crewai_cli/utils.py:198Reads the project's .env file into a dictionary of key and value pairs, skipping blank and comment lines. It prints an error when the file is missing.
db_storage_pathlib/crewai-core/src/crewai_core/paths.py:16Returns, and creates if needed, the per-project data directory under appdirs.user_data_dir, named after the current directory or CREWAI_STORAGE_DIR.

Infrastructure files

The evidence probed 26 paths that would describe infrastructure, a pipeline or a runtime. Two are present. The absences are the description: no container image, no serverless or IaC template, no orchestration manifest and no environment sample, because the deliverable is a set of Python packages rather than a running service.

Probed infrastructure and packaging paths 26 rows
PathPresentWhat that means here
DockerfilenoNo container image is built or shipped.
docker-compose.ymlnoNo local multi-service stack; tests that need a database start their own container or are skipped.
compose.ymlnoAs above.
serverless.ymlnoNo serverless deployment.
template.ymlnoNo AWS SAM or CloudFormation template.
template.yamlnoAs above.
samconfig.tomlnoAs above.
main.tfnoNo Terraform.
terraformnoAs above.
cdk.jsonnoNo AWS CDK app.
ProcfilenoNo process definition for a PaaS.
MakefilenoBuild and test commands live in the workflows and in uv, not in make targets.
k8snoNo Kubernetes manifests.
.github/workflowsyesThe only pipeline: 19 GitHub Actions workflows, listed below.
.gitlab-ci.ymlnoNo GitLab pipeline.
JenkinsfilenoNo Jenkins pipeline.
azure-pipelines.ymlnoNo Azure DevOps pipeline.
.env.examplenoNo environment sample; variables are documented per feature (section 9).
.env.samplenoAs above.
composer.jsonnoNo PHP code.
package.jsonnoNo Node package at the root; the flow visualisation's JavaScript is a static asset inside the crewai package.
pyproject.tomlyesThe uv workspace root: members under lib/, ruff, mypy and pytest settings, and the exclude-newer = "3 days" resolution cooldown.
go.modnoNo Go code.
Cargo.tomlnoNo Rust code.
pom.xmlnoNo Java code.
.gitattributesnoNo line-ending or LFS rules.

Workflows

The 19 workflows fall into four groups: quality gates on pull requests (tests, lint, types, CodeQL, pip-audit, docs links, AGENTS.md guards), release (publish and nightly), cache and spec maintenance, and contributor housekeeping.

GitHub Actions workflows 19 rows
WorkflowTriggerWhat it does
tests.ymlpull requestRuns pytest on Python 3.10, 3.11, 3.12 and 3.13, each split into 8 groups by stored durations, with network blocked, 60 s timeouts and random order.
linter.ymlpull requestWhen code changed, runs ruff check and ruff format --check over lib/.
type-checker.ymlpull requestRuns mypy (strict, with the pydantic plugin) over lib/.
codeql.ymlpull request and push to main, ignoring CLI templatesRuns GitHub CodeQL static analysis.
vulnerability-scan.ymlpull request, push to main, weekly Monday 09:00 UTCInstalls every group and extra and runs pip-audit over the resolved dependencies, uploading the report.
docs-broken-links.ymlpull request or push to main touching docs/, manualPrunes all but the edge and default doc versions, then runs mint broken-links over the documentation site.
agents-md.ymlpull request to main touching CLI templates, the eval or linked docsRuns the AGENTS.md guard tests in the CLI suite and the eval's own tests.
agents-md-eval.ymlpull_request_target to main touching the template AGENTS.md or CLAUDE.mdFor same-repository branches only, runs the devtools AGENTS.md eval against four coding-agent models using API keys held in the agents-md-eval environment.
publish.ymlmanual dispatch, optional release tagBuilds all packages and publishes all but crewai-devtools to PyPI with PYPI_API_TOKEN, then posts the release to Slack.
nightly.ymldaily 06:00 UTC, manualWhen main changed in the last 25 hours, stamps a .devYYYYMMDD version on every package and pin, builds, and publishes idempotently to PyPI.
build-uv-cache.ymlpush to main touching uv.lock or pyproject.toml, every 5 days, manualInstalls every dependency group and extra for Python 3.10 to 3.13 and saves the uv cache the other workflows restore, so it does not expire between runs.
update-test-durations.ymlpush to main touching test files, manualRuns the full suite with --store-durations and caches the durations the test matrix uses to balance its groups.
generate-tool-specs.ymlpull request to main touching crewai-tools, manualRegenerates lib/crewai-tools/tool.specs.json and commits it back to the branch when it changed.
pr-title.ymlpull request opened, edited, synchronised or reopenedChecks for a semantic (conventional commit) pull request title; it runs with continue-on-error, so a bad title is reported without failing the workflow.
pr-size.ymlpull request opened, synchronised or reopenedLabels the pull request by diff size.
ftc-require-issue.ymlpull_request_target opened, edited or reopenedFor first-time contributors (authors who are not members, collaborators or past contributors), requires the pull request to reference an open issue; authors with write access are exempt.
first-contributor-welcome.ymlpull_request_target closedComments once to welcome a first-time contributor when their pull request is merged.
close-associated-prs.ymlissue closedWhen an issue is closed as completed by someone with triage or higher permission, closes the open pull requests associated with it.
stale.ymldaily 12:10 UTC, manualMarks issues stale after 30 days and closes them 5 days later; marks pull requests stale after 45 days without closing them.

11. Data and persistence

CrewAI has no server and no shared database. Every store is local to the machine running the developer's process, single-purpose, and created on first use. Nine stores: flow state SQLite (flow_states.db), kickoff task outputs SQLite (latest_kickoff_task_outputs.db), checkpoint store (JSON files under ./.checkpoints by default, a SQLite checkpoints table when CheckpointConfig is given the SQLite provider), memory store (LanceDB table memories by default, Qdrant Edge optional), knowledge store (ChromaDB collections named knowledge_<collection_name>, or just knowledge when no collection name is given), CLI settings file, CLI token store, training pickles (training_data.pkl, trained_agents_data.pkl), and file upload cache (aiocache, in memory with TTL).

SQLite stores live under appdirs.user_data_dir keyed by the project directory name or CREWAI_STORAGE_DIR, run in WAL mode with busy timeouts. The LanceDB and ChromaDB directories sit under the same per-project directory. Writes that several processes could race on are also serialised by a named lock from crewai_core.lock_store: a file lock in the system temp directory, or a Redis lock when REDIS_URL is set and the redis package is installed.

The checkpoint store is not chosen by the location's suffix. CheckpointConfig uses JsonProvider unless its provider field is set to SqliteProvider; with the SQLite provider, a location without a suffix gets .db appended (lib/crewai/src/crewai/state/checkpoint_config.py:177-201). On restore, detect_provider picks SQLite by reading the file's SQLite magic bytes, not its name (lib/crewai/src/crewai/state/provider/utils.py:11-33). The knowledge collection name is built in lib/crewai/src/crewai/knowledge/storage/knowledge_storage.py:71-75.

A tenth small local file exists beside the nine: .crewai_user.json in the per-project data directory, holding the trace consent flags written by crewai traces enable/disable and the first-run prompt (lib/crewai-core/src/crewai_core/user_data.py:23-26; lib/cli/src/crewai_cli/cli.py:1463,1484). It is listed in the files table below but not counted as a store.

Stores

StoreTechnology and locationWhat it holdsWritten and read byRetention
Flow state storeSQLite flow_states.db under the per-project data directory; tables flow_states and pending_feedback. The default behind default_flow_persistence; replaceable through set_flow_persistence_factory.A JSON snapshot of a flow's state after each persisted method, and one paused-for-feedback record per flow with its context and state.Flows decorated with @persist and the human feedback pause; read back when a flow is restored by id, forked, or resumed with feedback.None. Every snapshot is kept; only the pending feedback row is deleted when the flow resumes.
Kickoff task outputs storeSQLite latest_kickoff_task_outputs.db under the per-project data directory; table latest_kickoff_task_outputs.For the latest crew kickoff: each task's id, key, expected output, output, index, inputs and whether it was replayed.Crew through TaskOutputStorageHandler after each task; read by crew replay and by crewai log-tasks-outputs.Overwritten: the table is cleared at the start of each kickoff, so it only ever holds the last run.
Checkpoint storeJSON files under ./.checkpoints/<branch>/ (relative to the working directory) by default, or a SQLite checkpoints table with the SQLite provider (chosen by the provider field, not the file suffix).The serialised runtime state of a crew, flow or agent at each configured event (by default task_completed), with branch and parent lineage.The checkpoint listener on the event bus; read by restore and fork, and by the crewai checkpoint commands.Keeps everything unless max_checkpoints is set, in which case the oldest on the branch are pruned after each write; the CLI can also prune by count or age.
Memory storeLanceDB at <data dir>/memory, table memories; Qdrant Edge shards under memory/qdrant-edge as an option; any backend registered through set_memory_storage_factory.Memory records: content, scope path, categories, metadata, importance, timestamps, source, a private flag and the embedding vector.Memory (unified memory), from agents and crews with memory enabled; saves run on a background worker.None automatic. Records stay until deleted by scope, category, id or age, or until the store is reset (crewai reset-memories).
Knowledge storeChromaDB persistent client in the per-project data directory (the default RAG config); Qdrant is the alternative RAG client.Chunks of the documents given to knowledge sources, with their embeddings, one collection per knowledge source name.Knowledge sources on agents and crews save chunks; agents query it before a task.None automatic; a collection is dropped by reset.
CLI settings fileJSON ~/.config/crewai/settings.json, falling back to the temp directory or the working directory when that is not writable; written atomically with mode 0600.AMP base URL, active organisation name and UUID, OAuth2 provider settings, and tool repository username and password.The crewai CLI (its config, org, login and enterprise commands).Until reset or cleared by the CLI.
CLI token storeFernet-encrypted tokens.enc plus its key secret.key in ~/.local/share/crewai/credentials (platform equivalent on macOS and Windows), directory 0700, files 0600.The platform access token and its expiry.The CLI after OAuth2 device login; read by every PlusAPI call.Ignored once expired; deleted on logout or settings reset.
Training picklesPickle files in the current working directory: training_data.pkl and the trained agents file (default trained_agents_data.pkl, name settable from the CLI).Per-agent training iterations: initial outputs, human feedback and improved outputs, and the distilled suggestions agents load at kickoff.crewai train and the crew's train method; read by agents when a trained agents file exists.The training file is reinitialised at the start of each training run; the trained agents file is kept.
File upload cacheaiocache in process memory by default (Redis optional), namespace crewai_uploads, 24 h TTL, at most 1000 entries.Which file (by content hash) has already been uploaded to which LLM provider, with the provider's file id, URI and expiry.crewai-files uploaders before sending a file to a provider.TTL or the provider's own expiry; oldest entries evicted past the cap; lost when the process exits unless Redis is used.

Keys and indexes

Each row is a key or index and the access pattern it serves. The JSON checkpoint store, the settings and token files, the training pickles and the upload cache have no index: the file name or cache key is the only lookup, as the last two rows show for the two that encode one.

StoreKey or indexKindAccess pattern it serves
Flow state storeflow_states.idINTEGER primary key, autoincrementOrders snapshots so the latest for a flow is ORDER BY id DESC; fetches one historical snapshot by row id together with the flow UUID.
Flow state storeidx_flow_states_uuidIndex on flow_states(flow_uuid)Finds a flow's snapshots by flow UUID when restoring or forking.
Flow state storepending_feedback.idINTEGER primary key, autoincrementRow identity only; no query reads by it.
Flow state storepending_feedback.flow_uuidUNIQUE constraintKeeps at most one pending feedback record per flow, so INSERT OR REPLACE overwrites a previous pause.
Flow state storeidx_pending_feedback_uuidIndex on the flow_uuid column of the pending_feedback tableLooks up and deletes the pending record by flow UUID on resume. It covers the same column as the index SQLite builds for the UNIQUE constraint.
Kickoff task outputs storelatest_kickoff_task_outputs.task_idTEXT primary keyOne row per task, replaced on re-run. Updates match on task_index and reads order by it, which has no index; the table holds one crew's tasks.
Checkpoint store (SQLite)checkpoints.idTEXT primary key, <timestamp>_<uuid8>Loads one checkpoint addressed as db_path#id. The branch and parent_id fields are plain columns: pruning by branch and listing scan the table.
Memory storememories.scopeLanceDB BTREE scalar indexFilters vector search, listing, counting and deletion by scope prefix. There is no approximate vector index: similarity search is a full scan of the table.
Knowledge storeknowledge_<collection_name> collectionsNo declared indexSimilarity search per collection; CrewAI declares nothing and relies on ChromaDB's internal vector index.
Checkpoint store (JSON)<branch>/<ts>_<uuid8>_p-<parent>.jsonFile nameLineage and ordering are read from the file name and modification time; pruning sorts a branch directory by mtime.
File upload cacheupload:<provider>:<file hash>Cache keySkips re-uploading a file whose content hash has already been uploaded to the same provider.

Files that touch a store

The evidence found eight files with a table definition or storage client; five of them are tests or a tool writing to the user's own database (the Oracle vector search tool). The table adds the source files that hold the other stores, and the two CLI modules that read the SQLite files with their own SQL so the CLI does not have to import the crewai framework. The functions named are described one by one in the table after it.

Files that touch a store 19 rows
FileStoreFunctions that touch itWhat it does
lib/crewai/src/crewai/flow/persistence/sqlite.pyFlow state storeinit_db, save_state, load_state, load_state_from_history, save_pending_feedback, load_pending_feedback, clear_pending_feedbackImplements FlowPersistence on SQLite: creates the schema with retry while locked, appends state snapshots and keeps the pending feedback record.
lib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.pyKickoff task outputs store_initialize_db, add, update, load, delete_allStores the latest kickoff's task outputs for replay, adding a missing column on open.
lib/crewai/src/crewai/state/provider/sqlite_provider.pyCheckpoint store (SQLite)checkpoint, acheckpoint, prune, from_checkpointThe SQLite BaseProvider: inserts, prunes and reads checkpoint rows, sync and async.
lib/crewai/src/crewai/state/provider/json_provider.pyCheckpoint store (JSON)checkpoint, prune, from_checkpointThe default BaseProvider: one JSON file per checkpoint under a branch directory.
lib/crewai/src/crewai/state/provider/utils.pyCheckpoint storedetect_providerChooses the provider for a checkpoint being restored.
lib/crewai/src/crewai/memory/storage/lancedb_storage.pyMemory storesave, search, delete, reset, _ensure_scope_index, _compact_asyncThe default StorageBackend on LanceDB, with a scope index and background compaction.
lib/crewai/src/crewai/knowledge/storage/knowledge_storage.pyKnowledge storesave, search, resetWrites and queries knowledge chunks through the RAG client, ChromaDB by default.
lib/crewai-core/src/crewai_core/token_manager.pyCLI token store_get_or_create_key, save_tokens, get_token, clear_tokensKeeps the platform access token encrypted on disk with a locally generated key.
lib/crewai-core/src/crewai_core/settings.pyCLI settings fileget_writable_config_path, dumpFinds a writable settings location and saves the CLI settings model to it.
lib/crewai-core/src/crewai_core/user_data.pyTrace consent file (not counted as a store)update_user_dataRead-modify-writes .crewai_user.json under a file lock.
lib/crewai/src/crewai/utilities/file_handler.pyTraining picklessave, load (on PickleHandler)Pickles and unpickles training data in the working directory under a file lock.
lib/crewai-files/src/crewai_files/cache/upload_cache.pyFile upload cacheaset, aget, aclear_expiredTracks provider uploads by content hash in an aiocache backend with TTL and a size cap.
lib/cli/src/crewai_cli/task_outputs.pyKickoff task outputs storeload_task_outputsReads the task outputs database directly for the CLI.
lib/cli/src/crewai_cli/checkpoint_cli.pyCheckpoint store_list_sqlite, _prune_sqliteLists and prunes SQLite checkpoints with its own copy of the queries.
lib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/vector_search.pyUser's Oracle database (not a CrewAI store)create_table, add_textsCreates a vector table in the user's Oracle database and inserts embedded texts into it.
lib/crewai/tests/test_checkpoint_cli.pyCheckpoint store (test fixture)_create_sqlite_checkpointBuilds a SQLite checkpoint database for CLI tests, repeating the production schema.
lib/crewai-tools/tests/tools/singlestore_search_tool_test.pyTest SingleStore databasesample_table_setupCreates sample tables in a containerised SingleStore for the search tool tests.
lib/crewai-tools/tests/tools/test_nl2sql_security.pyThrowaway SQLite databasestest_write_statements_blocked_by_default, test_dml_actually_persists, test_commented_write_is_committed_when_dml_is_allowedExercises the NL2SQL read-only guard against real SQLite files.
lib/crewai-files/tests/test_bedrock_async_client.pyStubbed S3 (test double)upload_fileobj, delete_object (on _StubS3Client)Stands in for S3 so the Bedrock uploader can be tested without AWS.
Store functions, one row each 59 rows
FunctionWhereWhat it does
init_dblib/crewai/src/crewai/flow/persistence/sqlite.py:91Creates the flow state tables and indexes, retrying for up to 30 s while another process holds the database locked.
save_statelib/crewai/src/crewai/flow/persistence/sqlite.py:193Appends a JSON snapshot of the flow's state for a method under the store lock.
load_statelib/crewai/src/crewai/flow/persistence/sqlite.py:217Returns the most recent saved state for a flow UUID, or None.
load_state_from_historylib/crewai/src/crewai/flow/persistence/sqlite.py:249Returns one historical snapshot of a flow by its row id, or None when the flow has no such row.
save_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:285In one transaction, appends a state snapshot and replaces the flow's pending feedback record with the pause context and state.
load_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:329Returns the saved state and pause context of a flow waiting for feedback, or None.
clear_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:368Deletes a flow's pending feedback record once it has resumed.
default_flow_persistencelib/crewai/src/crewai/flow/persistence/factory.py:48Returns the persistence backend from the registered factory, or a new SQLite flow persistence when none is registered.
set_flow_persistence_factorylib/crewai/src/crewai/flow/persistence/factory.py:31Registers a process-wide factory that supplies the default flow persistence backend.
_initialize_dblib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:32Creates the task outputs table in WAL mode and adds the task_key column to an older table that lacks it.
addlib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:78Inserts or replaces one task's output, inputs and replay flag.
updatelib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:126Updates the given columns of the row with a task index.
loadlib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:175Returns every stored task output ordered by task index.
delete_alllib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:217Empties the task outputs table.
load_task_outputslib/cli/src/crewai_cli/task_outputs.py:22Opens the task outputs database directly and returns its rows for the CLI to print.
checkpointlib/crewai/src/crewai/state/provider/sqlite_provider.py:59Creates the checkpoints table if needed and inserts one checkpoint row, returning db_path#id.
acheckpointlib/crewai/src/crewai/state/provider/sqlite_provider.py:87The async version of the SQLite checkpoint write, using aiosqlite.
prunelib/crewai/src/crewai/state/provider/sqlite_provider.py:115Deletes the oldest checkpoint rows on a branch beyond the number to keep.
from_checkpointlib/crewai/src/crewai/state/provider/sqlite_provider.py:127Reads the JSON of the checkpoint addressed by db_path#id.
checkpointlib/crewai/src/crewai/state/provider/json_provider.py:42Writes the checkpoint JSON to a new timestamped file under the branch directory and returns its path.
prunelib/crewai/src/crewai/state/provider/json_provider.py:98Deletes the oldest JSON checkpoint files on a branch, by modification time, beyond the number to keep.
from_checkpointlib/crewai/src/crewai/state/provider/json_provider.py:123Reads a JSON checkpoint file and returns its contents.
detect_providerlib/crewai/src/crewai/state/provider/utils.py:11Returns the SQLite provider when the file (before any #) starts with the SQLite magic bytes, and the JSON provider otherwise.
_list_sqlitelib/cli/src/crewai_cli/checkpoint_cli.py:291Lists the checkpoints in a SQLite checkpoint database for the CLI.
_prune_sqlitelib/cli/src/crewai_cli/checkpoint_cli.py:689Deletes SQLite checkpoints beyond a count or older than an age, for crewai checkpoint pruning.
savelib/crewai/src/crewai/memory/storage/lancedb_storage.py:314Adds memory records to the LanceDB table, creating it on first save, and starts a background compaction every 100 saves.
searchlib/crewai/src/crewai/memory/storage/lancedb_storage.py:395Runs a vector similarity search, optionally filtered by scope prefix, then filters by category and metadata and converts distance to a score.
deletelib/crewai/src/crewai/memory/storage/lancedb_storage.py:433Deletes memory records by scope, category, id, age or metadata under the store lock, returning how many went.
resetlib/crewai/src/crewai/memory/storage/lancedb_storage.py:649Drops the whole table, or deletes the records under a scope prefix.
_ensure_scope_indexlib/crewai/src/crewai/memory/storage/lancedb_storage.py:208Creates the BTREE scalar index on the scope column if it is not already there.
_compact_asynclib/crewai/src/crewai/memory/storage/lancedb_storage.py:238Starts a daemon thread that runs LanceDB's optimise to merge fragment files, ignoring failures.
set_memory_storage_factorylib/crewai/src/crewai/memory/storage/factory.py:33Registers a process-wide factory that turns a storage name into a custom memory backend.
resolve_memory_storagelib/crewai/src/crewai/memory/storage/factory.py:48Asks the registered factory for a backend for a storage name, returning None when there is no factory or it declines.
savelib/crewai/src/crewai/knowledge/storage/knowledge_storage.py:105Gets or creates the knowledge collection and adds the document chunks to it.
searchlib/crewai/src/crewai/knowledge/storage/knowledge_storage.py:59Queries the knowledge collection for the chunks closest to the query text.
resetlib/crewai/src/crewai/knowledge/storage/knowledge_storage.py:91Deletes the knowledge collection.
_get_or_create_keylib/crewai-core/src/crewai_core/token_manager.py:32Reads the Fernet key from secret.key, or generates one and creates the file exclusively with mode 0600.
save_tokenslib/crewai-core/src/crewai_core/token_manager.py:50Encrypts the access token and its expiry and writes them atomically to tokens.enc.
get_tokenlib/crewai-core/src/crewai_core/token_manager.py:65Decrypts the stored token and returns it, or None when it is missing or expired.
clear_tokenslib/crewai-core/src/crewai_core/token_manager.py:80Deletes the token file.
get_writable_config_pathlib/crewai-core/src/crewai_core/settings.py:76Returns the first writable settings location among the home config directory, the temp directory and the working directory.
dumplib/crewai-core/src/crewai_core/settings.py:246Merges the settings that were set into the existing file and writes it atomically with mode 0600, ignoring any error.
update_user_datalib/crewai-core/src/crewai_core/user_data.py:54Merges updates into .crewai_user.json under a file lock.
savelib/crewai/src/crewai/utilities/file_handler.py:144Pickles data to the handler's file in the working directory under a file lock.
loadlib/crewai/src/crewai/utilities/file_handler.py:155Unpickles the handler's file, returning an empty dictionary when it is missing or empty.
asetlib/crewai-files/src/crewai_files/cache/upload_cache.py:232Records that a file was uploaded to a provider, keyed by content hash, with the TTL or the provider's expiry.
agetlib/crewai-files/src/crewai_files/cache/upload_cache.py:192Returns the cached upload for a file and provider, or None when absent or expired.
aclear_expiredlib/crewai-files/src/crewai_files/cache/upload_cache.py:347Removes every cached upload whose expiry has passed and returns how many it removed.
locklib/crewai-core/src/crewai_core/lock_store.py:80Holds a named lock for the duration of a block: a custom backend if one is set, a Redis lock when REDIS_URL is set, otherwise a file lock in the temp directory, with a 120 s default timeout.
db_storage_pathlib/crewai-core/src/crewai_core/paths.py:16Returns, and creates if needed, the per-project data directory under appdirs.user_data_dir.
create_tablelib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/vector_search.py:693Creates the tool's vector table (id, text, JSON metadata, embedding) in the user's Oracle database if it does not exist.
add_textslib/crewai-tools/src/crewai_tools/tools/oracle_vector_search_tool/vector_search.py:805Embeds texts and inserts them with their metadata into the Oracle vector table, returning their ids.
_create_sqlite_checkpointlib/crewai/tests/test_checkpoint_cli.py:94Test helper that creates a checkpoints table and inserts one checkpoint row.
sample_table_setuplib/crewai-tools/tests/tools/singlestore_search_tool_test.py:45Test fixture that creates and fills employee and department tables in the test SingleStore database.
test_write_statements_blocked_by_defaultlib/crewai-tools/tests/tools/test_nl2sql_security.py:60Checks that each write or DDL statement, including CREATE TABLE, is refused in read-only mode.
test_dml_actually_persistslib/crewai-tools/tests/tools/test_nl2sql_security.py:97Checks against a file-based SQLite database that an insert is committed when DML is allowed.
test_commented_write_is_committed_when_dml_is_allowedlib/crewai-tools/tests/tools/test_nl2sql_security.py:667Checks that a delete written with an inline comment is still committed when DML is allowed.
upload_fileobjlib/crewai-files/tests/test_bedrock_async_client.py:22Test double that records an S3 upload instead of performing it.
delete_objectlib/crewai-files/tests/test_bedrock_async_client.py:27Test double that records an S3 delete instead of performing it.

Personal data

No store has a column designed for personal data: there are no user, email or account tables. The stores do, however, hold whatever the developer's users and agents put into a run, in plain text on local disk with no encryption: prompts and task inputs and outputs (task outputs store, checkpoints, flow state snapshots and pending feedback context), remembered facts extracted from conversations (memory store), the documents given to knowledge sources (knowledge store), and human feedback typed during training (training pickles). Any of these can contain personal data, and none has a retention limit. The CLI keeps the developer's own platform access token (encrypted, with the key on the same disk), and the settings file keeps the active organisation and, when set, the tool repository username and password in plain JSON with mode 0600. Nothing personal is stored remotely by these stores; what leaves the machine as telemetry and traces is covered in sections 12 and 16.

Layers and tiers

Data access sits behind its own layer. Callers in Crew, Flow, Memory and the knowledge classes never issue SQL or open store files themselves; they go through four abstractions, each with a replaceable backend:

LayerInterfaceDefault backendHow it is replaced
Flow persistenceFlowPersistence (abstract base)SQLite flow persistencePass persistence= to a flow or @persist, or register a factory with set_flow_persistence_factory.
Memory storageStorageBackend (protocol)LanceDBstorage="qdrant-edge", a path, an instance, or a name resolved by set_memory_storage_factory.
CheckpointsBaseProvider (abstract base)JSON filesprovider=SqliteProvider() on CheckpointConfig; restore picks the provider with detect_provider.
Knowledge and RAGKnowledgeStorage over the RAG BaseClientChromaDBThe RAG config (Qdrant is the shipped alternative) or a custom embedder per knowledge source.

Task outputs sit behind TaskOutputStorageHandler without a replaceable backend. Three places bypass the layers: the CLI token and settings files are read and written by their own classes in crewai-core, the training pickles go through PickleHandler, and the CLI's task output and checkpoint commands open the SQLite files directly with their own copy of the queries. Schema changes are handled in code at open time (CREATE TABLE IF NOT EXISTS, and one ALTER TABLE when the task_key column is missing); there is no migration tool.

There is one storage tier per store: a local primary on disk. The only cache tier is the in-memory file upload cache (Redis when configured), plus the in-process tool result cache described in section 15. There is no archive or cold tier, no backup copy, and no search or analytics copy; the memory and knowledge stores are vector search stores in their own right, not copies of another store. The execution traces sent to CrewAI AMP are an outbound event stream rather than a replica of any store here.

Data and persistence rating

Data and persistence: 6/10, Fair

Fair. Data access sits behind storage abstractions (StorageBackend, BaseProvider, FlowPersistence, KnowledgeStorage) with pluggable backends; SQLite runs in WAL with busy timeouts and indexes on the lookup keys, LanceDB has a scope index and compaction, and checkpoints prune by branch. Schema evolution is ad hoc (an ALTER TABLE when a column is missing), flow state and memory have no retention or lifecycle, user content is stored unencrypted on local disk, and training data is pickled. The technical assessment gives the reasoning per criterion.

12. External integrations

CrewAI is a framework whose job is to call other services: LLM providers to think, tool APIs to act, and optionally the CrewAI AMP platform to deploy, trace and share. It runs no queue, scheduler or object store of its own, so its integrations are outbound HTTP calls made from the developer's process, almost all through a vendor SDK or httpx/requests. Four groups matter at run time.

The evidence counted 446 distinct hosts and SDK clients, and the inventory below has one row for each. Most are not integrations at all. The kind column says what each is, from the evidence's own outbound classification and a read of where each name appears. These kinds group the 446-item list; they are not the evidence's outbound split used under Outbound calls below (76 called from code, 270 named only in tests, 10 local or private, 4 only in comments), which counts a smaller set of hosts. Only the 76 carries over unchanged, so the other counts differ between the two lists.

Integrations and named hosts 446 rows
Host or clientKindWhat breaks when it is down
10.0.0.1Local or privateNothing: a private address used as a test value for the SSRF guard and runtime detection.
10.0.0.5Local or privateNothing: a test value for OLLAMA_HOST in the model catalog tests.
169.254.169.254Local or privateNothing: the cloud metadata address, named as a target the guards must refuse.
172.16.0.1Local or privateNothing: a private address used as a test value.
192.168.1.1Local or privateNothing: a private address used as a test value.
192.168.1.5Local or privateNothing: a private address used as a test value.
2p66nmmycsj3.statuspage.ioTest fixtureNothing: recorded test data; tests run with the network blocked.
a.nel.cloudflare.comTest fixtureNothing: recorded test data.
a2a-protocol.orgCalled from codeNothing: a specification link in A2A extension docstrings, never contacted.
a2ui.orgCalled from codeNothing: A2UI extension URIs and JSON schema ids are identifiers, never fetched.
about.meta.comTest fixtureNothing: recorded test data.
accounts.google.comTest fixtureNothing: recorded test data.
acct.snowflakecomputing.comPlaceholder or exampleNothing: a made-up Snowflake account in tests.
actions.zapier.comCalled from codeThe Zapier adapter cannot list or run Zapier AI actions.
agent.example.comPlaceholder or exampleNothing: an example A2A agent URL.
agentops.aiTest fixtureNothing: recorded test data.
ah-api.merge.devCalled from codeThe Merge Agent Handler tool cannot list or call its tools.
ah.merge.devDocumentation linkNothing at run time: a link in the tool's README.
ai.devCalled from codeNothing: prompt text telling the user where to get a Gemini key.
ai.stanford.eduTest fixtureNothing: recorded test data.
aiplatform.googleapis.comTest fixtureNothing: recorded Vertex AI test data; at run time the Google SDK reaches Vertex AI without the host being named here.
allenai.orgTest fixtureNothing: recorded test data.
amp.examplePlaceholder or exampleNothing: a made-up platform URL in tests.
amp.exportedPlaceholder or exampleNothing: a made-up platform URL in tests.
amp.internalPlaceholder or exampleNothing: a made-up platform URL in tests.
amp.localhostPlaceholder or exampleNothing: a made-up platform URL in tests.
amp.project.testPlaceholder or exampleNothing: a made-up platform URL in tests.
amp.testPlaceholder or exampleNothing: a made-up platform URL in tests.
analytics.python.orgTest fixtureNothing: recorded test data.
another-domain.auth0.comPlaceholder or exampleNothing: a made-up Auth0 tenant in login tests.
another-domain.okta.comPlaceholder or exampleNothing: a made-up Okta tenant in login tests.
anywhere.examplePlaceholder or exampleNothing: a test value.
api-base.openai.comPlaceholder or exampleNothing: a made-up base URL in tests.
api.agentops.aiTest fixtureNothing: recorded test data.
api.ah.merge.devDocumentation linkNothing at run time: a link in the Merge tool README.
api.anthropic.comCalled from codeThe CLI model picker cannot list Anthropic models (it falls back to a curated list); Anthropic LLM calls through the SDK fail.
api.brightdata.comCalled from codeThe Bright Data dataset, SERP and unlocker tools fail.
api.cerebras.aiCalled from codeCerebras LLM calls fail and the model picker cannot list Cerebras models.
api.contextual.aiCalled from codeThe Contextual AI parse, query and rerank tools fail.
api.deepinfra.comCalled from codeDeepInfra LLM calls fail.
api.deepseek.comCalled from codeDeepSeek LLM calls fail.
api.exa.aiTest fixtureNothing: recorded test data; the Exa tool reaches Exa through its SDK.
api.example.comPlaceholder or exampleNothing: an example URL.
api.example.testPlaceholder or exampleNothing: an example URL.
api.firecrawl.devTest fixtureNothing in tests; at run time the Firecrawl tools reach it through the Firecrawl SDK and fail if it is down.
api.github.comCalled from codecrewai template list and crewai template add cannot list or download templates.
api.groq.comCalled from codeThe model picker cannot list Groq models and falls back to its curated list.
api.hubspot.comTest fixtureNothing: recorded test data.
api.openai.comCalled from codeOpenAI LLM and embedding calls fail; the model picker falls back to its curated list.
api.parallel.aiCalled from codeThe Parallel search tool fails.
api.patronus.aiCalled from codeThe Patronus evaluation tools fail.
api.pwnedpasswords.comTest fixtureNothing: recorded test data.
api.scarf.shTest fixtureNothing: recorded test data.
api.search.brave.comCalled from codeThe Brave search tools fail.
api.serply.ioCalled from codeThe five Serply tools fail.
api.stagehand.browserbase.comCalled from codeThe Stagehand tool cannot reach its API server.
api.star-history.comTest fixtureNothing: recorded test data.
api.weather.comCalled from codeNothing: an example MCP reference in a docstring.
api.whatsapp.comTest fixtureNothing: recorded test data.
api.workos.comTest fixtureNothing in tests; WorkOS is the default login provider, reached at run time through the configured login domain.
apify.comDocumentation linkNothing at run time: a link in the Apify tool README.
app.agentops.aiTest fixtureNothing: recorded test data.
app.composio.devDocumentation linkNothing at run time: a link in a tool README.
app.contextual.aiDocumentation linkNothing at run time: a link in a tool README.
app.crewai.comCalled from codeCLI login, deploy, tool and skill publishing, platform tools and trace upload fail; local runs continue.
app.hubspot.comTest fixtureNothing: recorded test data.
app.hyperbrowser.aiCalled from codeNothing: a sign-up link in a docstring.
arxiv.orgTest fixtureNothing: recorded test data.
astral.shDocumentation linkNothing at run time: the uv install script URL in the README.
attacker.examplePlaceholder or exampleNothing: a hostile-looking host used to test the guards.
attacker.testPlaceholder or exampleNothing: a hostile-looking host used to test the guards.
auth.company.comPlaceholder or exampleNothing: a made-up identity provider in tests.
auth.enterprise.comPlaceholder or exampleNothing: a made-up identity provider in tests.
auth.example.comPlaceholder or exampleNothing: a made-up identity provider in tests.
avatars.githubusercontent.comTest fixtureNothing: recorded test data.
base-url.openai.comPlaceholder or exampleNothing: a made-up base URL in tests.
bat.bing.comTest fixtureNothing: recorded test data.
bedrock-runtime.us-east-1.amazonaws.comTest fixtureNothing in tests; at run time boto3 reaches the regional Bedrock endpoint without the host being named here.
bedrock-runtime.us-west-2.amazonaws.comTest fixtureNothing: recorded Bedrock test data.
bedrock-runtime.vcr.amazonaws.comPlaceholder or exampleNothing: conftest.py rewrites recorded Bedrock hosts to this placeholder.
blog.apify.comDocumentation linkNothing at run time: a README link.
blog.crewai.comDocumentation linkNothing at run time: a README link.
blogs.microsoft.comTest fixtureNothing: recorded test data.
boto3SDK clientThe AWS SDK: Bedrock LLM calls, the Bedrock knowledge base and agent tools, the S3 reader and writer tools and Bedrock file uploads fail when AWS is unreachable.
brightdata.comDocumentation linkNothing at run time: a README link.
browserbase.comDocumentation linkNothing at run time: a README link.
bucket.examplePlaceholder or exampleNothing: a made-up bucket in tests.
bucket.r2.cloudflarestorage.comCalled from codeNothing: a presigned-URL example in a docstring.
camo.githubusercontent.comTest fixtureNothing: recorded test data.
cdn.example.comPlaceholder or exampleNothing: an example URL.
cdn.jsdelivr.netTest fixtureNothing: recorded test data.
cdn.theconversation.comTest fixtureNothing: recorded test data.
cdnjs.cloudflare.comCalled from codeThe flow visualisation page cannot export to PNG or PDF (html2canvas and jspdf do not load); the graph still renders.
cerebras.aiCalled from codeNothing: a link in a docstring's provider list.
chatg.ptDocumentation linkNothing at run time: a link in a project template README.
checkout.stripe.comTest fixtureNothing: recorded test data.
cli.github.comCalled from codeNothing: an install hint printed by the release tool.
cloud.google.comTest fixtureNothing: recorded test data and one docs link in a comment.
cognitiveservices.azure.comCalled from codeNothing directly: it is an OAuth scope identifier; the token request goes to Entra ID.
collector.examplePlaceholder or exampleNothing: a made-up telemetry collector in tests.
collector.github.comTest fixtureNothing: recorded test data.
collector.invalidPlaceholder or exampleNothing: an unresolvable test value.
community.crewai.comDocumentation linkNothing at run time: a README link.
configured-url.comPlaceholder or exampleNothing: a test value.
configured.example.testPlaceholder or exampleNothing: a test value.
connect.useparagon.comTest fixtureNothing: recorded test data.
context7.comCalled from codeNothing: context7.json registers the repository with the Context7 docs index; no code calls it.
corp.examplePlaceholder or exampleNothing: a test value.
cp-attacker.examplePlaceholder or exampleNothing: a hostile-looking host used to test the guards.
crewai-production.s3.us-west-2.amazonaws.comDocumentation linkNothing in this repository: named in devtools' AGENTS.md evaluation items as the bucket platform skill downloads come from.
crewai.comCalled from codeNothing: the HTTP-Referer value sent to OpenRouter and the package homepage.
custom-api.comPlaceholder or exampleNothing: a test value.
custom-url-from-env.comPlaceholder or exampleNothing: a test value.
custom-url.comPlaceholder or exampleNothing: a test value.
custom.crewai.comPlaceholder or exampleNothing: a test value.
custom.deepseek.comPlaceholder or exampleNothing: a test value.
custom.exa.api.comPlaceholder or exampleNothing: a test value.
custom.example.comPlaceholder or exampleNothing: a test value.
custom.openai.comPlaceholder or exampleNothing: a test value.
custom.openrouter.aiPlaceholder or exampleNothing: a test value.
dashboard.exa.aiDocumentation linkNothing at run time: a README link.
dashboard.oxylabs.ioCalled from codeNothing: a sign-up link in Oxylabs tool docstrings.
dashboard.tools.crewai.comTest fixtureNothing: recorded test data.
dashscope-intl.aliyuncs.comCalled from codeAlibaba DashScope LLM calls fail.
dashscope.aliyun.comCalled from codeNothing: a link in a docstring's provider list.
deepinfra.comCalled from codeNothing: a link in a docstring's provider list.
deepmind.googleTest fixtureNothing: recorded test data.
deepseek.comCalled from codeNothing: a link in a docstring's provider list.
descriptusercontent.comTest fixtureNothing: recorded test data.
dev.auth0.comPlaceholder or exampleNothing: a made-up Auth0 tenant in tests.
dev.localhostPlaceholder or exampleNothing: a test value.
dev.okta.comPlaceholder or exampleNothing: a made-up Okta tenant in tests.
developers.facebook.comDocumentation linkNothing at run time: a reference URL in the platform app catalog.
developers.google.comCalled from codeNothing: reference links in Serply docstrings and scope strings in the platform catalog.
developers.oxylabs.ioCalled from codeNothing: documentation links in Oxylabs tool docstrings.
dify.aiTest fixtureNothing: recorded test data.
discord.comDocumentation linkNothing at run time: a link in project template READMEs.
discord.ggTest fixtureNothing: recorded test data.
docs-platform.crewai.comCalled from codeNothing: a link in a legacy-token warning.
docs.ag2.aiTest fixtureNothing: recorded test data.
docs.agentops.aiTest fixtureNothing: recorded test data.
docs.ah.merge.devDocumentation linkNothing at run time: a README link.
docs.anthropic.comTest fixtureNothing: recorded test data.
docs.apify.comCalled from codeNothing: documentation links in the Apify tool.
docs.astral.shCalled from codeNothing: an install hint in deploy validation.
docs.aws.amazon.comDocumentation linkNothing at run time: README and docstring links.
docs.browserbase.comDocumentation linkNothing at run time: README links.
docs.camel-ai.orgTest fixtureNothing: recorded test data.
docs.cloud.google.comCalled from codeNothing: a migration link in Vertex AI deprecation warnings.
docs.cohere.comTest fixtureNothing: recorded test data.
docs.contextual.aiDocumentation linkNothing at run time: README links.
docs.couchbase.comDocumentation linkNothing at run time: README links.
docs.crewaiDocumentation linkNothing: a truncated fragment of docs.crewai.com picked up by the scan.
docs.crewai.comCalled from codeNothing: links in error, help and package metadata.
docs.example.comPlaceholder or exampleNothing: an example URL.
docs.firecrawl.devCalled from codeNothing: a docstring link in scripts/wharf_runner.py.
docs.getcargo.ioTest fixtureNothing: recorded test data.
docs.github.comDocumentation linkNothing at run time: comments in .github workflow and Dependabot files.
docs.google.comTest fixtureNothing: recorded test data.
docs.hyperbrowser.aiCalled from codeNothing: documentation links in a field description.
docs.langflow.orgTest fixtureNothing: recorded test data.
docs.litellm.aiDocumentation linkNothing at run time: a comment link.
docs.llamaindex.aiDocumentation linkNothing at run time: a README link.
docs.mdb.aiDocumentation linkNothing at run time: a README link.
docs.mistral.aiTest fixtureNothing: recorded test data.
docs.multion.aiDocumentation linkNothing at run time: a README link.
docs.parallel.aiDocumentation linkNothing at run time: README links.
docs.praison.aiTest fixtureNothing: recorded test data.
docs.stagehand.devDocumentation linkNothing at run time: README links.
docs.swarmzero.aiTest fixtureNothing: recorded test data.
docs.vectorize.ioTest fixtureNothing: recorded test data.
doi.orgTest fixtureNothing: recorded test data.
download.pytorch.orgCalled from codeInstalling with uv cannot resolve torch from the pinned PyTorch index; nothing at run time.
drive.google.comTest fixtureNothing: recorded test data.
e2b.devDocumentation linkNothing at run time: a README link.
en.wikipedia.orgTest fixtureNothing: recorded test data.
entelligence.aiTest fixtureNothing: recorded test data.
enterprise.example.comPlaceholder or exampleNothing: a test value.
env.deepseek.comPlaceholder or exampleNothing: a test value.
env.exa.api.comPlaceholder or exampleNothing: a test value.
env.openai.comPlaceholder or exampleNothing: a test value.
ethicsinaiai.ieee.orgTest fixtureNothing: recorded test data.
evil.examplePlaceholder or exampleNothing: a hostile-looking host used to test the guards.
evil.example.comPlaceholder or exampleNothing: a hostile-looking host used to test the guards.
evil.testPlaceholder or exampleNothing: a hostile-looking host used to test the guards.
evolve.crewai.testPlaceholder or exampleNothing: a test value.
exa.aiDocumentation linkNothing at run time: a README link.
example-spa.comPlaceholder or exampleNothing: an example URL.
example.azure.comPlaceholder or exampleNothing: an example URL.
example.comPlaceholder or exampleNothing: an example URL.
example.invalidPlaceholder or exampleNothing: an unresolvable test value.
example.openai.azure.comPlaceholder or exampleNothing: an example URL.
example.testPlaceholder or exampleNothing: a test value.
example.weaviate.cloudPlaceholder or exampleNothing: an example URL.
explicit-url.comPlaceholder or exampleNothing: a test value.
explicit.deepseek.comPlaceholder or exampleNothing: a test value.
export.arxiv.orgCalled from codeThe arXiv paper tool fails. It queries over plain http.
external.mcp.comPlaceholder or exampleNothing: a made-up MCP server in tests.
facebook.comTest fixtureNothing: recorded test data.
factory.examplePlaceholder or exampleNothing: a test value.
fake-azure-endpoint.openai.azure.comTest fixtureNothing: a fake endpoint in recorded Azure tests.
fake.crewai.comPlaceholder or exampleNothing: a test value.
fallback-url.comPlaceholder or exampleNothing: a test value.
fallback.openai.comPlaceholder or exampleNothing: a test value.
fever.aiTest fixtureNothing: recorded test data.
files.example.comPlaceholder or exampleNothing: an example URL.
firecrawl.devTest fixtureNothing: recorded test data.
first.example.comPlaceholder or exampleNothing: an example URL.
fk4bvu0n5qp.typeform.comTest fixtureNothing: recorded test data.
flink.apache.orgTest fixtureNothing: recorded test data.
forms.hscollectedforms.netTest fixtureNothing: recorded test data.
gateway.corpPlaceholder or exampleNothing: a test value.
gateway.examplePlaceholder or exampleNothing: a test value.
generativelanguage.googleapis.comCalled from codeGemini LLM calls fail; the model picker falls back to its curated list.
gh.ioDocumentation linkNothing at run time: comments in codeql.yml.
gist.github.comTest fixtureNothing: recorded test data.
git.ioTest fixtureNothing: recorded test data.
github.comCalled from codeThe GitHub search tool and loader cannot fetch repositories; CI links stop resolving.
github.com.evil.examplePlaceholder or exampleNothing: a lookalike host used to test URL validation.
github.githubassets.comTest fixtureNothing: recorded test data.
gitlab.comTest fixtureNothing: recorded test data.
gohugo.ioTest fixtureNothing: recorded test data.
google.comCalled from codeNothing: an example navigation target in Stagehand prompts.
google.serper.devCalled from codeThe Serper search tool fails.
httpbin.orgCalled from codeNothing: an example target in the Stagehand example script.
huggingface.coTest fixtureNothing: recorded test data.
hyperbrowser.aiDocumentation linkNothing at run time: a README link.
identity.orgTest fixtureNothing: recorded test data.
image1.comPlaceholder or exampleNothing: a test value.
images.theconversation.comTest fixtureNothing: recorded test data.
img.coPlaceholder or exampleNothing: a test value.
img.shields.ioDocumentation linkNothing at run time: README badges, also present in recorded test data.
img.youtube.comDocumentation linkNothing at run time: README video thumbnails.
infer.roboflow.comCalled from codeThe Roboflow embedding provider fails.
infotabs.github.ioTest fixtureNothing: recorded test data.
ip.oxylabs.ioDocumentation linkNothing at run time: a README example.
js-na1.hs-scripts.comTest fixtureNothing: recorded test data.
js.hs-analytics.netTest fixtureNothing: recorded test data.
js.hscollectedforms.netTest fixtureNothing: recorded test data.
js.langchain.comTest fixtureNothing: recorded test data.
js.sentry-cdn.comTest fixtureNothing: recorded test data.
js.usemessages.comTest fixtureNothing: recorded test data.
keycloak.example.comPlaceholder or exampleNothing: a made-up Keycloak server in login tests.
kodexolabs.comTest fixtureNothing: recorded test data.
learn.crewai.comDocumentation linkNothing at run time: a README link.
learn.microsoft.comCalled from codeNothing: a docstring link.
legacy-env.openai.comPlaceholder or exampleNothing: a test value.
lilianweng.github.ioTest fixtureNothing: recorded test data.
litellm.aiTest fixtureNothing: recorded test data.
llama.meta.comTest fixtureNothing: recorded test data.
lmsys.orgTest fixtureNothing: recorded test data.
localhostLocal or privateDefault address of a local Ollama server (port 11434), vLLM and similar local services; if nothing listens there, those LLM calls and the Ollama model listing fail.
localhost.examplePlaceholder or exampleNothing: a test value.
login.company.comPlaceholder or exampleNothing: a made-up identity provider in tests.
login.example.comPlaceholder or exampleNothing: a made-up identity provider in tests.
login.microsoftonline.comCalled from codecrewai login fails for organisations that use the Entra ID provider.
login.myapp.ioPlaceholder or exampleNothing: a made-up identity provider in tests.
lower.testPlaceholder or exampleNothing: a test value.
machine-proxy.testPlaceholder or exampleNothing: a made-up proxy in proxy-pinning tests.
mcp.brightdata.comTest fixtureNothing: recorded test data.
mcp.exa.aiTest fixtureNothing: recorded test data.
mcp.example.comPlaceholder or exampleNothing: a made-up MCP server.
mcp.example.testPlaceholder or exampleNothing: a made-up MCP server.
mcp.firecrawl.devCalled from codeOnly the maintainer script scripts/wharf_runner.py cannot reach the Firecrawl MCP server.
mcp.github.comTest fixtureNothing: recorded test data.
mcp.notion.soTest fixtureNothing: recorded test data.
mdb.aiCalled from codeThe AI Minds tool fails.
media.istockphoto.comTest fixtureNothing: recorded test data.
media.springernature.comTest fixtureNothing: recorded test data.
medium.comTest fixtureNothing: recorded test data.
mendable.aiTest fixtureNothing: recorded test data.
merge.devDocumentation linkNothing at run time: a README link.
mindsdb.comCalled from codeNothing: a link in the AI Minds tool description.
mintlify.comDocumentation linkNothing at run time: a CONTRIBUTING link.
mintlify.s3-us-west-1.amazonaws.comTest fixtureNothing: recorded test data.
miro.medium.comTest fixtureNothing: recorded test data.
models.examplePlaceholder or exampleNothing: a test value.
models.inference.ai.azure.comTest fixtureNothing: recorded test data.
msblogs.thesourcemediaassets.comTest fixtureNothing: recorded test data.
my-company.auth0.comPlaceholder or exampleNothing: a made-up Auth0 tenant.
my-company.okta.comPlaceholder or exampleNothing: a made-up Okta tenant.
my-dashscope.example.comPlaceholder or exampleNothing: a test value.
my-server.comPlaceholder or exampleNothing: an example MCP server.
my-vllm.internalPlaceholder or exampleNothing: an example vLLM server.
myresource.openai.azure.comCalled from codeNothing: an example endpoint in a docstring.
n.coPlaceholder or exampleNothing: a test value.
news.ycombinator.comTest fixtureNothing: recorded test data.
news1.comPlaceholder or exampleNothing: a test value.
not-logged-in.testPlaceholder or exampleNothing: a test value.
oauth2.googleapis.comTest fixtureNothing: recorded test data.
ollama.aiCalled from codeNothing: a link in a docstring's provider list.
ollama.example.comPlaceholder or exampleNothing: a test value.
openai.comTest fixtureNothing: recorded test data.
openrouter.aiCalled from codeOpenRouter LLM and embedding calls fail.
opensource.orgDocumentation linkNothing at run time: the README licence link.
opentelemetry.ioCalled from codeNothing: specification links in tracing modules.
optimize.crewai.testPlaceholder or exampleNothing: a test value.
optimize.examplePlaceholder or exampleNothing: a test value.
org-account.snowflakecomputing.comPlaceholder or exampleNothing: a made-up Snowflake account.
ossrdbms-aad.database.windows.netCalled from codeNothing directly: an Entra ID token scope for the Azure DocumentDB tool; the token request goes to Entra ID.
other-private.examplePlaceholder or exampleNothing: a test value.
other.comPlaceholder or exampleNothing: a test value.
other.examplePlaceholder or exampleNothing: a test value.
other.mcp.comPlaceholder or exampleNothing: a made-up MCP server.
oxylabs.ioDocumentation linkNothing at run time: README links.
people.eecs.berkeley.eduTest fixtureNothing: recorded test data.
pepy.techTest fixtureNothing: recorded test data.
platform.example.testPlaceholder or exampleNothing: a test value.
polyfill.ioTest fixtureNothing: recorded test data.
pre-commit.comDocumentation linkNothing at run time: a CONTRIBUTING link.
priority.openai.comPlaceholder or exampleNothing: a test value.
prod.auth0.comPlaceholder or exampleNothing: a made-up Auth0 tenant.
prod.okta.comPlaceholder or exampleNothing: a made-up Okta tenant.
project-proxy.testPlaceholder or exampleNothing: a made-up proxy in proxy-pinning tests.
promptarmor.comTest fixtureNothing: recorded test data.
proxy.corpPlaceholder or exampleNothing: a made-up proxy in tests.
proxy.examplePlaceholder or exampleNothing: a made-up proxy in tests.
proxy.example.comPlaceholder or exampleNothing: a made-up proxy in tests.
public.examplePlaceholder or exampleNothing: a test value.
px.ads.linkedin.comTest fixtureNothing: recorded test data.
pypi-camo.freetls.fastly.netTest fixtureNothing: recorded test data.
pypi.orgCalled from codeThe console's new-version notice is skipped; releases cannot be published or checked.
python.langchain.comTest fixtureNothing: recorded test data.
qdrant.techDocumentation linkNothing at run time: a README link.
r.coPlaceholder or exampleNothing: a test value.
r.jina.aiCalled from codeThe Jina scrape tool fails.
r.openai.azure.comPlaceholder or exampleNothing: a test value.
raw.githubusercontent.comCalled from codeThe CLI model picker cannot refresh the LiteLLM catalog and uses its cache or curated list; the maintainers' catalog refresh fails.
realtime.oxylabs.ioTest fixtureNothing in tests; the Oxylabs tools reach Oxylabs through their SDK.
reddit.comTest fixtureNothing: recorded test data.
repository-images.githubusercontent.comTest fixtureNothing: recorded test data.
res.openai.azure.comPlaceholder or exampleNothing: a test value.
research.ibm.comTest fixtureNothing: recorded test data.
run.pstmn.ioTest fixtureNothing: recorded test data.
s3SDK clientThe boto3 S3 client: the S3 reader and writer tools and Bedrock file uploads fail.
safe.examplePlaceholder or exampleNothing: a test value.
schema.orgTest fixtureNothing: recorded test data.
schemas.openxmlformats.orgTest fixtureNothing: XML namespaces in test documents.
scrape.serper.devCalled from codeThe Serper scrape tool fails.
scrapegraphai.comDocumentation linkNothing at run time: a README link.
scrapfly.ioDocumentation linkNothing at run time: a README link.
second.example.comPlaceholder or exampleNothing: an example URL.
secure.testPlaceholder or exampleNothing: a test value.
serpapi.comCalled from codeNothing: a link in the missing-key error message.
serper.devDocumentation linkNothing at run time: a README link.
serply.ioDocumentation linkNothing at run time: a README link.
server.comCalled from codeNothing: an example MCP URL in a field description.
share.descript.comTest fixtureNothing: recorded test data.
shell.amp.testPlaceholder or exampleNothing: a test value.
singlestoredb-python.labs.singlestDocumentation linkNothing at run time: a truncated README link to the SingleStore Python docs.
skills.shDocumentation linkNothing at run time: a README link.
spider.cloudDocumentation linkNothing at run time: README links.
ssl.google-analytics.comTest fixtureNothing: recorded test data.
sso.company.comPlaceholder or exampleNothing: a made-up identity provider.
sso.enterprise.comPlaceholder or exampleNothing: a made-up identity provider.
stackoverflow.comCalled from codeNothing: a reference in a comment.
stagehand.devDocumentation linkNothing at run time: README links.
static.cloudflareinsights.comTest fixtureNothing: recorded test data.
status.firecrawl.devTest fixtureNothing: recorded test data.
storage.googleapis.comTest fixtureNothing: recorded test data.
studio.crewai.comDocumentation linkNothing at run time: a README link.
swarmzero.aiTest fixtureNothing: recorded test data.
telegram.meTest fixtureNothing: recorded test data.
telemetry.crewai.comCalled from codeTelemetry spans are not exported; export errors are logged and dropped, and runs are unaffected.
test-ai.services.example.comPlaceholder or exampleNothing: a test value.
test-api-base.comPlaceholder or exampleNothing: a test value.
test-domain.auth0.comPlaceholder or exampleNothing: a made-up Auth0 tenant in login tests.
test-domain.okta.comPlaceholder or exampleNothing: a made-up Okta tenant in login tests.
test-endpoint.comPlaceholder or exampleNothing: a test value.
test-resource.openai.azure.comPlaceholder or exampleNothing: a test value.
test.comPlaceholder or exampleNothing: a test value.
test.litellm.proxyPlaceholder or exampleNothing: a test value.
test.openai.azure.comPlaceholder or exampleNothing: a fake Azure endpoint in tests.
test1.comPlaceholder or exampleNothing: a test value.
test1.openai.azure.comPlaceholder or exampleNothing: a test value.
test2.comPlaceholder or exampleNothing: a test value.
test2.openai.azure.comPlaceholder or exampleNothing: a test value.
theconversation.comTest fixtureNothing: recorded test data.
this-host-definitely-does-not-exist-abc123.comPlaceholder or exampleNothing: an unresolvable host used to test failure handling.
trendshift.ioDocumentation linkNothing at run time: a README badge.
twitter.comDocumentation linkNothing at run time: a README link.
unpkg.comCalled from codeThe flow visualisation page cannot draw its graph: vis-network does not load.
unrelated.examplePlaceholder or exampleNothing: a test value.
upper.testPlaceholder or exampleNothing: a test value.
url-from-env.comPlaceholder or exampleNothing: a test value.
url-from-settings.comPlaceholder or exampleNothing: a test value.
us-central1-aiplatform.googleapis.comTest fixtureNothing: recorded Vertex AI test data.
us-south.ml.cloud.ibm.comTest fixtureNothing: recorded test data.
us.i.posthog.comTest fixtureNothing: recorded test data.
v.coPlaceholder or exampleNothing: a test value.
vllm.examplePlaceholder or exampleNothing: an example vLLM server.
weaviate.ioDocumentation linkNothing at run time: README links.
web-scraping.devDocumentation linkNothing at run time: a README example target.
web.archive.orgTest fixtureNothing: recorded test data.
worker-actionkit.tools.crewai.comTest fixtureNothing: recorded test data.
www.amazon.comDocumentation linkNothing at run time: a README example target.
www.bing.comCalled from codeNothing directly: a search URL handed to Bright Data, which fetches it.
www.browserbase.comDocumentation linkNothing at run time: README links.
www.camel-ai.orgTest fixtureNothing: recorded test data.
www.conventionalcommits.orgDocumentation linkNothing at run time: a CONTRIBUTING link.
www.crewai.comDocumentation linkNothing at run time: a template README link.
www.daytona.ioDocumentation linkNothing at run time: a README link.
www.deeplearning.aiDocumentation linkNothing at run time: README course links.
www.example.comPlaceholder or exampleNothing: an example URL.
www.firecrawl.devTest fixtureNothing: recorded test data.
www.gartner.comTest fixtureNothing: recorded test data.
www.gatsby.ucl.ac.ukTest fixtureNothing: recorded test data.
www.goodreads.comTest fixtureNothing: recorded test data.
www.google-analytics.comTest fixtureNothing: recorded test data.
www.google.comCalled from codeNothing directly: a search URL handed to Bright Data and a Referer header value in two scrape tools.
www.google.com.brTest fixtureNothing: recorded test data.
www.googleapis.comDocumentation linkNothing at run time: OAuth scope strings in the platform app catalog.
www.googletagmanager.comTest fixtureNothing: recorded test data.
www.gstatic.comTest fixtureNothing: recorded test data.
www.ibm.comDocumentation linkNothing at run time: a reference URL in source text.
www.lesswrong.comTest fixtureNothing: recorded test data.
www.linkedin.comCalled from codeNothing: a share link in the first-contributor welcome comment.
www.llama.comTest fixtureNothing: recorded test data.
www.macrotrends.netTest fixtureNothing: recorded test data.
www.mckinsey.comTest fixtureNothing: recorded test data.
www.mendable.aiTest fixtureNothing: recorded test data.
www.mintlify.comDocumentation linkNothing at run time: a README link.
www.mongodb.comDocumentation linkNothing at run time: README and docstring links.
www.nature.comDocumentation linkNothing at run time: a README example.
www.nippon.comTest fixtureNothing: recorded test data.
www.pabbly.comTest fixtureNothing: recorded test data.
www.rolustech.comTest fixtureNothing: recorded test data.
www.scrapfly.ioDocumentation linkNothing at run time: a README link.
www.stagehand.devCalled from codeNothing: an example target in the Stagehand example script.
www.un.orgTest fixtureNothing: recorded test data.
www.us.maguireshoes.comTest fixtureNothing: recorded test data.
www.w3.orgDocumentation linkNothing at run time: an XML or SVG namespace string.
www.youtube.comDocumentation linkNothing at run time: README video links, also in recorded test data.
x.blob.core.windows.netPlaceholder or exampleNothing: a test value.
x.comCalled from codeNothing: a share link in the first-contributor welcome comment.
x.openai.azure.comPlaceholder or exampleNothing: a test value.
xxx.xxx.xxx.xxxPlaceholder or exampleNothing: a placeholder address.
yandex.comCalled from codeNothing directly: a search URL handed to Bright Data.
your-qdrant-cluster-url.comPlaceholder or exampleNothing: a placeholder in an example.
your-resource.openai.azure.comPlaceholder or exampleNothing: a placeholder in an example.
your-weaviate-cluster-url.comPlaceholder or exampleNothing: a placeholder in an example.
your-workspace.cloud.databricks.comPlaceholder or exampleNothing: a placeholder in an example.
youtube.comDocumentation linkNothing at run time: a README link.
zapier.comDocumentation linkNothing at run time: a README link.
zeus.tools.crewai.comTest fixtureNothing: recorded test data.
zeus.useparagon.comTest fixtureNothing: recorded test data.

Outbound calls

The evidence lists 76 hosts called from code, 270 named only in tests, 10 local or private and 4 only in comments. It found no install hooks and 43 risk-pattern lines, 40 of them in tests. Reading the 76 shows two kinds. Thirty-five are hosts the code really connects to (or, for the PyTorch index, the installer does): LLM providers, tool APIs, the CrewAI platform, telemetry, PyPI, GitHub, and two CDNs the flow visualisation page loads. The rest are named only in a string that never becomes a request: a docstring, a help or error message, a schema identifier, an OAuth scope, an example prompt. Every connection is one a reader would expect from an LLM agent framework with a tool library and a vendor platform. Nothing calls a paste site, a tunnel, a webhook relay or a raw IP address.

Three outbound details are worth a reader's attention, none of them hostile. The flow visualisation page loads vis-network 9.1.2 from unpkg.com and html2canvas 1.4.1 and jspdf 2.5.1 from cdnjs.cloudflare.com, version-pinned but without subresource integrity. The arXiv tool queries export.arxiv.org over plain http. And CREWAI_FACTORY=true turns off TLS verification for platform integration calls (section 9).

Hosts called from code 76 rows
HostWhere it is calledWhat forExpected?
api.openai.comlib/cli/src/crewai_cli/model_catalog.py:212The CLI model picker lists OpenAI models (GET /v1/models) with the user's key; the OpenAI SDK reaches the same host for LLM calls.Yes: an LLM provider.
github.comlib/crewai-tools/src/crewai_tools/rag/loaders/github_loader.py:29; tools/github_search_tool/github_search_tool.py:60; .github/workflows/ftc-require-issue.yml:134The GitHub loader and search tool fetch repositories an agent is pointed at; workflows and package metadata link to the repository.Yes.
app.crewai.comlib/crewai-core/src/crewai_core/constants.py:14; lib/cli/src/crewai_cli/constants.py:4; crewai_tools/adapters/enterprise_adapter.py:14CrewAI AMP platform API: login, deploy, tool and skill repository, platform tools, trace batches.Yes: the vendor's own platform, reached by commands and features the user invokes and by trace upload when tracing is on.
api.anthropic.comlib/cli/src/crewai_cli/model_catalog.py:243The model picker lists Anthropic models.Yes: an LLM provider.
generativelanguage.googleapis.comlib/cli/src/crewai_cli/model_catalog.py:265The model picker lists Gemini models, paging up to ten times.Yes: an LLM provider.
docs.firecrawl.devscripts/wharf_runner.py:19A docstring link; not contacted.Yes.
www.google.comcrewai_tools/tools/brightdata_tool/brightdata_serp.py:137; scrape_website_tool.py:41A Google search URL handed to Bright Data, and a Referer header value; crewai does not connect to it.Yes.
google.comcrewai_tools/tools/stagehand_tool/example.py:54; stagehand_tool.py:113An example navigation target in prompts and docstrings.Yes.
x.com.github/workflows/first-contributor-welcome.yml:72A share link in a PR welcome comment; not contacted.Yes.
telemetry.crewai.comlib/crewai/src/crewai/telemetry/constants.py:9; lib/crewai-core/src/crewai_core/telemetry.py:45OTLP export of anonymous telemetry spans to port 4319.Expected for a vendor framework; on by default and switched off by the three opt-out variables.
pypi.orglib/crewai-core/src/crewai_core/version.py:126; lib/devtools/src/crewai_devtools/cli.py:1742; .github/workflows/nightly.yml:130The console's new-version check, the release tool's published-version check, and CI publishing.Yes.
cdnjs.cloudflare.comlib/crewai/src/crewai/flow/visualization/assets/interactive.js:2282,2299,2303html2canvas 1.4.1 and jspdf 2.5.1, loaded by the browser to export the flow graph.Expected; version-pinned but without subresource integrity.
api.github.comlib/cli/src/crewai_cli/remote_template/main.py:22crewai template lists the crewAIInc organisation's template repositories and downloads a zipball.Yes.
docs.crewai.comlib/cli/src/crewai_cli/update_crew.py:18; lib/crewai/src/crewai/llm.py:361Links in help and error messages and package metadata.Yes.
login.microsoftonline.comlib/crewai-core/src/crewai_core/auth/providers/entra_id.py:49OAuth2 device flow for organisations that log in with Entra ID.Yes.
openrouter.ailib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:49; rag/embeddings/providers/openrouter/openrouter_provider.py:42OpenRouter LLM and embedding base URL.Yes: an LLM provider.
api.search.brave.comcrewai_tools/tools/brave_search_tool/brave_image_tool.py:24 (8 lines)Brave web, image, news, local and LLM-context search.Yes: a tool API.
www.linkedin.com.github/workflows/first-contributor-welcome.yml:73A share link in a PR welcome comment; not contacted.Yes.
crewai.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:52The HTTP-Referer value sent to OpenRouter, and package homepages.Yes; not contacted.
myresource.openai.azure.comlib/crewai/src/crewai/llms/providers/azure/completion.py:288An example endpoint in a docstring.Yes; not contacted.
raw.githubusercontent.comlib/cli/src/crewai_cli/constants.py:352; lib/crewai/src/crewai/constants.py:357; lib/devtools/src/crewai_devtools/litellm_catalog_update.py:20The LiteLLM model price catalog (JSON) for the CLI model picker and the maintainers' catalog refresh.Expected: JSON data, not code (see the risk lines below).
ah-api.merge.devcrewai_tools/tools/merge_agent_handler_tool/merge_agent_handler_tool.py:39Merge Agent Handler API.Yes: a tool API.
api.brightdata.comcrewai_tools/tools/brightdata_tool/brightdata_dataset.py:13Bright Data dataset, SERP and unlocker APIs.Yes: a tool API.
cognitiveservices.azure.comcrewai_tools/tools/azure_documentdb_vector_search_tool/vector_search.py:184An OAuth token scope for Azure OpenAI embeddings; an identifier, not a request target.Yes.
a2ui.orglib/crewai/src/crewai/a2a/extensions/a2ui/server_extension.py:23A2UI extension URIs and JSON schema ids; never fetched.Yes.
api.serply.iocrewai_tools/tools/serply_api_tool/serply_job_search_tool.py:27Serply web, news, scholar, job and markdown APIs.Yes: a tool API.
dashboard.oxylabs.iocrewai_tools/tools/oxylabs_base_tool/oxylabs_base_tool.py:123A sign-up link in docstrings.Yes; not contacted.
a2a-protocol.orglib/crewai/src/crewai/a2a/extensions/__init__.py:13A specification link in docstrings.Yes; not contacted.
api.patronus.aicrewai_tools/tools/patronus_eval_tool/patronus_eval_tool.py:13Patronus evaluation API.Yes: a tool API.
developers.oxylabs.iocrewai_tools/tools/oxylabs_amazon_product_scraper_tool/oxylabs_amazon_product_scraper_tool.py:18Documentation links in docstrings.Yes; not contacted.
docs.cloud.google.comlib/crewai/src/crewai/rag/embeddings/providers/google/genai_vertex_embedding.py:90A migration link in deprecation warnings.Yes; not contacted.
ai.devlib/cli/src/crewai_cli/constants.py:28Prompt text saying where to get a Gemini key.Yes; not contacted.
api.cerebras.ailib/cli/src/crewai_cli/model_catalog.py:220; openai_compatible/completion.py:83Cerebras model listing and LLM base URL.Yes: an LLM provider.
api.contextual.aicrewai_tools/tools/contextualai_parse_tool/contextual_parse_tool.py:61Contextual AI parse, query and rerank APIs.Yes: a tool API.
api.deepinfra.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:95DeepInfra LLM base URL.Yes: an LLM provider.
api.deepseek.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:56DeepSeek LLM base URL.Yes: an LLM provider.
opentelemetry.iolib/crewai/src/crewai/telemetry/tracing/semantic_conventions.py:12Specification links in tracing modules.Yes; not contacted.
actions.zapier.comcrewai_tools/adapters/zapier_adapter.py:10Zapier AI actions API.Yes: a tool API.
api.stagehand.browserbase.comcrewai_tools/tools/stagehand_tool/stagehand_tool.py:166Default Stagehand API server.Yes: a tool API.
dashscope-intl.aliyuncs.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:89Alibaba DashScope LLM base URL.Yes: an LLM provider.
developers.google.comcrewai_tools/tools/serply_api_tool/serply_web_search_tool.py:49Reference links in field descriptions.Yes; not contacted.
docs.apify.comcrewai_tools/tools/apify_actors_tool/apify_actors_tool.py:29Documentation links.Yes; not contacted.
docs.hyperbrowser.aicrewai_tools/tools/hyperbrowser_load_tool/hyperbrowser_load_tool.py:16Documentation links in a field description.Yes; not contacted.
download.pytorch.orglib/crewai/pyproject.toml:141,146uv package index for CPU torch wheels, used at install time.Yes: a package source, not a run-time call.
infer.roboflow.comlib/crewai/src/crewai/rag/embeddings/providers/roboflow/roboflow_provider.py:27Default Roboflow inference URL for the Roboflow embedder.Yes: an embedding provider.
learn.microsoft.comlib/crewai/src/crewai/llms/providers/azure/completion.py:1320A docstring link.Yes; not contacted.
mcp.firecrawl.devscripts/wharf_runner.py:74The Firecrawl MCP server, used by a maintainer script that exercises MCP telemetry.Yes: a maintainer script, not shipped code.
ossrdbms-aad.database.windows.netcrewai_tools/tools/azure_documentdb_vector_search_tool/auth.py:23An Entra ID token scope for DocumentDB authentication; an identifier.Yes.
api.groq.comlib/cli/src/crewai_cli/model_catalog.py:216The model picker lists Groq models.Yes: an LLM provider.
api.parallel.aicrewai_tools/tools/parallel_tools/parallel_search_tool.py:66Parallel search API.Yes: a tool API.
api.weather.comlib/crewai/src/crewai/project/crew_definition.py:175An example MCP reference in a docstring.Yes; not contacted.
app.hyperbrowser.aicrewai_tools/tools/hyperbrowser_load_tool/hyperbrowser_load_tool.py:25A sign-up link in a docstring.Yes; not contacted.
bucket.r2.cloudflarestorage.comcrewai_tools/tools/url_read_tool/url_read_tool.py:178A presigned-URL example in a docstring.Yes; not contacted.
cerebras.ailib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:150A provider link in a docstring.Yes; not contacted.
cli.github.comlib/devtools/src/crewai_devtools/cli.py:139An install hint printed by the release tool.Yes; not contacted.
context7.comcontext7.json:2Registers the repository with the Context7 documentation index; no code reads it.Yes; not contacted.
dashscope.aliyun.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:151A provider link in a docstring.Yes; not contacted.
deepinfra.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:152A provider link in a docstring.Yes; not contacted.
deepseek.comlib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:146A provider link in a docstring.Yes; not contacted.
docs-platform.crewai.comcrewai_tools/adapters/enterprise_adapter.py:414A link in a legacy-token warning.Yes; not contacted.
docs.astral.shlib/cli/src/crewai_cli/deploy/validate.py:866An install hint in deploy validation.Yes; not contacted.
export.arxiv.orgcrewai_tools/tools/arxiv_paper_tool/arxiv_paper_tool.py:28arXiv query API, over plain http.Yes: a tool API (plain http is a weakness, not a sign of hostility).
google.serper.devcrewai_tools/tools/serper_dev_tool/serper_dev_tool.py:117Serper search API.Yes: a tool API.
httpbin.orgcrewai_tools/tools/stagehand_tool/example.py:79An example target in an example script's prompt.Yes; not contacted by the library.
mdb.aicrewai_tools/tools/ai_mind_tool/ai_mind_tool.py:12AI Minds API base URL.Yes: a tool API.
mindsdb.comcrewai_tools/tools/ai_mind_tool/ai_mind_tool.py:26A link in the tool description.Yes; not contacted.
ollama.ailib/crewai/src/crewai/llms/providers/openai_compatible/completion.py:147A provider link in a docstring.Yes; not contacted.
r.jina.aicrewai_tools/tools/jina_scrape_website_tool/jina_scrape_website_tool.py:52Jina reader: fetches a page through Jina as text.Yes: a tool API.
scrape.serper.devcrewai_tools/tools/serper_scrape_website_tool/serper_scrape_website_tool.py:50Serper scrape API.Yes: a tool API.
serpapi.comcrewai_tools/tools/serpapi_tool/serpapi_base_tool.py:47A link in the missing-key error message.Yes; not contacted.
server.comlib/crewai/src/crewai/agents/agent_builder/base_agent.py:383An example MCP URL in a field description.Yes; not contacted.
stackoverflow.comlib/crewai/src/crewai/project/crew_base.py:826A reference link in a comment.Yes; not contacted.
unpkg.comlib/crewai/src/crewai/flow/visualization/assets/interactive.js:42vis-network 9.1.2, loaded by the browser to draw the flow graph.Expected; version-pinned but without subresource integrity.
www.bing.comcrewai_tools/tools/brightdata_tool/brightdata_serp.py:136A Bing search URL handed to Bright Data.Yes; crewai does not connect to it.
www.stagehand.devcrewai_tools/tools/stagehand_tool/example.py:76An example target in an example script's prompt.Yes; not contacted by the library.
yandex.comcrewai_tools/tools/brightdata_tool/brightdata_serp.py:134A Yandex search URL handed to Bright Data.Yes; crewai does not connect to it.

Install hooks. The evidence found none: no package lifecycle script runs on install. The packages declare the stock hatchling build backend and ship as wheels on PyPI, so installing crewai runs no code from this repository. This is benign.

Risk-pattern lines. The evidence flags 43 lines: 6 download at run time from raw source hosting, 35 long encoded payloads, and 2 reads of credentials from the home directory. Three are outside tests, and each is the LiteLLM model price catalog (JSON data, not code) fetched from raw.githubusercontent.com/BerriAI/litellm/main.

The other 40 lines are in tests and are all benign. The 35 long encoded payloads are base64 PDF, image and text attachments in recorded multimodal requests, plus Anthropic thinking-block signatures in recorded responses. The 2 home-directory credential reads are a fake C:/Users/alice/.ssh/id_rsa path that loader tests use to check a path is refused, not read. The 3 test-side raw-hosting downloads are image links inside a Firecrawl page recorded in a cassette. Every line has its verdict in the table below.

Risk-pattern lines 43 rows
PatternWhereTestVerdict
Download at run time from raw source hostinglib/cli/src/crewai_cli/constants.py:352noBenign: the LiteLLM price catalog JSON for the CLI model picker, parsed and cached, never executed.
Download at run time from raw source hostinglib/crewai/src/crewai/constants.py:357noBenign: the same URL as an exported constant with no reader in the crewai package.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalAnthropic.test_pdf_file[anthropic-claude-3-5-haiku-20241022].yaml:4yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalAnthropic.test_pdf_file[anthropic-claude-3-5-haiku-20241022].yaml:109yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalFileTypes.test_pdf_anthropic.yaml:4yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalFileTypes.test_pdf_anthropic.yaml:109yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalFileTypes.test_text_gemini.yaml:4yesBenign: a base64 text file ("Review Guidelines") in a recorded Gemini request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalFileTypes.test_text_gemini.yaml:75yesBenign: a base64 text file in a recorded Gemini request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_mixed_files[gemini-gemini-2.0-flash].yaml:5yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_mixed_files[gemini-gemini-2.0-flash].yaml:77yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_mixed_files[gemini-gemini-2.5-flash].yaml:5yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_mixed_files[gemini-gemini-2.5-flash].yaml:73yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_text_file[gemini-gemini-2.0-flash].yaml:4yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_text_file[gemini-gemini-2.0-flash].yaml:74yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_text_file[gemini-gemini-2.5-flash].yaml:4yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestAgentMultimodalGemini.test_text_file[gemini-gemini-2.5-flash].yaml:70yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestCrewMultimodalAnthropic.test_pdf_file[anthropic-claude-3-5-haiku-20241022].yaml:9yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestCrewMultimodalFileTypes.test_pdf_anthropic.yaml:9yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestCrewMultimodalFileTypes.test_text_gemini.yaml:9yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestCrewMultimodalGemini.test_mixed_files[gemini-gemini-2.0-flash].yaml:10yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestCrewMultimodalGemini.test_text_file[gemini-gemini-2.0-flash].yaml:9yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestFlowMultimodalAnthropic.test_flow_with_pdf_file.yaml:9yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestFlowMultimodalGemini.test_flow_with_text_file.yaml:9yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/TestFlowMultimodalMultiStep.test_flow_with_mixed_files.yaml:10yesBenign: base64 image and text attachments in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/TestAnthropicMultimodalIntegration.test_analyze_pdf.yaml:4yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/TestBedrockMultimodalIntegration.test_analyze_pdf.yaml:5yesBenign: base64 PDF bytes in a recorded Bedrock request.
Long encoded payloadlib/crewai/tests/cassettes/llms/TestGeminiMultimodalIntegration.test_analyze_text_file.yaml:4yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/TestGenericFileIntegration.test_generic_file_pdf_anthropic.yaml:4yesBenign: a base64 PDF attachment in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/TestGenericFileIntegration.test_generic_file_text_gemini.yaml:4yesBenign: a base64 text file in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/anthropic/test_anthropic_thinking.yaml:43yesBenign: a thinking-block signature in a recorded Anthropic response.
Long encoded payloadlib/crewai/tests/cassettes/llms/anthropic/test_anthropic_thinking_blocks_preserved_across_turns.yaml:43yesBenign: a thinking-block signature in a recorded response.
Long encoded payloadlib/crewai/tests/cassettes/llms/anthropic/test_anthropic_thinking_blocks_preserved_across_turns.yaml:99yesBenign: a thinking block replayed in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/llms/anthropic/test_anthropic_thinking_blocks_preserved_across_turns.yaml:139yesBenign: a thinking-block signature in a recorded response.
Long encoded payloadlib/crewai/tests/cassettes/test_anthropic_thinking.yaml:43yesBenign: a thinking-block signature in a recorded response.
Long encoded payloadlib/crewai/tests/cassettes/test_anthropic_thinking_blocks_preserved_across_turns.yaml:43yesBenign: a thinking-block signature in a recorded response.
Long encoded payloadlib/crewai/tests/cassettes/test_anthropic_thinking_blocks_preserved_across_turns.yaml:99yesBenign: a thinking block replayed in a recorded request.
Long encoded payloadlib/crewai/tests/cassettes/test_anthropic_thinking_blocks_preserved_across_turns.yaml:139yesBenign: a thinking-block signature in a recorded response.
Reads credentials or keys from the home directorylib/crewai/tests/project/test_crew_loader.py:767yesBenign: a fake Windows path used to check the crew loader refuses a path outside the project; nothing is read.
Reads credentials or keys from the home directorylib/crewai/tests/project/test_json_loader.py:85yesBenign: the same fake path, checking the JSON loader refuses it.
Download at run time from raw source hostinglib/crewai-tools/tests/tools/cassettes/firecrawl_search_tool_test/test_firecrawl_search_tool_integration.yaml:358yesBenign: logo image links inside a recorded Firecrawl page.
Download at run time from raw source hostinglib/crewai-tools/tests/tools/cassettes/firecrawl_search_tool_test/test_firecrawl_search_tool_integration.yaml:678yesBenign: image links inside a recorded Firecrawl page.
Download at run time from raw source hostinglib/crewai-tools/tests/tools/cassettes/firecrawl_search_tool_test/test_firecrawl_search_tool_integration.yaml:782yesBenign: logo image links inside a recorded Firecrawl page.
Download at run time from raw source hostinglib/devtools/src/crewai_devtools/litellm_catalog_update.py:20noBenign: the maintainers' catalog refresh downloads the JSON with curl and commits it through a reviewed PR.

Functions named in this section

FunctionWhereWhat it does
_fetch_openai_compatiblelib/cli/src/crewai_cli/model_catalog.py:223Calls GET /models on an OpenAI-shaped API (OpenAI, Groq, Cerebras) with the user's key and keeps the chat models. Used by the CLI model picker.
_fetch_anthropiclib/cli/src/crewai_cli/model_catalog.py:241Lists Anthropic models from api.anthropic.com for the model picker, with display names and creation dates.
_fetch_geminilib/cli/src/crewai_cli/model_catalog.py:257Pages through the Gemini models list, at most ten pages, keeping models that support content generation.
_fetch_ollamalib/cli/src/crewai_cli/model_catalog.py:313Lists the models installed on the local Ollama server, without a key.
_fetch_litellm_datalib/cli/src/crewai_cli/model_catalog.py:390Returns the cached LiteLLM catalog if fresh, otherwise downloads it once and caches it. On failure it falls back to a stale cache.
fetch_provider_datalib/cli/src/crewai_cli/provider.py:153Streams the LiteLLM catalog over HTTPS with certifi's CA bundle and writes it to the CLI's provider cache.
get_latest_version_from_pypilib/crewai-core/src/crewai_core/version.py:112Asks pypi.org for crewai's latest non-yanked release, with a short timeout and a local cache, so the console can suggest an upgrade.
_fetch_templateslib/cli/src/crewai_cli/remote_template/main.py:154Pages through the crewAIInc organisation's public repositories on the GitHub API and keeps those named as templates.
_download_ziplib/cli/src/crewai_cli/remote_template/main.py:206Downloads the default-branch zipball of one template repository from the GitHub API.
update_cataloglib/devtools/src/crewai_devtools/litellm_catalog_update.py:28Downloads the LiteLLM catalog with curl, checks that it is a JSON object, and writes it into the checkout for a release PR.

13. Error handling and resilience

The exception strategy has three tiers, and they are applied consistently across the library. First, work failures are raised to the caller as typed Python exceptions: a guardrail that keeps failing raises ValueError, an agent that exceeds its time budget raises TimeoutError, an LLM that answers empty twice raises EmptyLLMResponseError. Second, before a failure is raised it is emitted as an event on the in-process event bus (TaskFailedEvent from the task, MethodExecutionFailedEvent from a flow method, AgentExecutionErrorEvent, CrewKickoffFailedEvent, LLMCallFailedEvent, ToolUsageErrorEvent), so console output, telemetry and tracing see it without catching it. Third, side channels never break a run: telemetry operations, trace export, background memory saves and event handlers catch their own errors, log or print them, and carry on. That last tier is deliberate and documented in the source ("telemetry must never break a command", "a trace is a record of the run, not a condition of it").

Retries are layered by what fails. The LLM layer retries only provider throttling; the executor retries an empty answer once; the agent re-runs a whole task on an unexpected error up to its retry limit; guardrails re-run a task until its output validates or their bound is reached; MCP retries tool discovery and tool calls. The bounds are the source defaults: max_iter 25, max_retry_limit 2, with guardrail_max_retries bounding guardrail re-runs and max_execution_time running the task under a timeout. Two exception types, ToolExecutionFailedError and HookAborted, are declared deliberate stops and pass straight through the retry loop.

Mechanisms

MechanismWhereBoundWhat triggers itWhen it is exhausted
LLM rate-limit retryllms/retry.py:13-37, 124-205; llms/base_llm.py:246-2883 attempts, 1 s initial delay, 8 s cap, 20% jitter, only for 429/throttling errorsAn exception anywhere in the error chain with status 429, a throttling code (ratelimiterror, throttlingexception, resourceexhausted and similar) or a rate-limit phrase in its message. A provider Retry-After header replaces the computed delay and is not capped. A context variable stops a nested call from starting a second retry loop. Every BaseLLM subclass gets the wrapper on call and acall automatically.The last error is re-raised unchanged; a non-throttling error is raised on the first attempt. ServiceQuotaExceededException is never retried.
Empty LLM answer retryutilities/agent_utils.py:529-5751 repeatThe model returns None, an empty string or no tool calls, or LiteLLM streaming raises EmptyLLMResponseError. The repeat is admitted through the RPM limiter like the first call.EmptyLLMResponseError is raised to the agent.
Agent retry limitagent/core.py:325-328, 908-960, 1074-1086max_retry_limit 2 (so up to 3 runs of a task)Any exception from a task run that is not a timeout, a passthrough stop or a LiteLLM exception. Each failed attempt emits AgentExecutionErrorEvent and the whole execute_task runs again from the start.The original exception is re-raised. LiteLLM exceptions are raised immediately without a retry.
Guardrail retriestask.py:290-292, 1425-1495; agent/core.py:396-398, 2260-2335guardrail_max_retries, default 3, on both Task and AgentA guardrail (a callable or an LLM-judged string) rejects the output. The rejection text is appended to the conversation and the task or agent kickoff runs again. The deprecated Task max_retries field is copied into it with a warning.ValueError naming the guardrail and its last error.
Execution timeoutagent/core.py:277, 1066-1128, 1243-1270max_execution_time seconds, off by defaultThe task run goes to a worker thread (sync) or an asyncio wait with a timeout (async) and the caller waits at most that long.TimeoutError, emitted as AgentExecutionErrorEvent and raised without a retry. The sync worker thread is not interrupted; cancelling the future cannot stop a running thread, so the abandoned run continues in the background until it ends.
Iteration capagents/agent_builder/base_agent.py:285-287; utilities/agent_utils.py:374-445max_iter 25The reasoning loop has taken max_iter steps without a final answer.One more LLM call with a "give your final answer" user turn; its output is accepted as the answer even when it does not parse.
RPM limiterutilities/rpm_controller.py:12-90; utilities/agent_utils.py:463-472max_rpm per crew or agent, off by defaultA model request when the per-minute counter has reached max_rpm.The calling thread sleeps 60 s, then proceeds. It never fails a request.
SQLite busy timeoutflow/persistence/sqlite.py:26-27, 91-110; memory/storage/kickoff_task_outputs_storage.py:44-4630 s per connection; schema creation retried every 0.05 s until the 30 s deadlineAnother process or thread holds a lock on flow_states.db or latest_kickoff_task_outputs.db. Both run in WAL mode. The checkpoint SQLite provider (state/provider/sqlite_provider.py) also uses WAL but passes no timeout, so it waits the sqlite3 default of 5 s.sqlite3.OperationalError is raised.
MCP operation retrymcp/client.py:53-56, 153-260, 702-7603 attempts with 1 s then 2 s waits; 30 s connect, discovery and execution timeoutsA tool listing or tool call that times out or fails with an error that is not authentication or not-found. There is no MCP connection retry: connect is bounded by its 30 s timeout and raises MCPConnectionError on failure, and the retry in _retry_operation wraps tool discovery and tool calls over an established connection (lines 425, 506, 638, 676).ConnectionError naming the attempts. Authentication failures and not-found errors are raised on the first attempt. Tool calls are retried without any idempotency key.
Swallowed exceptionstelemetry/telemetry.py:235-252; events/event_bus.py:401-421; memory/unified_memory.py:355-368; events/listeners/tracing/trace_batch_manager.py:287-325126 empty or comment-only error handlers in the evidence countTelemetry spans, trace export, event handlers, background memory saves, TUI rendering and other best-effort paths.Logged at debug or warning, printed to the console, or emitted as an event (MemorySaveFailedEvent); the run continues.

What surfaces and what is swallowed

Surfaces to the developer: every exhausted bound in the table above becomes an exception out of kickoff, after the matching failure event. A context window overflow is summarised away when respect_context_window is true (the Agent default); when it is false, handle_context_length raises SystemExit, which ends the host process rather than raising a catchable error. Tool errors are handled differently from other errors: a tool that raises is re-run up to its parsing-attempt limit (3, or 2 for some function-calling models), then the error text is given to the model as the tool's observation ("Moving on then") so the agent can choose another action. Only ToolExecutionFailedError stops the task.

Swallowed on purpose: telemetry (_safe_telemetry_operation returns None and logs at debug), trace export ("Failed to send trace events. Events will be lost." at warning; a refused AMP trace grant leaves the run untraced with a warning), event handler exceptions (_call_handlers prints them and continues, so a faulty listener never stops a crew), background memory saves (reported as MemorySaveFailedEvent, and drain_writes waits without re-raising). The evidence counts 126 empty or comment-only error handlers; the first it lists sit in the CLI's Textual TUIs and the checkpoint CLI, most marked noqa: S110 with the reason in a comment.

Absent: no dead-letter path (a failed run leaves its events, checkpoint and kickoff outputs locally and nothing queues it for retry), no circuit breaker (each call pays the full retry and timeout budget even when a provider is down), and no idempotency keys on LLM, tool or MCP calls, so the agent retry limit and the MCP retry can repeat a tool's side effect.

Functions named in this section

Functions named in this section 30 rows
FunctionWhereWhat it does
run_with_rate_limit_retryllms/retry.py:124Runs an LLM call and repeats it up to three attempts when the error is a provider throttle, sleeping a jittered backoff between attempts. Any other error is raised at once.
arun_with_rate_limit_retryllms/retry.py:166The asyncio version of the rate-limit retry, awaiting the call and sleeping without blocking the event loop.
get_retry_delay_secondsllms/retry.py:100Returns the wait before a retry: the provider's Retry-After value when given, otherwise 1 s doubled per retry, capped at 8 s, with plus or minus 20% jitter.
_retry_after_secondsllms/retry.py:208Looks through an exception and its causes for a numeric Retry-After header in the shapes the provider SDKs use.
_wrap_call_methodllms/base_llm.py:253Called from __init_subclass__ so that every LLM provider class has its own call and acall replaced by the rate-limit retry wrapper.
callllms/base_llm.py (abstract), each provider's completion.pySends a list of messages to the provider and returns its text or tool calls; each provider implements it, and the base class wraps it in the rate-limit retry.
acallllms/base_llm.py, each provider's completion.pyThe asyncio counterpart of call, wrapped in the async rate-limit retry the same way.
__init_subclass__llms/base_llm.py:246Runs when a BaseLLM subclass is defined and installs the retry wrapper on its call methods.
_call_llm_retrying_emptyutilities/agent_utils.py:529Makes an LLM call and repeats it once if the answer is empty, admitting the repeat through the RPM limiter. Raises EmptyLLMResponseError if both are empty.
_check_execution_erroragent/core.py:908Decides whether a failed task run may be retried: passthrough stops and LiteLLM errors are raised, otherwise it counts the attempt and raises once max_retry_limit is passed.
_handle_execution_erroragent/core.py:936The sync retry path: checks the error, then calls execute_task again from the start.
execute_taskagent/core.py:1003Runs one task for an agent, with or without a timeout, and sends any non-timeout failure to the retry handler.
_execute_with_timeoutagent/core.py:1090Runs the task in a one-thread pool and waits up to max_execution_time seconds, converting a timeout to TimeoutError and other failures to RuntimeError.
_aexecute_with_timeoutagent/core.py:1243The async version: awaits the task under an asyncio timeout and raises TimeoutError when the budget runs out.
_process_kickoff_guardrailagent/core.py:2260Validates a direct agent kickoff's output with its guardrail and, on rejection, appends the reason and re-runs, recursing until it passes or guardrail_max_retries is reached.
_invoke_guardrail_functiontask.py:1425Applies a task's guardrails to its output and re-executes the task with the rejection as feedback until it passes or the retry bound is hit.
has_reached_max_iterationsutilities/agent_utils.py:374Returns true when the loop's iteration count has reached max_iter.
handle_max_iterations_exceededutilities/agent_utils.py:387Asks the model one last time for a final answer and returns whatever it gives as the agent's finish.
enforce_rpm_limitutilities/agent_utils.py:463Calls the RPM limiter's admit function before a model request, if one is configured.
check_or_waitutilities/rpm_controller.py:38Admits a request while the minute's count is below max_rpm; otherwise sleeps 60 s and resets the count. Always returns true.
init_dbflow/persistence/sqlite.py:91Creates the flow state tables, retrying every 0.05 s while the database is locked, up to the 30 s busy deadline.
connectmcp/client.py:153Opens the MCP transport and session within the connect timeout, raising MCPConnectionError on timeout or failure.
_retry_operationmcp/client.py:702Runs an MCP operation under a timeout and retries it with 1 s then 2 s waits, except for authentication and not-found errors, which are raised immediately.
handle_context_lengthutilities/agent_utils.py:1011On a context overflow, summarises the conversation when the agent respects the context window, otherwise raises SystemExit.
kickoffcrew.py:1006Starts a crew run; any exception that escapes the task, agent and LLM layers is emitted as CrewKickoffFailedEvent and raised from here.
_execute_coretask.py:850Runs a task through its agent, applies guardrails and output conversion, and emits TaskFailedEvent before re-raising any failure.
_execute_methodflow/runtime/__init__.py:2927Runs one flow method (sync methods on a worker thread), emitting MethodExecutionFailedEvent on failure or a paused event when it raises HumanFeedbackPending.
_safe_telemetry_operationtelemetry/telemetry.py:235Runs a telemetry span operation only when telemetry is enabled, and logs any exception at debug instead of raising it.
_call_handlersevents/event_bus.py:401Calls every sync handler for an event, collects the handlers that raised, and prints their errors to the console without stopping the emitter.
drain_writesmemory/unified_memory.py:355Blocks until every pending background memory save has finished, without re-raising their failures.

Error handling and resilience rating

Error handling and resilience: 7/10, Good

Good. Retries are layered by failure type and each is bounded: LLM rate-limit retry with exponential backoff and jitter (3 attempts, 1 to 8 s), an empty-answer retry, agent max_retry_limit 2 and max_iter 25, guardrail retry bounds, max_execution_time timeouts, an RPM limiter, SQLite busy timeouts and schema retry, and MCP operation retry. Failures are emitted as events, and telemetry errors are dropped on purpose so they never break a run. The gaps are 126 empty handlers, no idempotency keys on LLM or tool calls, and no circuit breaker or dead-letter path; the technical assessment gives the reasoning per criterion.

14. Availability and recovery

There is no HA topology. CrewAI is a library and a CLI that run inside the developer's own process, so a crew or flow is exactly as available as the process, machine and network that host it; the repository deploys no servers, replicas, load balancers or failover (section 10). What the framework does provide is recovery inside a run's lifetime: checkpoints that let a crashed run resume, task replay from stored outputs, and flows that persist a paused state so a different process can pick them up later. The table names the three single points of failure first, then the three recovery mechanisms.

ItemKindWhat depends on it, or what it recoversBehaviour in the code
LLM providerSingle point of failureEvery agent step: each agent calls one configured model at one provider, and nothing in a run can proceed without it.No failover to a second provider or model. LLM rate-limit retry: 3 attempts, 1 s initial delay, 8 s cap, 20% jitter, only for 429/throttling errors. Any other provider error, or an outage longer than the retries, fails the task and with it the crew or flow run.
Local storage directorySingle point of failureFlow state, pending feedback, kickoff task outputs, memory and knowledge all live in one per-project directory under appdirs.user_data_dir on one disk (section 11).No replica and no backup. Losing or corrupting the directory loses resumable flows, replay data and accumulated memory. The directory is keyed by the current directory's name unless CREWAI_STORAGE_DIR is set, so running from a renamed or different directory opens a new, empty set of stores.
CrewAI AMP platformSingle point of failure for platform featuresCLI login, deploy, organisation and tool repository commands, and trace upload, all go to https://app.crewai.com by default.A crew running locally does not need the platform: trace and telemetry failures are logged and dropped so they never stop a run. The CLI commands that talk to the platform fail until it returns. The availability of deployed crews is AMP's, outside this repository.
Checkpoint resumeRecovery mechanismA crew, flow or agent that crashed or was stopped part-way.Off unless a CheckpointConfig (or checkpoint=True) is set on the object or inherited from the crew or flow around it. It then writes the runtime state on each configured event, by default task_completed, to JSON files or SQLite. from_checkpoint restores the object so the next kickoff continues after the last completed task; fork restores onto a new branch.
Task replayRecovery mechanismRe-running a crew from a chosen task without repeating the tasks before it.replay (also crewai replay -t) loads the latest kickoff's stored task outputs, feeds the earlier outputs back as context and runs from the chosen task. Only the most recent kickoff is kept, because each kickoff clears the table.
Human feedback resumeRecovery mechanismA flow waiting for a person, across process restarts.The flow raises HumanFeedbackPending after save_pending_feedback stores its state and pause context. Any later process rebuilds it with from_pending and continues with resume or resume_async, which clears the pending record.
FunctionWhereWhat it does
from_checkpointlib/crewai/src/crewai/crew.py:434Loads a checkpoint into a runtime state, finds the crew in it and restores its runtime, ready to resume from the last completed task on the next kickoff. The flow version is at lib/crewai/src/crewai/flow/runtime/__init__.py:656.
forklib/crewai/src/crewai/crew.py:459Restores a crew from a checkpoint and moves the runtime state onto a new branch, so further checkpoints do not extend the original line. The flow version is at lib/crewai/src/crewai/flow/runtime/__init__.py:706.
replaylib/crewai/src/crewai/crew.py:2118Loads the stored outputs of the latest kickoff, validates the task to start from, and re-runs the crew from that task with the stored or supplied inputs.
save_pending_feedbacklib/crewai/src/crewai/flow/persistence/sqlite.py:285In one transaction, appends a state snapshot and replaces the flow's pending feedback record with the pause context and state.
from_pendinglib/crewai/src/crewai/flow/runtime/__init__.py:1260Builds a flow instance from the pending feedback record saved for a flow id, using the given persistence or the default one.
resumelib/crewai/src/crewai/flow/runtime/__init__.py:1349Continues a paused flow with the human's feedback, collapsing it to an outcome when the method declares outcomes, and triggers the downstream listeners.
resume_asynclib/crewai/src/crewai/flow/runtime/__init__.py:1402The async version of resume, for callers already inside an event loop.

Backup, restore, RTO and RPO

Nothing in the repository backs up a store, and no RTO or RPO is stated anywhere: a search of the code, workflows and README for backup, RTO, RPO and disaster recovery finds only action names in the platform app catalogue. Restore exists only in the in-run sense above. The nearest thing to a recovery point is the checkpoint trigger, which is the last completed task by default and every event with on_events=["*"]; without checkpoints a crashed crew restarts from the beginning. Retention, and therefore how far back a restore can go, is unbounded unless max_checkpoints is set.

Deployment safety and disaster recovery

The release path has one safety step: a nightly .devYYYYMMDD pre-release of every package is published each day main changes, so a change can be installed and tried before a manual publish.yml release. There is no rollback in the repository: a bad release is replaced by publishing a new version, and users protect themselves by pinning. Rolling back a crew deployed to CrewAI AMP is a platform feature not visible here. There is no second region or account because there is no infrastructure; a developer's own deployment of a crew carries whatever disaster recovery its host provides. Nothing detects or alerts on a failed run (section 16): the developer sees the exception, or the failed trace in AMP when tracing is on.

Availability and recovery rating

Availability and recovery: 5/10, Fair

Fair. As a library it has no HA topology of its own, but it does build recovery in: checkpoints with resume and fork, task replay from stored kickoff outputs, and flows that persist a pending human-feedback state and resume in a later process. Nothing backs up the local stores, no RTO or RPO is stated, every run depends on one LLM provider with no failover, and nothing detects or alerts on a failed run. The technical assessment gives the reasoning per criterion.

15. Performance and scale

CrewAI runs inside the developer's process, so its performance is that process's performance plus the latency of every model and tool call it makes. Almost all wall-clock time in a run is spent waiting on the network: an agent completing one task makes between one and max_iter (25 by default) LLM calls, each sending the whole conversation so far, plus a tool call for most steps. The CPU work CrewAI does itself (prompt assembly, parsing, event emission, local SQLite and LanceDB writes) is small beside that. The scale questions that matter are therefore how many model calls a run makes, how many of them run at once, and how big the context sent on each one grows.

Hot paths

Hot pathEntry functionWhereWhat it doesWhat drives its cost
Agent reasoning loopinvokeagents/agent_executor.py:3132Runs the agent's reason, act, observe loop for one task until a final answer, returning a coroutine when called inside an event loop. AgentExecutor is itself a Flow, so each step is a flow method.Steps up to max_iter; every step re-sends the full message history, so tokens per call grow with each tool observation until context-window summarisation trims them. The file is 3655 lines.
LLM callget_llm_responseutilities/agent_utils.py:713Admits the request through the RPM limiter, runs the before-call hooks, calls the model (with the rate-limit retry wrapped round it) and repeats once on an empty answer.Provider latency and token count. A throttled call can add up to 1 + 2 s of backoff, or the provider's Retry-After, before failing.
Memory recall and saverecall, remember_manymemory/unified_memory.py:686, 528recall waits for pending saves, then either embeds the query and runs one vector search (shallow) or runs a recall flow in which an LLM splits the query into sub-queries and searches scopes in parallel (deep, the default). remember_many queues records for the single background save worker.Deep recall adds LLM calls on top of embedding calls; every save is an embedding call plus a LanceDB write, serialised one at a time, and recall blocks until the queue drains.
Knowledge retrievalqueryknowledge/knowledge.py:135Searches the agent's or crew's knowledge collections for the query and returns the top results above a similarity threshold (5 results, 0.6 by default).One embedding call per query plus a ChromaDB vector search; ingestion chunks and embeds every source when the knowledge is first added.
Flow method dispatch_execute_methodflow/runtime/__init__.py:2927Runs one flow method: awaits it if it is async, otherwise runs it on a worker thread, then persists state when the method is marked for persistence.Thread hand-off per sync method and a SQLite write per persisted method; the runtime file is 4074 lines and kickoff_async alone is 431 lines.
Async task executionexecute_asynctask.py:650Starts the task on a new daemon thread with a copy of the caller's context and returns a future the crew collects at the next synchronous task.One OS thread per async task with no pool or upper bound; consecutive async tasks all run at once and all call the provider at once.

Concurrency model

Sync and asyncio APIs sit side by side on Crew, Flow and Agent. The sync API is the reference path; the async API either wraps it in a thread or runs natively. Inside a crew, tasks marked async_execution run on threads; inside a flow, listeners triggered by the same event run concurrently on the event loop. Memory saves go to a single background worker so writes never race. There is no process pool and no distributed execution: one run is one process.

FunctionWhereWhat it doesConcurrency it gives
kickoff_asynccrew.py:1146Runs the synchronous crew kickoff on a worker thread so an async caller can await it.One thread per call; the crew inside is still sequential or hierarchical as configured.
akickoffcrew.py:1226Native async kickoff that awaits tasks, memory and knowledge operations directly instead of wrapping the sync path in a thread.Many crews can share one event loop without a thread each.
_process_async_taskscrew.py:2035Waits for the futures of the async tasks started since the last synchronous task and collects their outputs in order.Joins the threads started by execute_async.
_execute_listenersflow/runtime/__init__.py:3171Finds the listeners and routers triggered by a finished method and runs them, gathering independent listeners together and racing the members of an OR group.Concurrent listeners on one event loop; their sync bodies run on worker threads.
_submit_savememory/unified_memory.py:302Submits a memory save to the one-worker save pool and tracks its future, falling back to a synchronous save if the pool is shut down.Saves run off the caller's thread but strictly one at a time.
_execute_with_timeoutagent/core.py:1090Runs an agent's task in a one-thread pool and waits up to max_execution_time.A thread per timed task; a timed-out run keeps its thread until it ends.

Caching

Four caches exist, all in process and all scoped to one run or one process unless the developer configures otherwise. The tool result cache is opt-in: it is active only when the crew sets cache=True (the Crew default is false) or an agent is built with a cache handler. When active, the same tool with the same input string returns the stored output instead of calling again, and a declared tool failure is never stored; the field's own description warns against enabling it for live-data or state-changing tools. LanceDB, the memory store, is compacted in a background thread on start and every 100 saves so fragment files do not slow queries, and its scope column carries a BTREE index. The file upload cache stores provider file IDs for uploaded files so a file is not uploaded twice, in memory by default (Redis optional), with a 24 hour TTL (86,400 s) and 1000 entries. MCP tool lists can be cached per server for 300 s when a client is created with tool-list caching on (off by default). There is no cache of LLM responses.

CacheWhereWhat it doesBound
add (tool result cache)agents/cache/cache_handler.py:23Stores a tool's output under the tool name and input string, skipping declared failures.Unbounded dict for the life of the crew or agent; opt-in.
read (tool result cache)agents/cache/cache_handler.py:46Returns the stored output for a tool name and input, or nothing, under a read lock.As above.
_compact_asyncmemory/storage/lancedb_storage.py:238Starts a daemon thread that runs LanceDB's table optimise to merge fragment files, logging any failure at debug.Every 100 saves and once at start.

Known limits

LimitValueWhereWhen it bites
Iteration capmax_iter 25agents/agent_builder/base_agent.py:285-287A task that needs more tool steps than this is forced to a final answer by one extra LLM call once the count is reached. It is also the only bound on a single task's cost: 25 calls with a long history is the worst case per attempt, times up to 3 attempts under max_retry_limit 2.
Requests per minutemax_rpm, unset by defaultutilities/rpm_controller.py:38-70When set, the request that crosses it sleeps a full 60 s regardless of how far into the minute it is. Unset, nothing stops a crew with parallel async tasks from hitting the provider's own quota.
Provider throttling3 attempts, 1 s initial delay, 8 s cap, 20% jitter (with 3 attempts the waits are about 1 s and 2 s, so the cap is never reached)llms/retry.py:35-38Sustained 429s from the provider: after the third throttled attempt the error reaches the agent, which may re-run the whole task.
Context windowthe model's window; summarisation on by defaultutilities/agent_utils.py:1011-1046; agent/core.py:317-320Long tool outputs or many steps overflow the window; each overflow costs an extra summarisation pass of LLM calls, and with summarisation off the process exits.
Memory scan limit50,000 rowsmemory/storage/lancedb_storage.py:34, 486-512Listing, category and scope operations that scan the memories table without a vector query read at most 50,000 rows after filtering.

Load evidence: none. There is no benchmark, load test, profiling harness or stated load level anywhere in the repository; CI runs pytest with a 60 s per-test timeout, which bounds test duration but measures nothing. How many concurrent crews one process sustains, or how memory recall degrades with store size, is not recorded.

Performance and scale rating

Performance and scale: 6/10, Fair

Fair. The concurrency model is deliberate (sync and asyncio entry points, threaded async tasks, a background memory-save worker, concurrent flow listeners), with a tool result cache, a LanceDB scope index and compaction, an RPM limiter and context-window summarisation. The gaps are that there is no benchmark, load test or stated load level anywhere, the agent loop is bounded only by max_iter and provider limits, and the hot paths sit in files of over 3,000 lines. The technical assessment gives the reasoning per criterion.

16. Observability

CrewAI is a library, so its observability is designed for two audiences: the developer watching a run, and the CrewAI platform collecting what the developer agrees to send. Everything starts on the in-process event bus. Every crew, task, agent, LLM call, tool use, memory operation and flow method emits typed events; one set of listeners turns them into console output, another into anonymous telemetry spans, another into execution traces for the CrewAI AMP trace viewer. Nothing in the repository ships logs, metrics or alerts to an operations system, because the library deploys nothing of its own; a developer who hosts a crew wires those into their own application.

Signals

The table reproduces the evidence's six signals in full, with its present flag and match counts, then says what each one actually is after reading the matches.

SignalEvidence says presentMatchesFilesWhat it isWhere it goes and what it covers
Loggingyes593122Present. Standard library module-level loggers (one per module, named after it), mostly at debug and warning, plus a coloured console printer gated by each agent's or crew's verbose flag.To whatever handlers the host application configures; the library adds none except the A2A module's opt-in JSON formatter. Debug lines cover swallowed telemetry, tracing and storage failures; the console printer covers agent steps, tool calls and retries as they happen.
Metricsyes21False positive. Both matches are an event emission sequence counter in events/base_events.py:18-39 that orders events within a context, not a metric.Nowhere. Token usage is collected per run and returned on the crew output as token_usage, but no metrics backend, counter export or dashboard exists.
Tracingyes28657Present, in two forms. Anonymous telemetry is on by default and exports OpenTelemetry spans to https://telemetry.crewai.com:4319; it is off when OTEL_SDK_DISABLED, CREWAI_DISABLE_TELEMETRY or CREWAI_DISABLE_TRACKING is set. Execution traces are sent in batches to the CrewAI platform through PlusAPI (initialize_trace_batch, send_trace_events and ephemeral variants), controlled by CREWAI_TRACING_ENABLED and crewai traces enable/disable.Telemetry goes to CrewAI's collector and records that crews, agents, tasks and tools ran, without prompts or outputs unless the crew sets share_crew (false by default). Execution traces go to the developer's AMP account (or an anonymous ephemeral batch with an access code) and cover the full event stream of a run, viewable as a timeline at the link printed when the run ends. A newer path in execution.py asks AMP for a trace grant and exports OpenTelemetry spans to the collector URL the grant names.
Error reportingyes9722False positive. The matches are Sentry hosts inside Content-Security-Policy headers recorded in HTTP test cassettes under lib/crewai/tests/cassettes/.Nowhere. No error reporting SDK is installed or called; failures surface as exceptions to the developer and as failure events on the bus.
Alertingyes52False positive. The matches are PagerDuty as a platform app name and its action names in crewai_core/platform_app_defaults.py:274 and platform_apps.py:314, a tool an agent can call, not an alert route.Nowhere. Nothing in the repository pages or notifies anyone.
Health checksno00Absent. The library runs no long-lived service of its own (the A2A server and the deployed crew on AMP are hosted by other code), so there is no endpoint to probe.Nowhere.

How the signals are produced

FunctionWhereWhat it does
setup_listenersevents/event_listener.py:177Registers the default console and telemetry handlers for every event type on the bus. At 904 lines it is the longest function in the repository.
register_handlerstelemetry/tracing/handlers.py:132Subscribes the span-building handlers that turn crew, agent, task, LLM and tool events into OpenTelemetry spans for a trace session.
_safe_telemetry_operationtelemetry/telemetry.py:235Runs a telemetry span operation only when telemetry is enabled and drops any error with a debug log.
_start_tracingexecution.py:154At the start of a run, decides whether to trace it and either opens an authenticated AMP trace grant, an anonymous ephemeral trace, or nothing; a refused grant leaves the run untraced with a warning.
initialize_trace_batchcrewai_core/plus_api.py:599Asks the CrewAI platform to open a trace batch for a run and returns its response.
send_trace_eventscrewai_core/plus_api.py:616Posts a batch of collected trace events to the platform for an open trace batch.
_send_events_to_backendevents/listeners/tracing/trace_batch_manager.py:287Sends the buffered events for the current batch through PlusAPI, logging "Events will be lost" at warning when the send fails.
_finalize_backend_batchevents/listeners/tracing/trace_batch_manager.py:386Closes the batch on the platform and prints a console panel with the link to the trace viewer.
_get_or_create_counterevents/base_events.py:18Returns the per-context counter that numbers emitted events, the match the evidence read as a metric.
get_next_emission_sequenceevents/base_events.py:33Takes the next number from that counter and records it as the last emitted sequence.

Who would notice a failure

The developer, at the console, immediately, when they ran the crew themselves: an exception reaches them from the kickoff call and verbose mode shows each step, retry and tool error as it happens. The developer, later, in the AMP trace viewer, if tracing is enabled and they open the printed link. For a crew deployed to CrewAI AMP, detection belongs to the platform, which is outside this repository. Nobody, otherwise. A crew embedded in someone's service fails into that service's own logs and error handling; nothing in this repository pages anyone, counts failures or exposes a health endpoint. Swallowed side-channel failures (telemetry, trace export, background memory saves) are visible only at debug or warning level, so a trace batch that never arrives is noticed when someone looks for it. Logs exist and the library reads none of them back; that is a design fact for a library, and the host application owns the rest.

17. Redundant code

The evidence lists 193 duplicate-body groups and 84 unreferenced functions as candidates. Each was checked against the source; 22 items survive. Eight are copies of a body that already exists in a class the copy could inherit from or a helper it could share. Fourteen are private functions whose name appears exactly once in the repository, at the definition: a whole-word search of every Python file under lib/, scripts/ and the root conftest.py finds no call, no string lookup and no re-export. Because they are private, no other repository should be calling them either. Deleting any of the 22 changes nothing the system does.

Redundant code 22 rows
CodeFile and linesWhat it doesWhat makes it redundant
_chunk_text (six overrides)crewai/knowledge/source/csv_knowledge_source.py:46-51, excel_knowledge_source.py:176-181, json_knowledge_source.py:58-63, pdf_knowledge_source.py:58-63, string_knowledge_source.py:36-41, text_file_knowledge_source.py:38-43Splits a source's text into chunk_size slices that overlap by chunk_overlap characters, ready for embedding.A copy of BaseKnowledgeSource._chunk_text (base_knowledge_source.py:43-48), which every one of the six classes already inherits; each override is identical to it.
ExcelKnowledgeSource: validate_file_path, _process_file_paths, validate_contentcrewai/knowledge/source/excel_knowledge_source.py:31-43, 45-72, 74-89Validate that a file path was given, normalise the deprecated file_path and file_paths fields into a list of paths, and log any path that does not exist.Copies of the same three methods on BaseFileKnowledgeSource (base_file_knowledge_source.py:30-42, 89-116, 54-69). The Excel source subclasses BaseKnowledgeSource instead of BaseFileKnowledgeSource, as the CSV, JSON, PDF and text sources do, and so re-implements them.
create_crew_from_zip (crewai_cli)cli/src/crewai_cli/plus_api.py:167-193Uploads a local project ZIP archive to the CrewAI platform to create a crew deployment, with an optional name, environment and project id.The crewai_cli PlusAPI subclasses the crewai_core PlusAPI, and this override is identical to the parent method it replaces (crewai_core/plus_api.py:528-554).
ContextWindowSummarizationEvent.__init__crewai/events/types/llm_events.py:131-144Replaces the task and agent objects passed to the event with their id, name and role before the event is built, so the event does not hold live objects.Identical to LLMEventBase.__init__ in the same file (lines 15-28). The event cannot simply subclass LLMEventBase, which requires a call_id, but the shared body belongs in one place both inherit from.
get_client_id (five copies)crewai_core/auth/providers/auth0.py:30-35, entra_id.py:32-37, keycloak.py:26-31, okta.py:30-35, workos.py:26-31Returns the OAuth2 client id from the provider settings, or raises ValueError when it is not configured.Five identical bodies in the five providers; the abstract method on BaseProvider could carry the body once.
_initialize_firecrawl (two copies)crewai_tools/tools/firecrawl_crawl_website_tool/firecrawl_crawl_website_tool.py:82-105, firecrawl_search_tool/firecrawl_search_tool.py:81-104Creates the Firecrawl SDK client with the tool's API key, offering to install firecrawl-py with uv if it is missing.The two tools carry the same 24-line body; one shared helper (or a common Firecrawl base) would serve both.
_get_file_path (two copies)crewai_files/uploaders/bedrock.py:52-64, gemini.py:75-87Returns the filesystem path of a file input when its source is a local path, otherwise nothing.The Bedrock and Gemini uploaders define the same module-level function; it belongs in the shared uploader base module.
lib/crewai/tests/cli (23 Python files)lib/crewai/tests/cli/ against lib/cli/tests/Tests the CLI's OAuth2 providers, token manager, settings, version checks and PlusAPI client.The largest duplicate groups in the evidence are this suite and lib/cli/tests line for line (Okta 251 lines, AtomicFileOperations 145, EntraId 135, Keycloak 132, Settings 131, TokenManager 124, and more). Both exercise the same crewai_core code; the copy under lib/crewai reaches it through the crewai re-export modules (crewai.auth, crewai.plus_api, crewai.settings, crewai.version, documented as stable import paths), and 8 of its files import crewai_cli directly. None of its 23 files imports the deprecated crewai.cli shim.
_refusedcli/src/crewai_cli/experimental/eval_crew.py:2398Prints the refusal message for an AMP HTTP response and exits with status 1.No caller anywhere in the repository.
_has_lockfilecli/src/crewai_cli/run_crew.py:531Returns true when the project has a uv or Poetry lockfile.No caller; the run code calls the uv and Poetry lockfile checks it combines directly (run_crew.py:550, 565).
_next_selectable_indexcli/src/crewai_cli/tui_picker.py:477Moves a picker cursor one step in a direction, skipping separator rows, and stays put at either end.No caller anywhere in the repository.
_handle_api_responsecrewai_tools/tools/scrapegraph_scrape_tool/scrapegraph_scrape_tool.py:143Validates a Scrapegraph API response, raising a rate-limit or runtime error when it is empty, carries an error or lacks a result.No caller; the tool never routes its responses through it.
_crew_to_agent_cardcrewai/a2a/utils/agent_card.py:446Builds an A2A AgentCard describing a crew's name, description and skills at a given URL.No caller anywhere in the repository.
_normalize_grpc_metadatacrewai/a2a/utils/delegation.py:656Lowercases every gRPC metadata key, because gRPC rejects mixed-case header names.No caller; the gRPC interceptors beside it do not use it.
_extract_tool_namecrewai/agents/agent_executor.py:2482Reads and sanitises the tool name from the several shapes a provider's tool call can take.No caller anywhere in the repository.
_supports_stop_words_implementationcrewai/llms/base_llm.py:670Returns true when the LLM instance has stop sequences configured.Its docstring says native providers can return it from their stop-word check, but none does.
_ahandle_tool_use_conversationcrewai/llms/providers/anthropic/completion.py:2004Runs the async Anthropic tool-use exchange: executes the requested tools and sends their results back for a final answer.No caller anywhere in the repository.
_is_nova_modelcrewai/llms/providers/bedrock/completion.py:2284Returns true when the Bedrock model id names an Amazon Nova model.No caller anywhere in the repository.
_get_document_formatcrewai/llms/providers/bedrock/completion.py:2323Maps a document MIME type to the Bedrock document format name (pdf, csv, docx and others).No caller anywhere in the repository.
_get_video_formatcrewai/llms/providers/bedrock/completion.py:2345Maps a video MIME type to the Bedrock video format name (mp4, mov, webm and others).No caller anywhere in the repository.
_is_async_callablecrewai/tools/base_tool.py:113Returns true when a callable is a coroutine function.No caller; a one-line wrapper over the standard library check it calls.
_call_llm_with_reasoning_promptcrewai/utilities/reasoning_handler.py:610Sends a reasoning-plan prompt for a task to the LLM and returns the plan text.Marked deprecated and "kept for backward compatibility", but it is private and nothing calls it; superseded by the current reasoning handler.

Candidates dropped, and why

Most of the evidence's candidates are not redundant. Of the unreferenced functions, the public ones and those reached by name were dropped. That covers the Textual action_ and on_ handlers in the CLI TUIs, which Textual calls through key bindings and message names, and the gRPC intercept_ methods and init_poolmanager, which are framework overrides. It also covers create_module (the importlib loader protocol behind the deprecated crewai.cli shim), the conftest iter_ shims and pytest_recording_configure (an aiohttp stream interface and a pytest hook), and public API such as copy_template_files and the a2a helpers, which other repositories may call. Of the duplicate groups, the test-only ones other than the CLI suite were dropped: repeated fixtures and helper functions inside test modules are a test-style choice, not dead code. The small per-class protocol methods were dropped too, because lifting them would add a base class for four to seven lines. One family shows the shape of the dropped items:

CandidateWhereWhat it doesWhy it is not redundant
action_resumecli/src/crewai_cli/checkpoint_tui.py:716Closes the checkpoint browser with "resume" as the chosen action for the selected checkpoint.Textual calls action_ methods by name from key bindings.
on_tree_node_selectedcli/src/crewai_cli/memory_tui.py:273Loads and lists the memory entries for the scope the user selected in the memory browser's tree.Textual dispatches messages to on_ methods by name.
intercept_unary_unarycrewai/a2a/utils/delegation.py:706Injects the A2A auth metadata into a unary gRPC call before it is sent.A gRPC client interceptor override; gRPC calls it.
init_poolmanagercrewai_tools/security/ssrf_adapter.py:271Builds the connection pool for the SSRF-validating HTTP adapter.A requests adapter override; requests calls it when the adapter is mounted.
create_modulecrewai/cli/__init__.py:36Returns the already-imported crewai_cli module for an old crewai.cli import path.Part of the importlib loader protocol; the import system calls it.
iter_chunkedconftest.py:45Iterates a recorded response body in chunks of a given size.Completes the aiohttp stream interface for replayed cassettes; aiohttp clients call it.
pytest_recording_configureconftest.py:448Registers the custom VCR request matchers (a Bedrock host matcher) for each cassette session.A pytest plugin hook, called by name.
copy_template_filescli/src/crewai_cli/create_crew.py:162Copies the project template files into a new crew project.Public API of crewai_cli that other code may import.
is_retryable_errorcrewai/a2a/errors.py:464Says whether an A2A error code (internal error, rate limit exceeded, task timeout) might succeed on retry.A public helper in the a2a package that code building on the A2A integration may import.
__aexit__ (four copies)crewai/mcp/client.py:788, transports/http.py:187, sse.py:105, stdio.py:162Disconnects the MCP client or transport when an async with block ends.The async context manager protocol, implemented by each class over its own disconnect.
get_audience (three copies)crewai_core/auth/providers/auth0.py:23, entra_id.py:25, okta.py:23Returns the configured OAuth2 audience, or raises when it is missing.Only three of five providers share this body (WorkOS and Keycloak return a fallback instead of raising), so there is no single place for it, unlike get_client_id.
_get_sync_client (four copies)crewai/llms/providers/anthropic/completion.py:339, azure/completion.py:373, bedrock/completion.py:352, openai/completion.py:479Builds the provider's SDK client on first use and returns the cached one after that.A four-line lazy accessor over each provider's own client builder.
unwrap (three copies)crewai/flow/flow_wrappers.py:104, project/wrappers.py:219, 327Returns the original method a decorator wrapper holds.A one-line accessor on three unrelated wrapper classes.

18. What was deliberately not drawn

A diagram earns its place here only when it shows something the source cannot, usually a relationship that crosses a boundary the call graph cannot follow. On that test this document draws ten figures: the module dependency figure in section 4; the layered call graph in section 5, with dashed edges for calls the graph does not resolve; four sequence diagrams in section 6 (the crewai run subprocess, A2A delegation, human feedback pause and resume, telemetry and trace export); three state diagrams in section 7 (the AgentExecutor reasoning loop, the Flow human feedback lifecycle, the A2A task lifecycle); and the deployment topology in section 10. Everything else was considered and left out, for the reasons below.

Diagram type rejectedWhy it was not drawnWhere the same ground is covered
class diagramThe Pydantic model hierarchy (Agent, Task, Crew, Flow, BaseTool, BaseLLM) is readable from the source and the 552-file package would make an unreadable figure; the call graph and state machines show the relationships that matter.Sections 5 and 7
entity-relationship diagramEvery store is an independent single-purpose local file with one or two tables and no foreign keys between them; the store and index tables in section 11 say everything an ER diagram would.Section 11
control-flow flowchartOrdinary control flow inside kickoff or the agent loop is what the code already is; the genuine branching is drawn as state machines in section 7.Section 7
network diagramThe repository deploys no infrastructure: no VPC, hosts, containers or IaC, so there is no network to draw beyond the deployment topology in section 10.Section 10
per-tool integration diagramThe 84 tools each make one outbound call to one API; a fan of 84 arrows says less than the integrations and outbound calls tables in section 12.Section 12

Absences carried into the assessment

Every absence the sections state, one line each, with the section that states it. This document describes; it does not judge. Which of these absences is a risk, how serious it is, what it would cost to operate around and what to fix first are questions for the technical assessment, which rates each one in its risk register (section 11) and orders the fixes in its remediation roadmap (section 12).

Download