Files
crewAI/lib/cli/src/crewai_cli/templates/json_crew/task.jsonc
Vinicius Brasil a149a30bc0 Fix JSON crew template rendering (#6359)
JSON crews were not using existing CLI templates.
2026-06-26 13:48:48 -07:00

41 lines
1.5 KiB
JSON

{
// Task identifier
"name": {{name_json}},
// What the task should accomplish
// Use {placeholder} inputs here; crewai run prompts for missing values
"description": {{description_json}},
// Clear definition of what the output should look like
"expected_output": {{expected_output_json}},
// Optional task guardrail(s) validate output before completion
// Use "guardrail" for one rule or "guardrails" for many
// Failed guardrails retry up to guardrail_max_retries times
// "guardrail": "Every factual claim needs context support.",
// "guardrails": [
// "Every factual claim must be supported by context.",
// "The answer must match the expected output format."
// ],
// "guardrail_max_retries": 2,
// Advanced task options:
// Docs: https://docs.crewai.com/concepts/tasks
// "type": "ConditionalTask",
// "condition": { "python": "my_project.conditions.should_run" },
// "output_json": { "python": "my_project.models.ReportOutput" },
// "output_pydantic": null,
// "response_model": null,
// "converter_cls": { "python": "my_project.converters.CustomConverter" },
// "markdown": false,
// "input_files": { "brief": "data/brief.txt" },
// "security_config": {},
// Which agent handles this task
"agent": {{agent_json}}{{agent_comma}}{{context_block}}{{output_file_block}}
// "tools": [],
// "human_input": false,
// "async_execution": false
}