Time Travel Lets see how langgrpah supports debugging by viewing, replaying and even forking past states To browse history we can use graph.get_state on the graphs side to fetch the information and we can also browse the state history of our agent using get_state_history If you want to run the grap from a particular checkpoint… Continue reading Gen-AI Developer Classroom notes 15/Jun/2025
Tag: data-science
Gen-AI Developer Classroom notes 14/Jun/2025
langgraph-sdk This sdk is used to call the graphs Refer Here for SDK create a folder sdk-examples with two subfolders client graphs In graphs create a virtual environment and activate the virtual environment. open vs code in the folder and select interpreter use the requirements.txt from here install all dependencies Refer Here for the changes… Continue reading Gen-AI Developer Classroom notes 14/Jun/2025
Gen-AI Developer Classroom notes 11/Jun/2025
Streaming in langgraph Refer Here for graph Initially we have setup synchronous execution with invoke Graph as streaming support with two methods stream astream Refer Here for official docs stream modes updates: display only the updates values: display all the values updated so far. Async and Await in python Refer Here for tutorial import asyncio… Continue reading Gen-AI Developer Classroom notes 11/Jun/2025
Gen-AI Developer Classroom notes 10/Jun/2025
Message Summarization Refer Here for the jupyter notebook with solution for message summarization.
Gen-AI Developer Classroom notes 09/Jun/2025
Trimming Messsages Refer Here for the fix for remove message reducer Summarizing messages Watch classroom video for topics Exercise: Refer Here and figure out what is happening with summarization For debugging Refer Here and create a langstudio graph and ensure summarization works
Gen-AI Developer Classroom notes 08/Jun/2025
Reducers Lets build a graph which will have parallel nodes In the above graph, both B and C Execute at same time in parallel When we change state in parallel, Invalid Update Error is shown, to resolve this we can implement reducers Langgraph has inbuilt reducer add_messages to add message during nodes Langgraph also has… Continue reading Gen-AI Developer Classroom notes 08/Jun/2025
Gen-AI Developer Classroom notes 05/Jun/2025
Langgraph Persistence (memory) Refer Here for official docs Refer Here for the changes done Refer Here for the jupyter notebook. Filtering States Refer Here
Gen-AI Developer Classroom notes 04/Jun/2025
Handling different States Langgraph is basically designed to work with one state type. i.e. input and output should be of same type. This means we can have different intermediate state. Number guessing game State: input as well as output guessed_number result intermediate state guessed_number result count picked_number React agents This concept was introduced as a… Continue reading Gen-AI Developer Classroom notes 04/Jun/2025
Gen-AI Developer Classroom notes 03/Jun/2025
State Langgraph state can be implemented in 3 ways TypedDict DataClasses Pydantic Langgraph state can be of multiple types Pydantic built in specialized types Built-in Specialized Types | Validator / Type | Summary | |———————–|—————————————————————————————————| | EmailStr | Validates that a string is a properly formatted email address. Uses the email-validator package internally[2][5]. | |… Continue reading Gen-AI Developer Classroom notes 03/Jun/2025
Gen-AI Developer Classroom notes 01/Jun/2025
Tools Refer Here for some tools prebuilt by langchain Lets install a pip package called as python-dotenv now create a file called as .env and add Tavily Api key and also openweather Refer Here for the jupyter notebook with tools to search web and get weather information. Lets try building an graph with the following… Continue reading Gen-AI Developer Classroom notes 01/Jun/2025
Gen-AI Developer Classroom notes 31/May/2025
looping in tools Number Guessing Game: User enters a number, a random number will be picked 5 times, if that matches the guess user wins or looses Refer Here Tool Nodes ToolNode Refer Here for example
Gen-AI Developer Classroom notes 28/May/2025
Langgraph contd.. Lets interact with llms using langgraph and also our tools For today our tools will be simple python functions Refer Here In Langgraph tools are functions or external APIS that LLM can call as part of workflow or graph node. Tools extend the LLM capabilities beyond just generating, In a simplest form a… Continue reading Gen-AI Developer Classroom notes 28/May/2025
Gen-AI Developer Classroom notes 25/May/2025
Dive into langgraph TypeDict dictionary x = { ‘name’: ‘python’, ‘version’: 3.11 } x[‘name’] # python x[‘version’] # 3.11 Type Dict from typing_extensions import TypeDict class Technology(TypeDict): name: str version: float tech = Techonology(name=’python’, version=3.11) Lets build a workflow with decision to make Overview conditional edge Refer Here for the changes Adding LLMs to langgraph… Continue reading Gen-AI Developer Classroom notes 25/May/2025
Gen-AI Developer Classroom notes 24/May/2025
Debugging langgraph in vscode Install a pip package debugpy pip install debugpy The command to run the application with debugger is langgraph dev –allow-blocking –debug-port 5678 on the visual studio code. Navigate to Run & Add configuration python debugger Remote Launch localhost 5678
Gen-AI Developer Classroom notes 22/May/2025
Graphs, Node, Edges and State in Langgraph Lets create a new folder and activate virtual environment mkdir basic-graph cd basic-graph python -m venv .venv # source .venv/bin/activate .venv/Scripts/activate Ensure pip install -U “langgraph-cli[inmem]” is executed create a new file called as requirements.txt with langgraph in it Now install pip install -r requirements.txt Lets create a… Continue reading Gen-AI Developer Classroom notes 22/May/2025
Gen-AI Developer Classroom notes 21/May/2025
Setup – Softwares Terminal (Pre-installed) Windows winget (pre-installed) choco Mac: homebrew Git python 3.11 visual studio code Docker Desktop (optional) ollama (optional) Setup – Accounts Cloud GCP: Create a new gmail account or use existing Create a free tier Azure (optional) AWS (optional) Langsmith langstudio OpenAI Tavily
Gen-AI Developer Classroom notes 20/May/2025
Agentic AI How to build an Agent Variables Model Foundational Models: OpenAI Google Gemini Anthropic LLAMA Small language models: LLAMA Hugging Face Transformers: microsoft phi Google Gemma … … Fine tuned models Framework Workflow steps Static Steps: (Router) This is a fixed set of steps and conditional logic around when which node has to be… Continue reading Gen-AI Developer Classroom notes 20/May/2025
Gen-AI Developer Classroom notes 19/May/2025
Agentic AI AI Agents vs Agentic AI: Key Differences AI agents and agentic AI are related but distinct concepts in artificial intelligence, differing primarily in autonomy, complexity, adaptability, and operational scope[1][2][3][5]. Definition and Scope AI Agents Individual software entities designed to perform specific tasks within defined parameters or rules[2][3][5]. Examples: Chatbots for customer service, automated… Continue reading Gen-AI Developer Classroom notes 19/May/2025
Gen-AI Developer Classroom notes 08/May/2025
Transformers: Attention is all you need Token: A prompt is broken down into multiple tokens Embeddings: A vector representation of all possible words GPT 3.5 (50k words) Vector: A point in a larger dimension Words can be converted into vectors (Word2Vec) Refer Here for visualization
Gen-AI Developer Classroom notes 07/May/2025
How do LLMs Work ? ML On a broder note ML solves three problems predictions classification clustering Usecase: I want to know what would be price of real estate in hyderabad (Supervised learning, Linear Regression) I want to know if the transaction is fraud or not (Classification, Logistic Regression) I want to give movie recommendations… Continue reading Gen-AI Developer Classroom notes 07/May/2025
