Visualize a CrewAI crew and estimate its cost per task
Paste the code that defines your agents, tasks and crew, and Nodagentry draws it as a graph with the estimated cost of each task. Then run it in the free simulator, move an expensive task to a cheaper model and compare the cost before and after.
From crew to graph
A three-task crew: research, a draft, and an edit a person reviews before it ships.
from crewai import Agent, Task, Crew, Process
researcher = Agent(role="Researcher", goal="Find the facts", backstory="...", llm="gpt-4o")
writer = Agent(role="Writer", goal="Write the brief", backstory="...", llm="gpt-4o-mini")
editor = Agent(role="Editor", goal="Check and tighten it", backstory="...", llm="gpt-4o")
research = Task(description="Research {topic}", expected_output="Notes", agent=researcher)
draft = Task(description="Write a one-page brief", expected_output="Brief", agent=writer)
review = Task(description="Edit the brief", expected_output="Final brief", agent=editor,
human_input=True)
crew = Crew(agents=[researcher, writer, editor], tasks=[research, draft, review],
process=Process.sequential)
Two of the three tasks run on gpt-4o. In the editor, the top insight moves the most expensive steps to a cheaper tier; apply it, run again, and Change in your code lists the llm= values to swap.
How CrewAI maps to the graph
| In your code | In Nodagentry |
|---|---|
| Task(..., agent=researcher) | A model step on that agent's price tier |
| Crew(tasks=[...]) order | Steps in that order, Input to Result |
| Task(context=[other_task]) | An edge from those tasks instead of the previous one |
| Task(human_input=True) | An approval step after the task |
| Process.hierarchical, manager_llm | A Manager step before the tasks |
| Crew(planning=True) | A Plan step before the tasks |
| Agent(tools=[...]) | Listed on the step; tools add no model cost |
Models are read from llm= as a string, an LLM(model=...) object, or a LangChain chat model variable.
Price tiers
Each task lands on one of five tiers. You can change any step's tier in the Inspector.
| Tier | Models in your code | Per 1M tokens in / out |
|---|---|---|
| Frontier Pro | claude-opus-4-1, o3, gpt-4.5 | $15 / $60 |
| Frontier | gpt-4o, gpt-4.1, claude-sonnet-4-5, gemini-2.5-pro | $2.5 / $10 |
| Frontier Mini | gpt-4o-mini, claude-3-5-haiku, gemini-2.5-flash, o3-mini | $0.8 / $3.2 |
| Open 70B | llama-3.3-70b, mixtral-8x7b, qwen2.5:72b | $0.4 / $0.8 |
| Local 7B | llama3.1:8b, qwen2.5:7b, mistral | $0.05 / $0.1 |
What it can't see yet
- CrewAI Flows (@start and @listen). Paste the crews they run one at a time.
- Agents and tasks configured only in YAML: their models come from code, or the default.
- Delegation between agents and tool retries, which can add calls at run time.
Questions
- Is my CrewAI code uploaded or run?
- No. The importer reads the code as text in your browser to find agents, tasks and models. Nothing is executed and the code is not sent to a server. If you are signed in, the imported graph is saved to your account as a new workflow.
- How is the cost of each task estimated?
- Each task takes the model of the agent that does it. The editor estimates input and output tokens from the task and the kind of step, then multiplies by that model's price tier. Run Live with your own key to see real token counts.
- What if an agent doesn't set llm?
- It uses the crew's llm if there is one, otherwise CrewAI's default model (gpt-4o-mini when this guide was written). The importer says which steps it assumed, and you can change the tier in the Inspector.
- Does it work with @CrewBase classes and YAML config?
- Yes. @agent, @task and @crew methods are read like plain definitions. If tasks name their agent only in tasks.yaml, the importer pairs tasks and agents by order when the counts match and tells you it did.
- Is Nodagentry affiliated with CrewAI?
- No. Nodagentry is an independent product by Wasapile Labs. CrewAI is a trademark of its owner.
Next
Catch cost increases before they merge with the CI cost check, or see how LangGraph and OpenAI Agents SDK code import.