Recurring analytical reports — weekly business reviews, competitor scans, experiment digests — decompose naturally into researcher → analyst → writer roles.
Tier: Advanced · Workflow area: Agentic systems
This playbook builds the pipeline twice on purpose: CrewAI to get a working prototype in an hour, then a LangGraph port to measure what the convenience costs. 2026 benchmarks put role-framework token overhead at up to ~3x an explicit graph for the same task; measuring that on your own workload is the deliverable.
Single-source, single-step summaries do not need multiple agents — one well-prompted call beats a crew on cost, latency, and debuggability.
pip install crewai langgraph (separate virtualenvs recommended — dependency trees clash).Fix the task spec first. One page: report sections, data inputs, quality bar (e.g. "every claim cites its source", "numbers match the CSV exactly"). Both implementations run against this same spec — otherwise the comparison is meaningless.
Build the CrewAI prototype. Three agents with role/goal/backstory (researcher: gather and extract; analyst: compute and interpret numbers; writer: assemble the report), sequential process, tools for file reading and search. Get it producing an acceptable report; note wall-clock time to build.
Instrument token usage. Capture per-run input tokens, output tokens, number of LLM calls, and latency — from the framework's usage metrics or your provider dashboard. Run the report 3 times and average.
Port to LangGraph. Same three stages as explicit nodes with a typed state dict (raw_findings, analysis, report). No role prompts or backstories — each node gets a tight task prompt plus only the state fields it needs. This is the point: you control exactly what context each step sees, instead of the framework replaying conversation history between agents.
Run the same 3-run measurement on the LangGraph version. Build the comparison table: tokens/run, calls/run, latency, $/report, build time, and a subjective quality check (blind-compare two reports, or score both against your spec with a rubric judge from the evals module).
Write the recommendation memo. One paragraph: which framework for this workload, at what cost delta, and what would change the decision (e.g. "CrewAI if the report structure churns weekly; LangGraph once it stabilizes").
Role-based frameworks spend tokens replaying inter-agent chatter as context; explicit graphs pass only the state you choose. The ~2–3x cost gap is not a benchmark curiosity — it is the price of implicit context management, and it recurs every single run.
Both frameworks are OSS and run fully locally against a self-hosted vLLM/Ollama endpoint — token measurement still works via the endpoint's usage fields. For client data, keep source documents local and disable any framework telemetry (both frameworks have opt-out env vars; check current docs) before running on real content.
Do the cost math at production frequency — a 3x token overhead on a daily report across 50 teams is a real budget line; on a monthly report it is noise. Frequency, not ratio, decides.