Working through this module?0 of 19 done
Module 04 · Page 5 of 20 · 9 sections

Agent Frameworks and Tools

LangChain, LangGraph, AutoGen, CrewAI and the others, and how to pick between them.

4.1

What are Agent Frameworks?

  • Agent frameworks are libraries and platforms that provide building blocks to create, configure and run AI agents.
  • They simplify development by handling common tasks like tool integration, memory management, planning and orchestration.
  • Developers can focus on application logic instead of building everything from scratch.
4.2

Popular Agent Frameworks

FrameworkLanguageKey featuresUse cases
LangChainPythonChains, agents, tools, memoryRAG, chatbots, custom agents
LangGraphPythonGraph-based agents, multi-agent workflowsComplex workflows, state management
AutoGenPythonMulti-agent conversationCollaborative agents, automation
CrewAIPythonRole-based agents, easy configurationTeam of agents, business automation
Semantic KernelPython / C# / JSEnterprise ready, plugins and toolsEnterprise apps, tool integration
LlamaIndexPythonData ingestion, RAG and agentsKnowledge apps, document Q&A
4.3

LangChain Architecture (Overview)

User Query
LangChain
Agent / Chain
ToolsAPIs, DB, search, etc.
LLMe.g. GPT-4, Claude
MemoryConversation + context
Response to User
4.4

LangChain Components

1
LLM
Interface to interact with language models (e.g. OpenAI, Anthropic, local models).
2
Prompt Templates
Reusable templates for instructions.
3
Chains
Combine multiple steps together.
4
Agents
Use tools to decide and take actions.
5
Tools
External integrations (search, APIs, database, code).
6
Memory
Maintain conversation history and context.
7
Output Parsers
Structure the model output.
4.5

LangGraph (Graph based Agent)

  • LangGraph allows building stateful, graph-based multi-agent workflows.
  • It is useful for complex tasks where agents need to collaborate, loop or maintain state.
  • Each node in the graph can represent an agent, tool or logic step.
Start
Agent 1Planner
Agent 3Reviewer
End
Agent 2Tool user
LangGraph workflow: nodes are agents, edges carry state.
4.6

AutoGen (Multi-Agent Framework)

  • Developed by Microsoft for building multi-agent conversational systems.
  • Supports different types of agents (Assistant, User, Critic, etc.).
  • Agents can communicate, share context and work together to solve tasks.
User AgentProvides goal
Assistant AgentPlans & executes
Critic AgentReviews output
Shared MemoryConversation history, task state
AutoGen multi-agent conversation.
4.7

CrewAI (Role Based Agents)

  • CrewAI makes it easy to create a team of agents with specific roles and goals.
  • Each agent has a role, backstory and set of tools.
  • Useful for real-world business workflows.
Researcher AgentResearch topic
Writer AgentGenerate content
Reviewer AgentCheck quality
CrewAI team setup.
4.8

Choosing the Right Framework

CriteriaLangChainLangGraphAutoGenCrewAI
Best forGeneral purposeComplex workflowsMulti-agent conversationsRole-based teams
Ease of useEasyModerateModerateEasy
Multi-agent supportYesYes (advanced)YesYes
Tool integrationWide supportWide supportGoodGood
Ideal use caseRAG, chatbotsStateful agentsCollaborative agentsBusiness workflows
4.9

Key Takeaways

  • Use frameworks to speed up agent development.
  • Choose the right framework based on your use case.
  • All frameworks support tool integration and memory.
  • For complex multi-agent workflows, LangGraph or AutoGen are better options.