Skip to content

Latest commit

 

History

History

langchain-langgraph

LangChain and LangGraph examples

Those examples are based on guides from the official LangChain/LangGraph documentation :

  • langchain-rag.ts· : A simple RAG workflow, based on this cookbook
  • langgraph.ts : A basic LangGraph flow using one tool, based on this cookbook
  • multi-agent.ts : A more involved example involving 2 agents and a supervisor, based on this cookbook

Usage

  • Install dependencies with npm install
  • Copy the .env.example file as .env
  • Input your Literal AI and OpenAI API keys
    • If you want to test the multi-agent flow, you will need to create a free account on Tavily and input your TAVILY_API_KEY in .env
  • Run the scripts with npx : npx ts-node langgraph.ts