Which Framework for Which Use Case
Customer Support Agents
Best framework: OpenAI Agents SDK
Customer support agents need to classify incoming requests, route them to the right specialist, access customer data, take actions (refunds, account changes, ticket creation), and maintain conversational context across multiple turns. The OpenAI Agents SDK handles this pattern through its handoff mechanism: a triage agent classifies the request and hands off to a billing specialist, technical support agent, or account manager. Each specialist has its own tools and system prompt optimized for its domain.
The SDK's guardrails feature adds input validation at each handoff boundary, preventing prompt injection and ensuring that sensitive operations (refunds, account modifications) receive appropriate scrutiny before executing. For support workflows that need approval gates, LangGraph provides human-in-the-loop capabilities where the agent pauses for manager approval before processing refunds above a threshold.
For high-volume support operations, the Vercel AI SDK is the better choice if the support interface is a web application, because its streaming and React integration provide a better real-time user experience than the OpenAI SDK's synchronous completion model.
Content Creation
Best framework: CrewAI
Content creation workflows decompose naturally into roles: a researcher gathers information and sources, a writer produces the draft, an editor polishes the language and structure, and a fact-checker verifies claims against sources. CrewAI's role-based model maps directly to this team structure, with each agent having a specialized role, tools, and quality standards.
A typical content creation crew processes tasks sequentially: the researcher's output becomes context for the writer, the writer's draft becomes input for the editor, and the editor's polished version goes to the fact-checker. Each agent can access the tools it needs, like web search for the researcher, style guides for the editor, and source verification tools for the fact-checker, without overloading any single agent with all tools.
For content creation that requires multiple rounds of revision (the writer drafts, the editor critiques, the writer revises, the editor re-evaluates), AutoGen's conversational model produces higher quality through iterative refinement. The tradeoff is 3-5x higher cost per piece due to the multi-round conversation. Use AutoGen for high-value content where quality justifies the cost, and CrewAI for volume content where cost efficiency matters more.
Data Analysis and Business Intelligence
Best framework: LlamaIndex for data querying, LangGraph for analytical pipelines
Data analysis agents need to translate natural language questions into database queries, execute those queries, interpret the results in business context, and present findings in actionable formats. LlamaIndex provides the strongest data connectivity layer with text-to-SQL agents, multi-source query decomposition, and support for over 160 data sources. If your agent's primary job is answering questions about data, LlamaIndex provides the most direct path.
For structured analytical pipelines (collect data, clean it, analyze it, interpret results, generate a report), LangGraph's graph-based model lets you define each stage as a node with conditional routing based on intermediate results. If the analysis reveals anomalies, the pipeline can branch into an investigation path. If results are inconclusive, the pipeline can loop back for additional data collection. LangGraph's checkpointing means expensive data operations are not repeated if the pipeline fails at a later stage.
Code Generation and Development
Best framework: OpenAI Agents SDK or Anthropic Agent SDK
Code generation agents need model quality above all else, because the quality of generated code depends primarily on the model's coding ability, not on the framework's features. The vendor SDKs (OpenAI and Anthropic) provide the tightest integration with their respective models, including features like extended thinking, structured outputs, and code-specific tool calling that maximize code quality.
Anthropic's Agent SDK is particularly strong for code generation because Claude's extended thinking capability shows the model's reasoning process before it produces code. This transparency helps developers understand why the agent chose a specific implementation approach and catch logical errors before the code is written. The Agent SDK also supports long context windows that can hold entire codebases, enabling agents to generate code that is consistent with existing patterns and conventions.
For code review workflows where multiple perspectives improve quality (a security reviewer, a performance reviewer, and a style reviewer examining the same code), CrewAI provides a natural multi-agent model. Each reviewer agent has specialized expertise and tools, and their combined feedback is more thorough than any single agent's review.
Workflow Automation
Best framework: LangGraph for code-based, N8N for no-code
Workflow automation agents orchestrate multi-step business processes: processing incoming emails, extracting data from attachments, updating CRM records, notifying stakeholders, and filing documents. These workflows need conditional branching (different processing for different email types), error recovery (retry failed CRM updates), and human approval at decision points (flag unusual transactions for review).
LangGraph handles all of these requirements through its graph-based execution model. Each workflow step is a node, conditional logic is expressed as edge conditions, error recovery is built into the graph with retry nodes and fallback paths, and human approval uses LangGraph's interrupt and resume mechanism. Checkpointing ensures that long-running workflows survive process restarts without losing progress.
For teams that want to build workflow automation without writing code, N8N provides a visual workflow builder with 400+ integrations and an AI agent node for intelligent decision-making within workflows. N8N is the right choice when the workflow primarily connects existing services and the AI component is one part of a larger automation rather than the central logic.
Research and Analysis
Best framework: AutoGen
Research tasks benefit from iterative refinement through multi-agent conversation. A literature review agent proposes a hypothesis, a methodology agent critiques the analytical approach, a data analyst challenges the assumptions, and the group refines the synthesis through multiple rounds of discussion. This conversational pattern produces more thorough and nuanced research outputs than any single agent, because each agent contributes a different analytical perspective.
AutoGen's group chat mechanism supports this pattern natively. You define agents with specialized expertise, configure a conversation topology, and let the agents collaborate through structured debate. The conversation produces a research output that has been examined from multiple angles and refined through iterative critique.
The cost of AutoGen's conversational approach is significant, with multi-round debates generating 10-20+ LLM calls per research task. This cost is justified for high-value research where thoroughness matters more than speed: competitive analysis, market research, technology assessments, and strategic planning. For routine research tasks with well-defined answers, a single-agent approach with LlamaIndex or the OpenAI SDK is more cost-effective.
Chatbots and Conversational AI
Best framework: Vercel AI SDK for web, OpenAI SDK for backend
Conversational agents that interact with users in real time need fast streaming responses, conversation state management, and smooth frontend integration. The Vercel AI SDK provides all three through its React hooks (useChat, useCompletion) that handle streaming, state, and rendering in a few lines of code. The combination of backend agent logic and frontend chat interface in the same TypeScript codebase produces the best development experience for web-based chatbots.
For chatbots that are API-only (no web frontend), the OpenAI Agents SDK provides the simplest backend with built-in conversation management and tool use. Phidata is an alternative that adds a knowledge base for domain-specific chatbots and a playground UI for testing.
Document Processing
Best framework: LlamaIndex for extraction, LangGraph for pipelines
Document processing agents extract information from documents (PDFs, contracts, invoices, reports), classify documents by type, validate extracted data against business rules, and route processed documents to downstream systems. LlamaIndex provides the strongest document ingestion and extraction capabilities, with parsers for dozens of document formats and extraction strategies that handle structured, semi-structured, and unstructured content.
For document processing pipelines that need to handle thousands of documents with specific routing rules, quality checks, and exception handling, LangGraph provides the workflow orchestration layer. Each stage of the pipeline (ingest, extract, validate, classify, route) is a graph node with conditional edges that handle exceptions and quality failures.
Sales and Marketing Automation
Best framework: CrewAI for campaigns, N8N for lead processing
Marketing content campaigns benefit from CrewAI's role-based model: a market researcher identifies trends and audience needs, a strategist develops the campaign angle, a copywriter produces the content, and a reviewer ensures brand consistency and quality. Sales lead processing, where incoming leads are scored, enriched with data from external sources, and routed to the appropriate sales rep, fits N8N's workflow automation model with an AI node for intelligent scoring and routing.
Match the framework to your dominant agent pattern: simple tool loops need the OpenAI or Vercel SDK, team collaboration needs CrewAI, data reasoning needs LlamaIndex, complex workflows need LangGraph, iterative research needs AutoGen, and no-code automation needs N8N. When your use case spans patterns, choose the framework for your primary pattern and adapt it for secondary needs.