crewAIInc/crewAI · error · SystemExit
Template '{name}' not found.
Error message
Template '{name}' not found. What it means
Raised by `crewai template add <name>` when RemoteTemplateManager._resolve_repo_name() cannot match the given name to any public repo in the crewAIInc GitHub org whose name starts with the `template_` prefix. It is a user-input validation error: the template catalog was fetched successfully, but nothing matches. The CLI prints the message in red, suggests `crewai template list`, and exits with code 1.
Source
Thrown at lib/cli/src/crewai_cli/remote_template/main.py:104
fg="yellow",
)
selected = templates[selected_index]
repo_name = selected["name"]
self._install_repo(repo_name)
def add_template(self, name: str, output_dir: str | None = None) -> None:
"""Download a template and copy it into the current working directory.
Args:
name: Template name (with or without the template_ prefix).
output_dir: Optional directory name. Defaults to the template name.
"""
repo_name = self._resolve_repo_name(name)
if repo_name is None:
click.secho(f"Template '{name}' not found.", fg="red")
click.echo("Run 'crewai template list' to see available templates.")
raise SystemExit(1)
self._install_repo(repo_name, output_dir)
def _install_repo(self, repo_name: str, output_dir: str | None = None) -> None:
"""Download and extract a template repo into the current directory.
Args:
repo_name: Full GitHub repo name (e.g. template_deep_research).
output_dir: Optional directory name. Defaults to the template name.
"""
folder_name = output_dir or repo_name.removeprefix(TEMPLATE_PREFIX)
dest = os.path.join(os.getcwd(), folder_name)
while os.path.exists(dest):
click.secho(f"Directory '{folder_name}' already exists.", fg="yellow")
folder_name = click.prompt(
"Enter a different directory name (or 'q' to quit)", type=str
)View on GitHub (pinned to 754d7323be)
Solutions
- Run `crewai template list` and copy the exact template name from the output.
- Retry the add command with the exact name (with or without the `template_` prefix — _resolve_repo_name accepts both).
- Check for typos, wrong hyphens/underscores, or trailing whitespace in the name.
- If the template should exist, verify it on GitHub under the crewAIInc org and open/update the naming in your docs if it was renamed.
Example fix
# before $ crewai template add deep-reserch # typo # Template 'deep-reserch' not found. # after $ crewai template list $ crewai template add template_deep_research
Defensive patterns
Strategy: validation
Validate before calling
from crewai_cli.remote_template.main import RemoteTemplateManager
mgr = RemoteTemplateManager()
available = [t["name"] for t in mgr.list_templates()] # names as published
if "template_deep_research" not in available:
raise SystemExit("template not in catalog; pick from: " + ", ".join(available)) Prevention
- Always source template names programmatically from `crewai template list`, never hardcode them from docs.
- In automation, fetch the catalog first and fail early with the valid options printed.
- Treat exit code 1 after this message as 'bad name', not 'network failure' — retrying won't help.
When it happens
Trigger: Calling `crewai template add my_template` where no repo named `template_my_template` exists in the org; typos in the template name; passing a name with the `template_` prefix that does not correspond to a real repo; the template was renamed or removed upstream after a doc/page you read.
Common situations: Following a tutorial that references a template that no longer exists; casing or underscore mistakes in the name; offline docs listing stale template names.
Related errors
- Missing required input '{name}'
- Invalid --definition path: {definition} is not a file.
- Error: Unknown or readonly configuration key '{key}'
- Invalid JSON payload provided as argument
- Invalid JSON payload provided as argument
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/c0d79e6594b6c7f0.
Report an issue: GitHub.