Building an AI agent with langGraph (step by step tutorial)
Key Takeaways
This video tutorial demonstrates building an AI agent using LangGraph, a graph-based approach to orchestrate workflows, and integrating it with Plaid for credit card data access and Streamlit for application development.
Full Transcript
Hi, I'm Annie with the MLOps community and I am going to talk about how to pick a topic and build your first agent. So, if you've been hearing about agents and you don't know how to get started, but you'd like to dip your toes in the water, um this is a great start start tutorial for that. One of the first things that you need to do to develop an agent is find a problem that requires an agent framework. Even though you can incorporate rag and chat bots into your agent, one of the most important features is that you're giving the AI specific roles and those roles are making decisions at different points in your framework. There are many different frameworks for building agents but for the purpose of this tutorial I chose langraph. So langraph uses a graphbased approach to orchestrate workflows. Langraph also allows for fine grained control of your agent and it also gets you to a place where you could have an agent that is ready to be deployed. So I liked both of those features. That's why I chose to build my agent in Lingraph. First, I took the Langraph Academy course called Intro to Langraph. It's actually free at the time of recording this video, which is super useful and resourceful. Now, you can watch the entire training, but I would definitely focus on modules 1 through 4 just to get yourself started. These modules build upon each other and show you different features that Lang graph offers in order to be able to build an agent such as what states are in an agent, how to incorporate memory into your agent, and then also how to incorporate something like human in the loop. The module that I would definitely focus on once you make it through the videos in one through three is module four and especially this research assistant because Lang graph academy gives you this really great example of a an agent that you can use as a baseline or foundation to create your own agent and really understand what the agents are doing and how the code works. works. So then I reviewed the code from the langraph tutorial that built the research assistant AI agent. This was really cool because they set up several different roles like assistants and experts to basically interview each other on topics and then write an academic paper. So, this was a great um example of an agent and the code is really clearly laid out once you've sort of gotten familiar with the structure of langraph. I ended up deciding to take pieces of this code, especially the parts where the nodes and edges are built, and then build my agent off of that example code. So then I needed to think of, okay, what do I want my agent to do? I came up with an idea that would require the agent to perform several tasks, not just something that, you know, a chatbot could answer on the fly. And then I also wanted to use a data source that wasn't publicly available so that the the agent would have to get to know some data that it wasn't trained on. So, I chose my credit card data, which is thankfully not publicly available. I also wanted the agent to do something silly. So, I decided that I would create an agent that is a passive aggressive budget coach that is coaching me on all the credit card purchases that I make in my statement. So with a little bit of help from cursor, I took the research assistant agent code and then I sort of morphed it into a different agent that was focused on coaching me on my budget. As you can see, this is set up very similarly to the code from the research assistant. So first I I create the classes for the nodes that are going to be in my agent such as grabbing the transaction data um analyzing the transaction data and then interacting with the budget coach through using LLMs. Then I defined what the budget coach would do. So, pulling down transactions, analyzing them, and then looking at them against my monthly budget, and then coming up with some snarky comments about where I'm at with my budget thus far. I also determined that the agent would alert me when I reached a certain percentage of my budget. So lastly, I set up the nodes and edges of the agent so that the workflow of the agent would flow from analyzing the transactions, generating the summary for the transactions and then sending an alert. Langraph has this really nice feature called Langraph Studio where you can actually view the graph structure of your agent. So this sort of outlines the start of the agent. It analyzes your transactions, generates a summary, and then it ends. And it will send an alert based on certain conditions. In this case, if I've spent up to 80% of my monthly budget, you can check out my code for this in a GitHub repo that is posted in the description of this video. One other quick thing, credit card companies won't provide individuals with APIs to access their credit card data. So, I subverted this by using Plaid, which you can basically use Plaid to log into your credit card account and pull data from your statements that way. Plaid has a really convenient Python library that allows you to do this. And the thing that you need for it is first of all to get a plaid account and then to log in and uh basically grab their API key which will allow you to be able to log into your bank account. For the purpose of this tutorial, I'm just using the sandbox environment in Plaid, which contains fake credit card data. Uh, which that's where this username and password is for. Um, you can grab API keys under this keys section, which I won't do right here because it will reveal my keys. But there's a key for both the sandbox environment and the production environment. and the production environment will allow you to get your actual credit card data from your accounts and you can log into that. I didn't want to put my credit card data on this video. So, uh, for now we're using some fake data. So then I set up a a specific script that uses the Plaid Python library to pull down transactions for the past 30 days and then it categorizes those transactions based on the descriptions in the transactions. And this feeds back to the agent itself. Lastly, I really wanted to be able to see my agent in an application so that I could sort of maybe use a little bit of human in the loop with it. So, I created a Streamlit app that made this budget coach come alive and that's what's running right here. So, if you can see now that I'm running this locally, um, okay, welcome to your passive your passive aggressive budget coach. I'll analyze your spending habits and provide some constructive feedback. So, great. And so, I have this set to 5,000 because I want for the purpose of this example to show you what it does when you're at 80% of your budget. Um, so this is using fake data. You can click here and it will show a spending summary. Um, this takes a little bit to run, but it also sends out this alert to my email. And this says, uhoh, spending alert. Your budget was 5,000, but you're almost reaching that 5,000, and this is how much you have remaining. And then it gives its uh sarcastic kind of snarky comments about things that I've spent money presumably on. Apparently I spent $300 on a pair of sneakers. So yeah, I think this is kind of the overall goal of the budget coach. I think my next steps for this agent would be to use more of the human in the loop features that Langraph offers to just play around with changing states and also to deploy it on more than just a local machine. Now that you've seen me walk through setting up my own agent, you can try this for yourself. go through the Lang graph tutorial or just skim through it if you don't have a ton of time and then use some of the langraph code available in this tutorial to think of your own idea and just spin up a prototype of your your first agent. And stay tuned in to the MLOps community for more rad content on agents.
Original Description
🚀 Ready to build your first AI Agent? If you've heard about AI agents but don't know where to start, this tutorial is for you! Join Annie from the MLOps community as she guides you through picking a topic and building your very first agent using LangGraph.
In this video, you'll learn:
Why Use an Agent Framework: Understand the types of problems best suited for AI agents and why frameworks like LangGraph are powerful tools.
Discover how agents use AI roles for decision-making.
Getting Started with LangGraph: Learn why LangGraph was chosen for this tutorial, focusing on its graph-based workflow orchestration and fine-grained control, making your AI agents deployment-ready.
Learning Resources: Leverage the free "Intro to LangGraph" course from LangGraph Academy (Modules 1-4 recommended) to grasp concepts like state, memory, and human-in-the-loop integration.
Practical Example - Research Assistant: See how the LangGraph research assistant example provides a solid foundation for building your own AI agents.
Building a Budget Coach Agent: Follow along as we build a unique, passive-aggressive budget coach AI agent.
This example demonstrates:
Defining tasks and roles for the agent.
Using non-public data sources (like credit card data via the Plaid API sandbox).
Setting up nodes and edges in LangGraph.
Visualizing the agent's structure with LangGraph Studio.
Handling data securely (using Plaid's sandbox environment).
Integrating with Python libraries (Plaid).
Creating an Interface: See how to bring your AI agent to life with a Streamlit application for interaction.
Next Steps: Get ideas for enhancing your AI agent with human-in-the-loop features and deployment strategies.
Whether you're new to AI agents or looking to explore frameworks like LangGraph, this video provides a practical walkthrough to get you started.
Join the mlops community: mlops.commuity/join
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from MLOps.community · MLOps.community · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Our 1st MLOps Meetup // Luke Marsden // MLOps Meetup #1
MLOps.community
Remote Collaboration as a Data Scientist
MLOps.community
MLOps Manifesto with Luke Marsden from Dotscience
MLOps.community
MLOps lifecycle description
MLOps.community
What Does Best in Class AI/ML Governance Look Like in Fin Services? // Charles Radclyffe // MLOps #2
MLOps.community
Life purpose and too many spreadsheets
MLOps.community
Explainability, Black boxes and EU white paper on reproducibility
MLOps.community
Hierarchy of Machine Learning Needs // Phil Winder // MLOps Meetup #3
MLOps.community
Automatically Retrain Machine Learning Models? Are best practices worth it?
MLOps.community
Building an MLOps Team? Key ideas to keep in mind
MLOps.community
Hierarchy of MLOps Needs
MLOps.community
Bare necessities for getting an ML model into production
MLOps.community
MLOps and Monitoring
MLOps.community
How Phil Winder got into Data Science and Software Engineering
MLOps.community
Provenance and Reproducibility in Machine Learning; what is it and why you need it?
MLOps.community
Friction Between Data Scientists and Software Engineers
MLOps.community
MLOps Problems in different size companies
MLOps.community
ML tooling in large companies
MLOps.community
ML Platforms - The build vs buy question
MLOps.community
ML Services Gateway at SurveyMonkey
MLOps.community
Message buses, Async and sync architecture
MLOps.community
MLOps #4: Shubhi Jain - Building an ML Platform @SurveyMonkey
MLOps.community
Hybrid Data Science Teams @SurveyMonkey
MLOps.community
How do you handle ML version control at SurveyMonkey
MLOps.community
Doing ML with Personal Information
MLOps.community
Evolution of the ML feature store @SurveyMonkey
MLOps.community
Developing a Machine Learning Feature Store
MLOps.community
Auto retrain ML models is not the question
MLOps.community
3 key parts to Machine Learning monitoring
MLOps.community
MLOps Meetup #6: Mid-Scale Production Feature Engineering with Dr. Venkata Pingali
MLOps.community
MLOps meetup #5 High Stakes ML: Active Failures, Latent Factors with Flavio Clesio
MLOps.community
MLOps: Airflow Pros and Cons
MLOps.community
Specific challenges in Machine Learning
MLOps.community
Current State Of Machine Learning
MLOps.community
Humans in the Loop are a defining factor in Machine Learning
MLOps.community
Learning from real life Machine Learning failures
MLOps.community
Survivorship Bias in machine learning tutorials
MLOps.community
Swiss Cheese model in Machine Learning
MLOps.community
Resume driven development in Machine learning & software engineering
MLOps.community
Who has the highest standards in ML?
MLOps.community
Venkata Pingali of Scribble Data Thoughts on the Current State of Machine Learning
MLOps.community
Dependable data and being able to Trust in your Data with Venkata Pengali of Scribble Data
MLOps.community
Speed, Trust, Evolution and Scale in MLOps
MLOps.community
More difficult transition for data scientists to become ML engineers
MLOps.community
How many models in prod til I need a dedicated ML platform?
MLOps.community
Deeper thinking from data scientists around platform blackholes
MLOps.community
Checkpointing, metadata, and confidence in your data
MLOps.community
Adjacent usecases and multistep feature engineering
MLOps.community
Standardization of Machine Learning tools like in Software Engineering with Venkata Pingali
MLOps.community
Reproducability flaws in end to end Machine Learning debugging
MLOps.community
3rd wave of data scientists
MLOps.community
MLOps meetup #7 Alex Spanos // TrueLayer 's MLOps Pipeline
MLOps.community
MLOps Meetup #8 Optimizing Your ML Workflow with Kubeflow 1.0
MLOps.community
Are Kubeflow and Airflow complementary?
MLOps.community
Why Kubeflow gained so much traction=open community
MLOps.community
Who decides the dirrection of Kubeflow
MLOps.community
What do Kubeflow and Arrikto do and how do they work together?
MLOps.community
Versioning your ML steps with Kubeflow
MLOps.community
Machine Learning Lifecycles//Perception vs Reality
MLOps.community
Kubeflow vs SageMaker in Machine Learning
MLOps.community
More on: Agent Foundations
View skill →Related Reads
📰
📰
📰
📰
AI Was Supposed to Lift Everybody. Right Now, the Price Tag Says Otherwise.
Medium · AI
MCP rug-pulls: how a "safe" AI tool turns malicious after you approve it
Dev.to · Wes Ellis
You Can’t Even Control Your Hermes Agent, So Stop Trying to Control Everything in Your Life
Medium · AI
Can AMD break the CUDA Moat? AMD Advancing AI 2026
Semi Analysis
🎓
Tutor Explanation
DeepCamp AI