📎CrewAI Task
The job description your agent has to do
- agent
- task
If the 📎CrewAI Agent node is the who, this node is the what. A Task in CrewAI terms is a single unit of work handed to an agent - and in this pack, that work is always, ultimately, "write me positive and negative image prompts." The Task node is where you describe the job, optionally attach an agent to it, and the 📎CrewAI Crew node later runs it.
The inputs
description(required, multiline) - the job itself, in plain language. This is where the{topic}placeholder matters: put{topic}inside the description and the Crew node'stopicfield gets substituted in at run time. "Create vivid prompts about {topic} for a photorealistic model" is the shape that works.expected_output(optional, multiline) - what a good result looks like. CrewAI uses this to grade its own output. For this pack, keep steering it toward the prompt pair: "positive and negative prompts for conditioning an image model."agent(optional,CREWAI_AGENT) - who does the task. Wire your 📎CrewAI Agent here. Leave it empty and the crew will assign the task to whoever's available (in hierarchical mode, the manager decides).
One output, task (CREWAI_TASK), which feeds the Crew node's tasks input - directly for a single task, or through a 📎CrewAI Task List for several.
The part nobody tells you
This node is not a free-form text job. Look at the source and you'll see it hard-codes a structured output schema:
class PromptOutput(BaseModel):
positive_prompt: str
negative_prompt: str
Every Task in this pack is created with output_json=PromptOutput, meaning the agent's final answer is parsed as JSON expecting exactly positive_prompt and negative_prompt keys. That's why the Crew node outputs are named positive and negative - it reads those two fields out of the task result. It's also why a task description like "summarize this text" would silently break the flow: the crew expects a prompt pair back, not a summary. Keep every task description aimed at producing that JSON shape and you'll be fine.
How a run flows
The Crew node substitutes {topic} into this task's description, kicks off the crew, and the agent (using whatever LLM you gave it) writes the prompt pair. The task itself does zero work at graph-construction time - it's just a spec object sitting on the wire until the Crew executes. So a lone Task node in your graph doing nothing isn't a bug; you need the whole chain - LLM → Agent → Task → Crew - before anything happens.
Installing
Ships with ComfyUI-CrewAI. ComfyUI Manager → search "ComfyUI-CrewAI", or clone https://github.com/luandev/ComfyUI-CrewAI into custom_nodes and pip install -r requirements.txt. No model downloads; the "brains" come from whatever LLM node feeds your agent.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| description | STRING | — | |
| expected_outputopt | STRING | — | |
| agentopt | CREWAI_AGENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| task | CREWAI_TASK | — |