🚀
langraph
1. Elements

Elements

State

  • The State is a shared data Structure that holds current information or context of an application.
  • In simpler terms, it is application memory, keeping track of variables and data that notes can access and modify as they execute.

Node

  • Notes are individual functions or operations that perform specific task within the graph
  • Each note receives input (often the current state) processes it and produces an output or an updated

Graph 📊

  • A graph in line graph in an overarching structure that maps out how different task (nodes) are connected and executed.
  • It visually represents the workflow, showing the sequence and conditional paths between various operations.

Edge

  • Edges are the connections between nodes that determine the flow of execution.
  • They tell us which node should be executed next after the current one completes its task.

Conditional Edges

  • Conditional Edges are specialized connections that decide the next node to execute based on specific conditions or logic applied to the current state.

Start 🏁

  • The State node is a virtual entry point in LangGraph, marking where the workflow begins.
  • It doesn't perform any operations itself but serves as the designated starting position for the graph's execution.

End 🔚

  • The End nodes signifies the conclusion of workflow in LangGraph.
  • Upon reaching this nodes, the graph's execution stops, indicating that all intended processes have been completed.

Tools 🛠️

  • Tools are specialized functions or utilities that nodes can utilize to perform specific tasks such as fetching data from an API.
  • They enhance the capabilities of nodes by providing additional functionalities.
  • Nodes are part of the graph structure, while tools are functionalities used within nodes.

ToolNode

  • A toolnode is just a special kind of node whose main job is to run a tool.
  • It connects the tool's output back into the state, so other nodes can use that information.

State Graph

  • A stategraph is a class in LangGraph used to build and compile the graph structure.
  • It manages the nodes, edges and the overall state, ensuring that the workflow operates in a unified way and that data flows correctly between components

Runnable ⚡️

  • A runnable in LangGraph is a standardized, executable component that species a specific task within an AI workflow.
  • It serves as a fundamental building block and allowing for us to create modular systems.

Messages 📬

👨🏻‍⚖️ Human Message
  • Represents input from a user.
💻 System Message
  • Used to provide instructions or context to the model
🧩 Functional Message
  • Represents the result of a function call
🤖 AI Message
  • Represents responses generated by AI models
🔨 Tool Message
  • Similar to Function Message, but specific to tool usage.

© 2024 Driptanil Datta.All rights reserved

Made with Love ❤️

Last updated on Mon Oct 20 2025