crewAIInc/crewAI · error · SystemExit
Missing required input '{name}'
Error message
Missing required input '{name}' What it means
Input validation before a crew kickoff: _missing_input_names(crew, inputs) returned required input names that are absent from both the `--inputs` JSON and the `inputs` object in crew.json(c). The CLI prints each missing name in red plus a dim hint about how to supply them, then exits 1 before any LLM call is made — so this error costs nothing but must be fixed by providing data.
Source
Thrown at lib/cli/src/crewai_cli/run_crew.py:235
if missing and interactive:
inputs.update(
prompt_for_inputs(
missing,
title="Crew inputs",
subtitle="This crew needs the following to run.",
)
)
missing = _missing_input_names(crew, inputs)
if missing:
for name in missing:
click.secho(f" Missing required input '{name}'", fg="red", err=True)
click.secho(
" Provide them via --inputs or the `inputs` object in crew.json(c).",
dim=True,
err=True,
)
raise SystemExit(1)
return inputs
def _json_loading_status(message: str) -> AbstractContextManager[Any]:
from rich.console import Console
from rich.text import Text
console = Console()
if not console.is_terminal:
return nullcontext()
return console.status(
Text(f" {message}", style="bold #1F7982"),
spinner="dots",
)
def _load_json_crew(crew_path: Path) -> tuple[Any, dict[str, Any]]:View on GitHub (pinned to 754d7323be)
Solutions
- Add each listed name to your --inputs JSON: `crewai run --inputs '{"topic": "..."}'` or point --inputs at a file.
- Alternatively put the values in the `inputs` object of crew.json / crew.jsonc.
- Check exact spelling/casing of keys against the error output — matching is exact.
- If an input should be optional, remove it from the crew's required inputs in the definition.
Example fix
# before
$ crewai run --inputs '{"topic": "AI"}'
# Missing required input 'audience'
# after
$ crewai run --inputs '{"topic": "AI", "audience": "engineers"}' Defensive patterns
Strategy: validation
Validate before calling
# Before running, check required inputs against the crew definition
required = {"topic", "audience"} # from your crew definition
provided = set(inputs_from_cli_or_file()) # keys you will pass
missing = required - provided
if missing:
raise SystemExit(f"missing required inputs: {sorted(missing)}") Prevention
- Keep a checked-in sample inputs JSON next to the crew definition and use it in scripts.
- Validate input key sets in CI before the crew run step, so failures are caught pre-LLM cost.
- When renaming a required input, grep your scripts/CI for the old name in the same commit.
When it happens
Trigger: Running `crewai run` (classic or JSON crew) where the crew definition declares required inputs but: --inputs is omitted, the JSON passed to --inputs is missing keys, key names don't match exactly (case/typo), or crew.json's `inputs` object doesn't cover all required fields.
Common situations: Sharing a crew definition without sharing the sample inputs file; renaming a required input in the definition but not in run scripts/CI; nested keys flattened vs dotted mismatches; new required inputs added by a teammate.
Related errors
- Invalid --inputs JSON: {exc}
- Invalid --inputs JSON: expected an object.
- Template '{name}' not found.
- Invalid --definition path: {definition} is not a file.
- Error: Unknown or readonly configuration key '{key}'
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/fa756ea398f224cb.
Report an issue: GitHub.