Skip to content

A Python-based project comparing CrewAI, LangGraph, and AutoGen by implementing the same stock analysis workflow across all three. Each agent framework generates a BUY / SELL / HOLD recommendation with rationale—ideal for exploring multi-agent design patterns and orchestration styles.

License

Notifications You must be signed in to change notification settings

Vigneshmaradiya/ai-agent-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Agent Frameworks Comparison: CrewAI vs LangGraph vs AutoGen

This project demonstrates and compares three leading Python agent frameworks for orchestrating multi-agent financial analysis workflows:

  • CrewAI: Role-based, sequential agent orchestration
  • LangGraph: State-driven, graph-based agent workflows
  • AutoGen: Conversational, group-chat style agent collaboration

All three frameworks are implemented to solve the same problem: analyzing a stock's recent performance and generating an investment recommendation (BUY/SELL/HOLD) with rationale.


📦 Project Structure

ai-agent-comparision/
├── crewai/      # CrewAI implementation
├── langgraph/   # LangGraph implementation
├── autogen/     # AutoGen implementation
├── requirements.txt
├── .env.example
└──  README.md


🚀 How to Use & Run Each Framework

1. Prerequisites

  • Python 3.8+
  • API keys for Groq and Tavily
  • Install dependencies:
    python -m venv .venv
    source .venv/Scripts/activate  # Windows
    pip install -r requirements.txt
    cp .env.example .env  # and fill in your API keys

2. Running Each Implementation

CrewAI

cd crewai
python main.py
  • Prompt: Enter a stock ticker (e.g. NVDA, AAPL)
  • Output: Executive summary and recommendation

LangGraph

cd langgraph
python main.py
  • Prompt: Enter a stock ticker
  • Output: Analysis and recommendation

AutoGen

cd autogen
python main.py
  • Prompt: Enter a stock ticker
  • Output: Analyst/Researcher group chat, final report

🧩 Framework Comparison Table

Feature CrewAI LangGraph AutoGen
Orchestration Sequential pipeline State graph (DAG) Group chat (conversational)
Agent Roles Explicit, role-based Node-based, flexible Conversational, flexible
Task Flow Linear, step-by-step Custom graph transitions Multi-turn dialogue
Extensibility Add agents/tasks Add nodes/edges Add agents, chat logic
Best For Business workflows Complex dependencies Dynamic collaboration
Code Structure agents.py, tasks.py, tools.py nodes.py, state.py, tools.py agents.py, workflow.py, config.py
Learning Curve Low/Medium Medium/High Medium
Output Executive report Analysis + recommendation Chat log + report

🛠️ How to Extend

  • Add new data sources: Edit tools.py in any framework
  • Change agent logic: Edit agents.py or nodes.py
  • Add new analysis steps: Add new tasks/nodes/agents as appropriate

📚 Further Reading


This project is a reference for anyone looking to build modular, multi-agent systems in Python using modern frameworks.

About

A Python-based project comparing CrewAI, LangGraph, and AutoGen by implementing the same stock analysis workflow across all three. Each agent framework generates a BUY / SELL / HOLD recommendation with rationale—ideal for exploring multi-agent design patterns and orchestration styles.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages