Skip to content

This repository contains detailed introduction to Langgraph, a new Langchain library. You will learn about langgraph and also create a miniproject using crewai and langgraph

Notifications You must be signed in to change notification settings

Ionio-io/langgraph-with-crewai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

langgraph-with-crewai

This repository contains detailed introduction to Langgraph, a new Langchain library. You will learn about langgraph and also create a miniproject using crewai and langgraph

Read the Blog!

🤔 How it works?

1. Get information from user and categorize it

Agent will take the user input and then categorize it based on the user query

2. Decides where to go using conditinal edge of langgraph

Agent uses langgraph to use the node based on the category of user query

3. Uses Langgraph nodes to integrate different workflows

Each workflow can be used as a subgraph or node which makes it easy to visualize and create any complex workflow which makes it multi-purpose agent.

⚒️ Architecture

Let’s take a look at the workflow of our agent!

We will first add the user input in our entry node where the user input will be categorized into 3 categories:

  • email_query: If user want to generate an email response to given email
  • weather_query: If user want weather information about any location
  • other: If user want any other information

Now based on the categories, we will redirect the query to right node. 🔂

We will use CrewAI to create a crew which can categorize the email and then based on the category it will write a response. We will also create an separate agent for weather where we will provide the openweather function as a tool and it will automatically format the final weather information response. For all other queries, we will just make a simple OpenAI call.

Prerequisites

Here are the things you will need to create this project

How to run?

  • Clone the repository
  • Setup your environment variables
import os
os.environ['OPENAI_API_KEY'] = openai_secret
os.environ["OPENWEATHERMAP_API_KEY"] = openweather_secret
  • Open any jupyter notebook from repository
  • Select your existing python environment or create one using anaconda
  • Run the code

About

This repository contains detailed introduction to Langgraph, a new Langchain library. You will learn about langgraph and also create a miniproject using crewai and langgraph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published