mirror of
https://github.com/crewAIInc/crewAI-examples.git
synced 2026-01-09 13:57:57 -05:00
* Reorganize repo structure and upgrade to CrewAI 0.152.0 * chore(gitignore): ignore Python bytecode and __pycache__ across templates * chore(gitignore): ignore Python bytecode and __pycache__ across templates; clean tracked artifacts * Update crews/instagram_post/pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CrewAI + LangGraph
Introduction
This is an example of how to use the CrewAI with LangChain and LangGraph to automate the process of automatically checking emails and creating drafts. CrewAI orchestrates autonomous AI agents, enabling them to collaborate and execute complex tasks efficiently.
By @joaomdmoura
CrewAI Framework
CrewAI is designed to facilitate the collaboration of role-playing AI agents. In this example, these agents work together to give a complete stock analysis and investment recommendation
Running the Code
This example uses GPT-4.
- Configure Environment: Copy ``.env.example` and set up the environment variable
- Setup a credentials.json: Follow the google instructions, once you’ve downloaded the file, name it
credentials.jsonand add to the root of the project, - Install Dependencies: Run
pip install -r requirements.txt(includes crewAI==0.130.0) - Execute the Script: Run
python main.py
Details & Explanation
- Running the Script: Execute
python main.py - Key Components:
./src/graph.py: Class defining the nodes and edges../src/nodes.py: Class with the function for each node../src/state.py: State declaration../src/crew/agents.py: Class defining the CrewAI Agents../src/crew/tasks.py: Class definig the CrewAI Tasks../src/crew/crew.py: Class defining the CrewAI Crew../src/crew/tools.py: Class implementing the GmailDraft Tool.
License
This project is released under the MIT License.
