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.

2.1 KB
Raw Blame
{
  // Agent's role title — appears in prompts and logs.
  // You can use {placeholder} inputs in role, goal, or backstory.
  // Example: "role": "Senior {industry} Researcher"
  "role": {{role_json}},

  // Optional custom Agent subclass
  // "type": {"python": "my_project.agents.CustomAgent"},

  // The agent's primary objective
  "goal": {{goal_json}},

  // Background story that shapes the agent's personality and approach
  "backstory": {{backstory_json}},

  // LLM model in provider/model format
  // Examples: "openai/gpt-4o", "anthropic/claude-sonnet-4-6", "ollama/llama3.3"
  // For custom endpoints or deployment-based providers, replace with:
  // "llm": {"model": "llama3", "provider": "ollama", "base_url": "http://localhost:11434"},
  // "llm": {"deployment_name": "my-deployment", "provider": "azure", "api_version": "2024-10-21"},
  "llm": {{llm_json}},

  // Override LLM used specifically for tool/function calling
  // "function_calling_llm": "openai/gpt-5.4-mini",

  // Tools available to this agent
  // Built-in: "SerperDevTool", "ScrapeWebsiteTool", "FileReadTool", etc.
  // Custom: "custom:my_tool" loads from tools/my_tool.py
  "tools": {{tools_json}},

  // Optional agent-level guardrail — validates this agent's final output.
  // String guardrails are checked by an LLM and can reject/retry output.
  // Python refs must point to module-level functions/classes in trusted code.
  // "guardrail": "Only answer with information supported by retrieved evidence.",
  // "step_callback": {"python": "my_project.callbacks.on_agent_step"},
  // "guardrail_max_retries": 2,

  // Advanced agent options:
  // Docs: https://docs.crewai.com/concepts/agents
  // "reasoning": true,
  // "max_reasoning_attempts": 3,
  // "planning_config": {
  //   "reasoning_effort": "medium",
  //   "llm": {"model": "deepseek-chat", "provider": "deepseek"}
  // },
  // "multimodal": false,
  // "allow_code_execution": false,
  // "code_execution_mode": "safe",
  // "knowledge_sources": [],
  // "knowledge_config": {},
  // "inject_date": true,
  // "date_format": "%Y-%m-%d",
  // "security_config": {},

  // Agent behavior settings
  "settings": {
{{settings_block}}
  }
}