Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

1.5 KB
Raw Blame
    {
      // 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
    }