Learn how to build a powerful, intelligent customer support agent using Langflow. You’ll start by creating a simple chatbot with OpenAI, then enrich it with retrieval-augmented generation (RAG) by connecting it to your own FAQ knowledge base using Astra DB. Finally, you’ll add tools such as order lookups, product info access, calculators, and web tools to make your agent truly agentic—capable of reasoning, taking actions, and handling real-world customer support scenarios.
By the end of this workshop, you’ll have a fully functional AI agent that can:
- Answer FAQs using vector-based document search
- Retrieve live order and product details from structured data
- Combine tools (like calculators and lookups) to generate multi-step responses
- Adapt dynamically to user intent—just like a real support agent would
This workshop assumes you have access to:
During the course, you'll gain access to the following by signing up for free:
- DataStax Astra DB (you can sign up through your public Github account)
- OpenAI account (you can sign up through your Github account)
- Alternatively we'll provide some OpenAI API keys to use for this workshop
Follow the below steps and note down the Astra DB API Endpoint, Astra DB ApplicationToken and OpenAI API Key as we'll need them later on.
Make sure you have a vector-capable Astra database (get one for free at astra.datastax.com)
-
Sign up or log in
-
Click
Databasesand clickCreate Database -
Select
Serverless (Vector), type a database name, i.e.agentic-aiand select a Cloud Provider and Region of choice -
Wait a few minutes for it to provision
-
Note down the API Endpoint which can be found in the right pane underneath Database details.
-
Click on
Generate Tokenand give it a name, i.e.agentic-ai-tokenand clickGenerate. Now click on the copy button and paste the Application Token somewhere for later use
-
Create an OpenAI account or sign in.
-
Navigate to the API key page and create a new Secret Key, optionally naming the key.
- Alternatively we'll provide some OpenAI API keys to use for this workshop
To make life easier, we'll use the awesome Github Codespace functionality. Github offers you a completely integrated developer experience and resources to get started quickly. How?
-
Open the agentic-ai-workshop repository
-
Click on
Use this template->Ceate new repositoryas follows: -
Now select your github account and name the new repository. Ideally also set the description. Click
Create repository -
Cool! You just created a copy in your own Gihub account! Now let's get started with coding. Click
Create codespace on mainas follows: -
Configure the secrets as follows:
- Copy
.env.exampleto.env - Edit
.envand provide the required variablesOPENAI_API_KEY,ASTRA_DB_API_ENDPOINTandASTRA_DB_APPLICATION_TOKEN
-
Now we can run Langflow as follows in the terminal window:
pip install uv uv sync uv run langflow run --env-file .env
This starts Langflow and opens a port to your Codespace in the cloud. In case you loose track of the URL to Langflow, just click on
PORTSin the terminal window.
🎉 Congrats! You finished the set-up part of the workshop. Now for the fun part!
Goal: Create a chatbot with: input → model → output
- Open Langflow
- Click
+ New Flow/+ Blank Flow - Collapse
Inputsand drag theChat Inputcomponent to the canvas - Collapse
Modelsand drag theOpenAIcomponent to the canvas. ConnectInputto theChat Input - Collapse
Outputsand drag theChat Outputcomponent to the canvas. ConnectMessageto theChat Outputcomponent
👏 Amazing! You just built your first flow. Let's run it by clicking ▶️ Playground and asking the question:
What's the difference between AI and Machine Learning?
You'll see the Large Language Model (LLM) answer your question nicely!
Goal: Understand the main components of Langflow
- If still open, close the Playground popup
- Select
Chat Inputand clickControls - You'll see a field name
Text, typeWhat's the difference between AI and Machine Learningin the text field. close the popup - Select
Chat Output, the three dots...and clickExpand - Do the same with
Chat Input - Click the play button
▶️on theChat Outputcomponent and see the flow run
Notice the running time of the separate components.
Click the magnifying glass 🔍 in the OpenAI component. This shows you a popup with the intermediate data that is passed to the next component. Very useful for debugging purposes!
Goal: Create an AI Agent that has access to a URL tool and a Calculator tool
- Reproduce the above flow (or load it from
./flows/v1.2/basic-agentic-ai.json) - Esure the
OPENAI_API_KEYhas been set - When adding the
URLandCalculatorcomponents to the canvas, select them and clickTool mode
👏 Amazing! You just built your first AI Agent. Let's run it by clicking ▶️ Playground and asking the question:
What is 2x the value of a Euro in Dollars
You'll get an answer stating a value of $2.16 or something (as of April 2025).
To see the magic behind, simply click the down arrow 🔽. The Agent decided to use two tools:
- The URL tool to fetch the current exchange rates
- The Calculator tool to multiply the value by two
Goal: Adding external knowledge by making use of Vector Search and RAG
In this step we'll create a new collection in your agentic-ai database in Astra DB to store data as a knowledge base.
First we need to create a collection to store the data:
- Browse to your
agentic-aidatabase on Astra DB - Click
Data Explorerand clickCreate Collection + - Type your collection name, i.e.
company_faqand enebaleVector-enabled collection - Leave NVIDIA, NV-Embed-QA, 1024 and Cosine as it is
- Click
Create Collection
You just created a new empty collection to store knowledge base articles.
Extend your existing Basic Agentic AI flow with the following:
- Collapse
Vector Storesand dragAstra DBto the canvas - Click the component and select
Tool mode - Make sure the
Astra DB Application Tokenis configured, then select youragentic-aidatabase andcompany_faqcollection - Click
Edit toolsand update bothTool descriptionsby replacing - Connect the
Astra DBcomponent to theAgentcomponent
Let's run it by clicking ▶️ Playground and asking the question:
What are your shipping times?
As a response we get a generic answer. Why? Because our collection is still empty. Let's fix that!
Extend your flow with the following additional flow (scroll down a bit for a blank piece of canvas):
- Collapse
Dataand dragFileto the canvas - Click on
Upload a fileand upload the./data/Company_FAQ.pdffrom this repository (you'll have to download it first) - Collapse
Langchainand dragRecursive Character Splitterto the canvas - Set the
Chunk sizeto 500 andChunk overlapto 100 - Collapse
Vector Storesand dragAstra DBto the canvas - Make sure the
Astra DB Application Tokenis configured, then select youragentic-aidatabase andcompany_faqcollection - Click the play button
▶️on theAstra DBcomponent, see the flow run and observe the time consumed. You can also click the intermediate magnifying glasses🔍to debug the flow.
🙌 Congrats! You just loaded a PDF, converted it to plain text, chunked it and loaded it into a Vector enabled collection in Astra DB!
In this step we'll have a look at the dataset in your agentic-ai database in Astra DB.
- Browse to your
agentic-aidatabase on Astra DB - Click
Data Explorerand clickcompany_faq - Observe the data loaded into the collection on the right side of the screen
- Toggle from
TabletoJSONview and collapse some of the rows to see what's inside
To see Vector Search in action, type the following in the text box Vector Search:
What are your shipping times
You'll see the chunk with shipping times show up as the first result. You just ran an ANN search transparantly utilizing the Vectorize functionality in Astra DB that does the vectorization for you on demand.
Click on ▶️ Playground and click on + on the left side to start a new Chat. Then run the following question:
How many hours do I need to wait for a domestic order?
🎉 You'll see the Agent making use of the Astra DB knowledge base to find relevant content and then running the calculator to calculate the amount of hours to wait.
Goal: Enable your Agent to retrieve structured order and product details.
- Browse to your
agentic-aidatabase on Astra DB - Click
Data Explorerand clickCreate Collection + - Name the collection
orders, disable theVector-enabled collectionswitch and clickCreate Collection - Click
Load Dataand upload the file: ./data/sample_orders.csv - Verify the data was loaded into Astra DB
- Click
Create Collection + - Name the collection
products, disable theVector-enabled collectionswitch and clickCreate Collection - Click
Load Dataand upload the file: ./data/sample_products.csv - Verify the data was loaded into Astra DB
- Return to your Langflow flow
- Collapse
Toolsand dragAstra DB Toolto the canvas - Configure as follows:
- Tool Name:
OrderLookup - Tool Description:
A tool used to look up an order based on its ID - Collection Name:
orders - Ensure
Astra DB Application TokenandAPI endpointare configured - Tool Params:
orderNumber
- Tool Name:
- Connect the
Astra DB Toolcomponent to theAgentcomponent
- Collapse
Toolsand dragAstra DB Toolto the canvas - Configure as follows:
- Tool Name:
ProductLookup - Tool Description:
A tool used to look up a product based on its ID - Collection Name:
products - Ensure
Astra DB Application TokenandAPI endpointare configured - Tool Params:
productId
- Tool Name:
- Connect the
Astra DB Toolcomponent to theAgentcomponent
Let's provide our Agent a bit more information about what it's capable of doing and what guardrails to take into account. This enables more accuracy for our Customer Support Agent.
- On the
Agentcomponent, click the square atAgent Instructions - Paste the following instruction:
You are a skilled customer service manager and information router. Your primary responsibility is to use the available tools to accurately address user inquiries and provide detailed, helpful responses. You can:
- Look up order numbers to retrieve and share order details. Keep in mind that the date is the order date and that price is in USD.
- Access product information to provide relevant descriptions or specifications based on the retrieved product ids.
- Use the Astra DB knowledge base about Frequently Asked Questions on shipping, returns, placing orders, and more. Always use this tool to find relevant content!
- Use the Calculator tool to perform basic arithmetic. Only use the calculator tool!
- Use the URL tool to find known information on the internet or APIs to make the response more accurate.
Think step by step and if a question requires multiple tools, combine their outputs to deliver a comprehensive response.
Example: For an inquiry about canceling an order, retrieve the order and product details, and also reference the FAQ for the cancellation policy.
Always aim to deliver clear, concise, and user-focused solutions to ensure the best possible experience.

For ease of use, this flow is also available here ./flows/v1.2/customer-support-agent.json
🥳 You did it! You now have an Agentic Flow with access to:
- A company FAQ knowledgebase
- Orders data
- Product data
- A calculator
- Capability to fetch information from the internet
Let's run some questions. For instance:
- What's the shipping status of order 1001
- What was ordered with 1003
- What date will order 1004 arrive?
- How can I cancel order 1001 and what is the shipping policy?
- How much euro is order 1001
Observe how all the different tools are being used to answer the user's questions.
In this step we'll create a simple Python app that runs the Langflow flow.
- In Langflow exit the Playground and click on
APIin the right top corner - Click on Python API
- Copy the code and paste it in a new file called
flow.py
Let's run it!
uv run flow.py "What is in order 1001"In this step we'll use a simple Streamlit app that supports Customer Support Agents.
** 🚨 Important:** This app is reliant on flow.py, so make sure the previous step works!
In order to run the app:
uv run streamlit run app.py













