Vibe Coding and Deploying LlamaIndex Agent Workflows with Claude Code
Key Takeaways
The video demonstrates how to use Claude Code with vibe-llama to build and deploy an agent workflow for financial document classification to the cloud using LlamaIndex.
Full Transcript
Hi there, Clea from Lamindex here and today we're going to v code a lama index workflow using cloud code cloud.mmd and cloud skills. And once we coded the llama index workflow, we're going to package it as a llama agent and deploy it to the cloud. So let's start by creating a u directory called financial documents classification. And once we created this directory, we're going to initialize it as a UV project. And we're going to remove the main.py file since we do not need it. And we're going to add uh VBLA as our go-to tool to download agent compatible agent specific documentation. So we're activating our virtual environment and we're going to run by llama starter to get started with our um with our document. downloading the documentation that we need. So, VIP Lama starter as you can see here allows us to choose cloud code and then llama cloud services, llama index workflows and llama deploy. And we can choose also since we chose cloud, we can choose the skills. We're going to choose text classification and llama usage for this one. And we're going to download everything in our terminal. So now that we are here, we can list our we can list our directory. We see that cloudmd.cloud cloud directory has been created. We can go to docloud and we can see that skills have been created and we can see what skills have been created specifically lamasl and text specification the two skills that we requested. So now we can go back and we can start chatting with claude and so we start chatting with claude we say that we trust this folder and let's start with clot. So we would say um we we start by saying plot this is a UV project. Okay. And um we would like basically to create a plum index workflow uh starting from documentation and skills that um are available to claude. So let's create this prompt that I've just started typing here um to ask Claude not only for this but basically for a workflow that performs as I said textification because we gave Claude this um uh this skill and classification for financial documents. We want a cash flow statement. We want uh a income statement uh and we want balance sheet. Um so these are the three types of documents that clo will be classifying like that our workflow will be classifying for us and so we want these to be I would say PDFs like these files to be PDFs and we want to start from the file paths so the workflow first of all this is a very important thing the workflow has to be straightforward and to all include the classification so we don't want cloud to perform or to derail and perform for example text extraction or parsing as they might be actually as they are within the I would say um within the documentation. So we just want uh to include classification and no other third party tool slash I would say service. So now that we have this tool we want the code to be um concise if you if we might and not only concise uh we want we want it to be just the workflow. So we want cloud to provide just a workflow and not uh like other things for example like argument parsers or stuff that would make the workflow for example a CLI tool because we only want the workflow in order to deploy to lama agents and so now we start the uh task with cloud. So this will take a moment so we'll see each other back when cloud has finished. So now cloud is asking me to uh use a classified skill which I agree to and as you can see now it's creating uh the concise workflow for financial document classification. Here is the workflow. I take a look at the workflow. It's okay. So we can say yes. Um this is a good this is good to go. So now claude will create our workflow as a financial classifier workflow py. So this is basically set and it will tell us okay now set your llama cloud API key and run it through the main uh run it through a synchronous main function. So that's all that's basically what we need to do for now. So let's now take a look at the workflow that claude has produced for us. So this workflow is composed by two steps which uh each of which produces takes an input event and produces an event. Specifically, we have the first step that takes a side event which is the base class for every side event. So we do not subclass the side event here and produces a classifier event which is defined up here uh as uh having the results attribute as a list of classification result which is basically um a model that represents a result from a document classification that's produced by classify. And um the classifier event triggers a second step which produces in turn in turn a stop event which has a default attribute as result. And with this within this result we pass the result coming from the classify documents step. The classify document step takes uh basically the file paths uh that we are supposed to provide uh from the side event. Okay. and uh it will basically from the side event and it will basically classify this file path one by one and append the result to this list. What is very interesting to notice here is that code instead of using resources uses another pattern that you can uh build your workload with which is the initialization pattern. So basically workers being classes can use um can use attributes can use internal and external and externally available attributes and in this case cloud initializes the workflows with two important attributes which are the classifier it's basically a wrapper around class the llama class client and the rules which are the classifier rules that we asked for. So the class statement the income statement and the balance sheet. So now we have our workload which is a financial document classifier with a timeout of 300 seconds which is approximately 5 minutes and we can run this workflow. And so basically what we do is define a main function in which the workflow uh runs and a synchronous main function in which the workflow runs and we provide file path directly to a keyword argument to the run method here. So file path is file paths are referring to two files the cash statement and the balance sheet that we have here which are just two sample cash flow statements and balance sheet and we return the result which will be basically which will be uh basically the list of classification results. We run the main function and we print for each result um for each result basically we print the classification. So now uh upon exporting our Lana cloud API key because as you can see here Lana cloud API key is required we can run our financial classifier workflow just by typing the run financial classifier workflowy and as you can see here we have our results and we have statement we have document type statement the confidence is 1.0 zero which is basically 100% and basically it says oh well the document is titled central cash flow statement a statement of cash flows so that is basically it the second uh the second document has been classified correctly as balance sheet with a confidence also here of 100% and the reasoning is that yeah well basically the document is such balance sheet and structured to show assets liabilities equity at a specific point in time so that's basically the definition of balance sheet as defined by our rules so that's that's both you need so as you can See cloud has created a functional workflow that can perform uh financial document destruction. So now what we're going to do is that we're going to ask plaud to create a llama deployer by even better a lama agent help us serve it locally first and then deploy it to the cloud second. So now that we took a look at the workflow, we can ask Claude to prepare the workflow basically to be packaged as a llama agent and to be deployed first locally and then to the cloud. Let's get started. And we start by obviously opening our cloud. And we ask if we if it can move the financial document classification uh project. The financial document classification workflow to a I would say Python package like structure. So this Python package like structure generally is represented by I would say an SRC something like that as like something like SRC financial document classification or something uh that will be u I would say of help when we uh then decide to deploy the workflow. So um we now ask a cloud to move all of these. So it will take a little bit of time. So as you can see now Claud's creating basically a lot of files um has read our by project ML has created a models file and has created an events an events file it's basically creating a workflow file in which we will store our workflow and finally it's creating an anit file so that we will have a proper package structure I would say proper package configuration for a Python package and now obviously we have our init py file that's fine and that we can approve approve. And now what is very interesting here is that obviously Claude has access to Lama deploy documentation and has access basically to lamal usage through its skill. So as you can see here claude autonomously without me asking is taking the lead and saying okay let's add also a lama deploy configuration to run a tool through a llama to the llama cla. So uh we create a llama deploy tool. Llama deploy uh field in the my projectl and we create tool. Llama deploy.workflows pointing to our workflow. So then we remove obviously the old file that we uh that we used before that we tested before and we should be good to go. And yeah, as you can see here, it creates a little bit of a documentation for us to use uh this workflow and say okay, so uh use llama ctl serve and then serve the workflow to deployments financial classifier uh workflow classifier run. So what I also need here is that it creates u a configuration for lambda deploy CLI to basically deploy to the cloud. We're going to use it later but let's let's do it here. Let's do it right now since cloud is already I would say on a good strike and as you can see it's creating the configuration is creating also.ample example because obviously we need environment variables such as our llama uh llama cloud our llama cloud API key and we can say yes this my projectml is fine and we can go with this so now also claude has created a readmd file which we can take a look at it's a very big readme file we give the permission to write this readmd file with all the documentation and that's basically that's basically all we need and so We can just like now close this uh first I would say llama configuration session with this last um with this last I would say uh instructions by by claude that tells us how to use everything. So let's now take a look at what claude has produced for us. We already had a peak during the uh coding session from the terminal but let's now have a better look. So uh claude has added to our pi project autom as it is expected to do a llama deploy um specification. Specifically it created a lama deploy uh project which we call llama agent which is a financial classifier and it added a workflow to this financial classifier which is a classify workflow which comes directly from the financial document classification package python package uh from the workflow module uh with the workflow variable. So it has basically done what it is supposed to do and obviously uh it created as we as we saw earlier it created an advanced file it created a models file and it created a workflow file. So what we now have to do is basically follow the instructions by uh cloud and basically install the dependencies. We already did that. Uh set up the environment variable. So we create av file. So we don't use av.acample example, but we create ampb file with a llama cloud API key and then what we do is um we go and serve our workflow locally and actually we can make claude do this. Claude to do this because as you remember Claude has this llama skill which basically can help it understand what uh tools to use when and how to use basically lacl [snorts] and yeah in this case in this case we can try uh we can try with uh for example this command when it's when the uh workflow is served and we can also we could also I would say deploy to cloud. So uh let's first of all install llama. So we will go and do uv tool install lamacl and as you can see we installed one executable llama and now we can basically go and make claude take care of the whole deployment. But first of all we can I would say uh we can create we should create a github repository. So we should add commit um our changes [snorts] um and we should change the name of the branch and we should push all our changes uh to a repository. So uh we could create this and say financial document classification llama agent. We can set visibility to public. We can add a remote. We can call the remote origin and we can push all the changes to origin. So we now have all our changes pushed to origin. And basically this is uh our this is our this will be the base for our deployment. But we're not deploying yet. First of all, we're asking to help us serve the workflow locally and to help us send a request to the workflow locally and then we're going to deploy the workflow on cloud again through cloud. So now that we took a look at cloud's work uh we can uh try to make claude serve our workflow locally. So as you can see uh claude is uh we ask claude if we if uh it can please start serving the workflow locally from uh our lama deploy CLI tool which is LDL and uh what happens here is that plot is ruminating I would say and uh it will take a look at the project structure and then once the project structure is clear and perfect I would say to uh to cloud it will start lama Yes sir. And that's exactly what we do and it will I would say check if the command is uh doing well is deploying. So now what happens here is that after plot checked a couple of times the server has been failing and so what happens is that presumably uh there is something missing and what is missing is a build system configuration which is normally which which normally uh you include in the project. ML to build the Python package and Cloud did not do it at first and so here we are. Cloud now has added the build configuration the build system configuration and now restarted the workflow and what happens here is now that the workflow is uh working. So I would say better resided the server the workflow server and what happens here is that now the workflow is serving. So I can see that the package is being built and installed and yeah that is great. The workflow is now I would say running. So we ask for eco request to the deployments final shift classifier workflow name run endpoint uh specifically uh obviously the base URL is 127.0.0.1 uh with 4501 and uh the name of the workflow as we know is classify because we saw it earlier and so uh we ask claude to create this curve request that will help us run a workflow. So now cloud has produced our cur request and also some Python code to um mimic also this car request. So this is great. Uh we do not need to do anything else and we can test the car request uh separately. So now last but not least what we're going to do is we're going to use cloud to I would say basically uh we're going to use cloud to basically deploy our workflow. And so we're going to run claude as as always. And basically we're going to ask uh if it can create uh or better help us deploy the workflow uh to the cloud obviously because now uh we already have tested it and so that cloud successfully deployed it and served it locally as a server and now we're asking to use LCL deployments to create uh and better to u I would say yeah to create a deployment to uh push the deployment to the cloud. Uh now cloud is telling us okay that there's probably a local database that you don't want to be pushed uh to the cloud. So let's let's skip it into the g ignore. That's fine. Uh we will put it into the git ignore and push uh and I can say commit and push the changes to GitHub. And now presumably we will uh I would say now presumably we will deploy the workflow using lambd deployments. And as you can see u claude says okay let's run lambsl deployments create. But this command requires an interactive session. And so uh claude will now say okay now let's see if it can we can do it non-interactively but uh presumably uh or better in this case uh you cannot and so it's a little bit derating here it's asking me for the status for the app status and so I'm I'm saying okay if you do not create a deployment on your own then let's say uh you tell me how to do it uh and I will do it in an interactive terminal session so now I will ask code what to do how how can I create a lambl deployment And uh Chloe will produce presumably an answer uh with the same command that it used before. But I want to be sure that Chlo is not like losing context, losing focus on the task that it's now uh that it's now asked to run. And so as you can see here uh we have a whole lot of things. There's also presumably hallucinated open API key and then lacl deployment create which we can proceed by copy and then we can just like uh exit from the code interactive uh session and we can go and deploy and create the deployments and as you can see the deployment here uh the deployment is here we have the financial classifier it's connected to our GitHub repo correctly and it's now deploying so the status is now pending for our deployment so cl gave us the correct command everything is correct the workflow is deploying and it will take probably a few more seconds before it goes online. It's a pretty simple and lightweight workflow. So, it shouldn't take that much. So, great. As you can see, the workflow is starting to like the Lum agent is starting to tell us, okay, your record is running and great. So, the status is now running and so we created finally our deployment. So now that we've deployed our workflow as a Lama agent to Lama Cloud Platform, we can now take a look at our um agent and see if it's there. And it's there. There's our financial classifier which we can call to the HTTPS endpoint API. Llama cloud API.cloud index.ai I/ deployments financial classifier and obviously uh we can call the various endpoints such as workflows workflows workflows our workflow name which is classify run which which runs the workflows synchronously and so on. We can basically we can basically run the workflow and we can call it from wherever. So as you can see uh with the help of cloud you can basically create um workflows uh that solve real work use cases just in this case automated financial documents classification. you can create a llama certl specification. You can basically uh package them as llama agents and you can deploy them to cloud and we just like wrote a little bit of lines of code. We just had to give Claude a little bit of I would say um I would say indications, directions, but other than that, Claude acted pretty much on its own. And that's basically the power of the documentation we provided to Claude through our tool by Blama. You can download documentation that is specifically tailored for cloud coding agents. uh and you can produce it in a claude.mmd file and obviously you can also download for example claude you can also download skills uh with a skill with a brief uh with a brief description of the skill and a wider reference of what the skill does and what are the bigger patterns I would say for the skill uh to uh for the skill like to follow for follow when calling the scale. So that is basically it. I hope you enjoyed this tutorial and I hope to see you in the next one.
Original Description
Vibe-code your way from idea to production.
In this video, our OSS engineer Clelia shows how to use Claude Code with vibe-llama to build and deploy an agent workflow for financial document classification to the cloud.
Learn more about building agent workflows with LlamaIndex:
👉 https://developers.llamaindex.ai/python/llamaagents/overview?utm_source=youtube&utm_medium=li_channel
#llamaindex #agents #workflows
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from LlamaIndex · LlamaIndex · 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
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
Discover LlamaIndex: Document Management
LlamaIndex
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
Discover LlamaIndex: JSON Query Engine
LlamaIndex
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
Introducing create-llama
LlamaIndex
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
Ollama X LlamaIndex Multi-Modal
LlamaIndex
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
Introduction to LlamaIndex v0.10
LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
A Comprehensive Cookbook for Claude 3
LlamaIndex
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex
More on: AI Pair Programming
View skill →Related Reads
📰
📰
📰
📰
OWASP LLM05:2025 : Improper Output Handling — When the Model’s Response Becomes the Attack
Medium · LLM
AI and UX Opinion — Episode 006
Medium · UX Design
The LLM Thought a Dollar Was Still ₦450: Building a Car Pricing Engine for a Market With No Data
Dev.to · Chichebe John
Cross-Modal Knowledge Distillation for precision oncology clinical workflows under multi-jurisdictional compliance
Dev.to AI
🎓
Tutor Explanation
DeepCamp AI