{"id":29821139,"url":"https://github.com/michelderu/watsonx-langflow-agent","last_synced_at":"2025-07-28T23:40:49.957Z","repository":{"id":303840411,"uuid":"1016711749","full_name":"michelderu/watsonx-langflow-agent","owner":"michelderu","description":"Agentic support agent that handles structured and unstructured data using IBM watsonx.ai, DataStax Langflow and DataStax Astra DB","archived":false,"fork":false,"pushed_at":"2025-07-09T20:01:36.000Z","size":7700,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-10T01:30:23.236Z","etag":null,"topics":["datastax-astra","langflow","watsonx-ai"],"latest_commit_sha":null,"homepage":"https://www.datastax.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michelderu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-09T12:13:40.000Z","updated_at":"2025-07-09T20:01:40.000Z","dependencies_parsed_at":"2025-07-10T01:58:18.399Z","dependency_job_id":null,"html_url":"https://github.com/michelderu/watsonx-langflow-agent","commit_stats":null,"previous_names":["michelderu/watsonx-langflow-agent"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/michelderu/watsonx-langflow-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fwatsonx-langflow-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fwatsonx-langflow-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fwatsonx-langflow-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fwatsonx-langflow-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelderu","download_url":"https://codeload.github.com/michelderu/watsonx-langflow-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fwatsonx-langflow-agent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267604844,"owners_count":24114561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datastax-astra","langflow","watsonx-ai"],"created_at":"2025-07-28T23:40:42.903Z","updated_at":"2025-07-28T23:40:49.933Z","avatar_url":"https://github.com/michelderu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Agentic AI Workshop – Customer Support Agent\n\n## 🎯 Goal of the workshop\nLearn how to build a powerful, intelligent customer support agent using **DataStax Langflow**. You’ll start by creating a simple chatbot with **watsonx.ai** (IBM's generative AI platform), then enrich it with retrieval-augmented generation (RAG) by connecting it to your own FAQ knowledge base using **DataStax 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.\n\n![screenshot](./assets/screenshot.png)\n\nOur fully functional Customer Support Agent will be able to:\n- Answer FAQs (unstructured documents) using vector-based document search\n- Retrieve live order and product details from structured data\n- Combine tools (like calculators and structure data lookups) to generate multi-step responses\n- Adapt dynamically to user intent—just like a real support agent would\n\nBy the end of the workshop you've learned:\n1. How to use **Astra DB** to store **structured and unstructured data**\n2. How to leverage the **Vectorize** functionality in Astra DB to transparantly **create Vector Embeddings**\n3. How to use **watsonx.ai** to use foundational models (LLMs)\n4. How to use **Langflow** to create **intelligent agents** utilizing multiple tools\n5. How to utilise the Customer Support Agent flow in a **customer facing app**\n6. How to publish the Customer Support agent as an **MCP server** and use it in Claude desktop\n\n## 🛠️ Prerequisites\nThis workshop assumes you have access to:\n1. [A Github account](https://github.com)\n\nDuring the course, you'll gain access to the following by signing up for free:\n1. [DataStax Astra DB](https://astra.datastax.com) (sign up through Google, your **public** Github account or manually with an email address)\n2. [IBM watsonx.ai](https://www.ibm.com/products/watsonx-ai) (you can sign up for a free trial)\n3. [DataStax Langflow](https://langflow.org)\n\nFollow the below steps and note down the **Astra DB API Endpoint**, **Astra DB Application Token**, **watsonx.ai Project ID**, **watsonx.ai API Key** and **watsonx.ai URL** as we'll need them later on.\n\n### Sign up for DataStax Astra DB\nMake sure you have a vector-capable Astra database (get one for free at [astra.datastax.com](https://astra.datastax.com))\n- Sign up or log in\n- Click `Databases` and click `Create Database` \n- Select `Serverless (Vector)`, type a database name, i.e. `support_agent` and select `AWS` as Cloud Provider and `us-east-2` as Region\n    - ⚠️ Stick to these settings as that enables us to use the [Astra Vectorize](https://www.datastax.com/blog/simplifying-vector-embedding-generation-with-astra-vectorize) functionality\n- Wait a few minutes for it to provision\n- Note down the **API Endpoint** which can be found in the right pane underneath *Database details*.\n- Click on `Generate Token` and give it a name, i.e. `support_agent-token` and click `Generate`. Now click on the copy button and paste the **Application Token** somewhere for later use\n\n    ![astradb](./assets/astra-new-db.png)\n\n### Sign up for IBM watsonx.ai\n- Go to [IBM watsonx.ai](https://www.ibm.com/products/watsonx-ai) and sign up for a free trial or log in.\n- Once logged in, create a new project (or use an existing one).\n- Navigate to the API Keys section (Administration → Access (IAM) → API keys) and create a new **API key**. Save this key securely.\n- Note your **Project ID** (found in your watsonx.ai project details).\n- You will also need the **watsonx.ai URL** (typically `https://eu-de.ml.cloud.ibm.com` or as shown in your project dashboard).\n- For more details, see the [watsonx.ai documentation](https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/ml-authentication.html?context=wx).\n\n    *(Optional: If you need a service instance, create a new instance of \"watsonx.ai\" in the IBM Cloud console and bind it to your project.)*\n\n    *(You may also need to enable the appropriate LLM model in your project, such as `ibm/granite-3-3-8b-instruct` or similar.)*\n\n### Get access to Langflow\nThere are several ways to gain access to Langflow. Pick the one that suits you best 😊:\n- [Langflow desktop](https://www.langflow.org/desktop) (currently only for Mac)\n- [Managed Langflow on Astra](https://astra.datastax.com/langflow)\n- (easiest 🤩) Just follow the instructions and use Github Codespaces in this tuturial\n\n### ⚡️ Open this tutorial on Github Codespaces\nTo make life easier, we'll use the awesome Github Codespace functionality. Github offers you a smooth cloud-based developer experience to get started quickly. How?\n\n1. Open the [watsonx-langflow-agent](https://github.com/michelderu/watsonx-langflow-agent) repository\n2. Click on `Use this template`-\u003e`Open in a codespace` as follows:\n\n    ![github-open-in-codespace](./assets/github-open-in-codespace.png)\n\n    🎉 Congratulations, you just started your cloud IDE in which we'll work from here.\n\n    💡 In case you want to keep you changes, you can also opt to 'fork' the repo by clicking `Create a new repository`. This will also enable you to check out the code locally and run from your own machine.\n\n5. Configure the secrets as follows:\n\n- Copy `.env.example` and then paste it. Now rename the copy to `.env`\n\n    ![codespace](./assets/codespaces.png)\n\n- Edit `.env` and provide the required variables:\n    - `WATSONX_PROJECT_ID` (your watsonx.ai project ID)\n    - `WATSONX_API_ENDPOINT` (your watsonx.ai endpoint, e.g. `https://us-south.ml.cloud.ibm.com`)\n    - `WATSONX_API_KEY` (your watsonx.ai API key)\n    - `ASTRA_DB_API_ENDPOINT` and `ASTRA_DB_APPLICATION_TOKEN`\n\n6. Now we can run Langflow as follows in the terminal window:\n\n    ```bash\n    pip install uv\n    uv sync\n    uv run langflow run --env-file .env\n    ```\n    ![run-langflow](./assets/run-langflow.png)\n\n    This starts Langflow and opens a port to your Codespace in the cloud. Click `Make Public` to ensure you can access Langflow from anywhere on the internet.\n\n    ![codespace-forward-port](./assets/codespace-forward-port.png)\n\n    Now navigate to `PORTS` which shows you all forwarded ports from the Codespace, click on the `Forwarded Address` for Langflow and click the globe icon to open Langflow in a browser\n\n    ![codespace-ports](./assets/codespace-ports.png)\n\n    💡 In case you lose track of the URL to Langflow, just click on `PORTS` again in the terminal window.\n\n    ⚠️ Ensure the Port Visibility is set to Public, especially important for the MCP server part later on in this tutorial!\n\n    ![codespace-public-port](./assets/public-port.png)\n\n🎉 Congrats! You finished the set-up part of the workshop. Now for the fun part!\n\n## 📦 Workshop follow-along\n\n### 1. 🧱 Setup of a simple Langflow Chatbot\n**Goal:** Create a chatbot with: input → model → output\n\n#### Steps:\n1. Open Langflow\n2. Click `+ New Flow` / `+ Blank Flow`\n3. Collapse `Inputs` and drag the `Chat Input` component to the canvas\n4. Collapse `Models` and drag the `IBM watsonx.ai` component to the canvas. Connect `Input` to the `Chat Input`\n    - Ensure that the `API Endpoint`, `Project ID` and `API Key` have been set correctly\n    - Select `ibm/granite-3-3-8b-instruct` as the `model`  (or try another one and check out the differences)\n5. Collapse `Outputs` and drag the `Chat Output` component to the canvas. Connect `Message` to the `Chat Output` component\n\n![chatbot-flow](./assets/chatbot-flow.png)\n\n👏 Amazing! You just built your first flow. Let's run it by clicking `▶️ Playground` and asking the question:\n\n    What's the difference between AI and Machine Learning?\n\nYou'll see **watsonx.ai** answer your question nicely!\n\n### 2. 🧭 Familiarize yourself with Langflow\n**Goal:** Understand the main components of Langflow\n\n#### Steps:\n1. If still open, close the Playground popup\n2. Select `Chat Input` and click `Controls`\n3. You'll see a field name `Input Text`, type `What's the difference between AI and Machine Learning` in the text field. close the popup\n4. Select `Chat Output`, the three dots `...` and click `Expand`\n5. Do the same with `Chat Input`\n6. Click the play button `▶️` on the `Chat Output` component and see the flow run\n\nNotice the running time of the separate components.  \nClick the magnifying glass `🔍` in the `watsonx.ai` component. This shows you a popup with the intermediate data that is passed to the next component. Very useful for debugging purposes!\n\n![chatbot-run](./assets/chatbot-run.png)\n\n### 3. 🧠 Agentic AI with Langflow\n**Goal:** Create an AI Agent that has access to a URL tool and a Calculator tool\n\n![basic-agentic-ai](./assets/basic-agentic-ai.png)\n\n#### Steps:\n1. Reproduce the above flow (or load it from [./flows/basic-agentic-ai.json](./flows/basic-agentic-ai.json))\n2. For watsonx.ai, ensure that the `API Endpoint`, `Project ID` and `API Key` have been set correctly. Also make sure the output is set to `Language Model`.\n3. Ensure the model is set to a chat-capable model, such as `meta/meta-llama-3-3-70b-instruct`\n4. When adding the `URL` and `Calculator` components to the canvas, select them and click `Tool mode`\n5. Connect all the components\n\n👏 Amazing! You just built your first AI Agent. Let's run it by clicking `▶️ Playground` and asking the question:\n\n    What is 2x the value of a Euro in Dollars, using the latest most recent data\n\nYou'll get an answer stating a value of $2.34 or something (as of July 2025).\n\nTo see the magic behind, simply click the down arrow `🔽`. The Agent decided to use two tools:\n1. The URL tool to fetch the current exchange rates\n2. The Calculator tool to multiply the value by two\n\n![tool-usage](./assets/tool-usage.png)\n\n### 4. 📚 Retrieval-Augmented Generation (RAG) with Astra DB\n**Goal:** Adding external knowledge by making use of Vector Search and RAG\n\n#### Preparation: Creating a FAQ collection\nIn this step we'll create a new collection in your `support_agent` database in [Astra DB](https://astra.datastax.com) to store data as a knowledge base.\n\nFirst we need to create a collection to store the data:\n1. Browse to your `support_agent` database on [Astra DB](https://astra.datastax.com)\n2. Click `Data Explorer` and click `Create Collection +`\n3. Type your collection name, i.e. `company_faq` and enable `Vector-enabled collection`\n4. Leave NVIDIA, NV-Embed-QA, 1024 and Cosine as it is\n5. Click `Create Collection`\n\n![astra-new-collection](./assets/astra-new-collection.png)\n\nYou just created a new empty collection to store knowledge base articles.\n\n#### Steps: Add Astra DB as a RAG tool in Langflow\n\nExtend your existing Basic Agentic AI flow with the following:\n1. Collapse `Vector Stores` and drag `Astra DB` to the canvas\n2. Click the component and select `Tool mode`\n3. Make sure the `Astra DB Application Token` is configured, then select your `support_agent` database and `company_faq` collection\n4. Click the config button behind `Actions` and update the three `Tool descriptions` by replacing\n    - `Ingest and search documents in Astra DB` with\n    - `Answer frequently asked questions (FAQs) about shipping, returns, placing orders, and more`\n    - ![astra-rag-agent](./assets/rag-edit-tools.png)\n    - Click `Close x`\n    - ⚠️ This essential step ensures the Agent understands to use this specific tool to search for FAQs\n4. Connect the `Astra DB` component to the `Agent` component\n\n![astra-rag-agent](./assets/astra-rag-agent.png)  \nFor ease of use, this flow is also available here: [./flows/rag-agentic-ai.json](./flows/rag-agentic-ai.json).\n\nLet's run it by clicking `▶️ Playground` and asking the question:\n\n    What are your shipping times?\n\nAs a response we get a generic answer OR the agent just stops because of too many iterations. Why? Because our collection is still empty. Let's fix that!\n\n#### Steps: Add some articles to our knowledge base\nExtend your flow with the following additional flow (scroll down a bit for a blank piece of canvas):\n1. Collapse `Data` and drag `File` to the canvas\n2. Click on `Upload a file` and upload [./data/Company_FAQ.pdf](./data/Company_FAQ.pdf) from this repository (you'll have to download it to your machine first)\n3. Collapse `Processing` and drag `Split Text` to the canvas in order to chunk the content\n4. Set the `Chunk size` to 500 (because NV-Embed-QA only allows 512 tokens at maximum) and `Chunk overlap` to 100 (so that every chunk has a bit of information from the previous one)\n5. Collapse `Vector Stores` and drag `Astra DB` to the canvas\n6. Make sure the `Astra DB Application Token` is configured, then select your `support_agent` database and `company_faq` collection\n7. Click the play button `▶️` on the `Astra DB` component, see the flow run and observe the time consumed. You can also click the intermediate magnifying glasses `🔍` to debug the flow.\n\n![astra-ingest](./assets/astra-ingest.png)\n\n🙌 Congrats! You just loaded a PDF, converted it to plain text, chunked it and loaded it into a Vector enabled collection in Astra DB!\n\n#### 👀 Check: Have a look at the data in Astra DB\nIn this step we'll have a look at the dataset in your `support_agent` database in [Astra DB](https://astra.datastax.com).\n\n1. Browse to your `support_agent` database on [Astra DB](https://astra.datastax.com)\n2. Click `Data Explorer` and click `company_faq`\n3. Observe the data loaded into the collection on the right side of the screen\n4. Toggle from `Table` to `JSON` view and collapse some of the rows to see what's inside\n\nTo see Vector Search in action, type the following in the text box `Search`:\n\n    What are your shipping times\n\nYou'll see the chunk with shipping times show up as the first result. You just ran an Approximate Nearest Neighbor (ANN) search transparantly utilizing the Vectorize functionality in Astra DB that does the vectorization for you on demand.\n\n![astra-vector-search](./assets/astra-vector-search.png)\n\n#### 🚀 Now let's run the Agent in Langflow\nBrowse back to Langflow, click on `▶️ Playground` and click on `+` on the left side to start a new Chat. Then run the following question:\n\n    How many hours do I need to wait for a domestic order?\n\n 🎉 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.\n\n ![langflow-vector-search](./assets/langflow-vector-search.png)\n\n### 5. 📈 Adding structured data\n**Goal:** Every enterprise has structured data alongside unstructured data and often these are related to each other. This step enables your Agent to retrieve structured order and product details.\n\n#### Preparation: Add Orders data\n1. Browse to your `support_agent` database on [Astra DB](https://astra.datastax.com)\n2. Click `Data Explorer` and click `Create Collection +`\n3. Name the collection `orders`, disable the `Vector-enabled collection` switch and click `Create Collection`\n4. Click `Load Data` and upload the file: [./data/sample_orders.csv](./sample_orders.csv)\n5. Verify the data was loaded into Astra DB\n\n#### Preparation: Add Products data\n1. Click `Create Collection +`\n2. Name the collection `products`, disable the `Vector-enabled collection` switch and click `Create Collection`\n3. Click `Load Data` and upload the file: [./data/sample_products.csv](./sample_products.csv)\n4. Verify the data was loaded into Astra DB\n\n#### Steps 🛠️🔍: Add Order Lookup to the agent \n1. Return to your Langflow flow\n2. Collapse `DataStax` and drag `Astra DB Tool` to the canvas\n3. Configure as follows:\n    - **Tool Name:** `OrderLookup`  \n    - **Tool Description:** `A tool used to look up an order based on its ID`   \n    - **Collection Name:** `orders`  \n    - Ensure `Astra DB Application Token` and `API endpoint` are configured\n    - Click `Open Table`, click `+` to add a field and update the field name to `orderNumber`, then click `Save` (this allows the tool to use the orderNumber column for queries)\n4. Connect the `Astra DB Tool` component to the `Agent` component while selecting `Tool` as output mode.\n\n#### Steps 🛠️🔍: Add Products Lookup to the agent \n1. Collapse `DataStax` and drag `Astra DB Tool` to the canvas\n2. Configure as follows:\n    - **Tool Name:** `ProductLookup`  \n    - **Tool Description:** `A tool used to look up a product based on its ID`   \n    - **Collection Name:** `products`  \n    - Ensure `Astra DB Application Token` and `API endpoint` are configured\n    - Click `Open Table`, click `+` to add a field and update the field name to `productId`, then click `Save` (this allows the tool to use the productId column for queries)\n3. Connect the `Astra DB Tool` component to the `Agent` component while selecting `Tool` as output mode.\n\n#### Steps 💬: Instruct the Agent\nLet'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.\n\n1. On the `Agent` component, click the square at `Agent Instructions`\n2. Paste the following instruction:\n\n```text\nYou are a skilled customer service agent supporting Customer Service Employees to answer questions from customers. Your primary responsibility is to use the available tools to accurately address user inquiries and provide detailed, helpful responses. You can:\n\n- 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.\n- Access product information to provide relevant descriptions or specifications based on the retrieved product ids.\n- 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!\n- Use the Calculator tool to perform basic arithmetic. Only use the calculator tool!\n- Use the URL tool to find known information on the internet or APIs to make the response more accurate.\n\nThink step by step. If answering a question requires multiple tools, combine their outputs to deliver a comprehensive response.\nFeel free to iterate a few times!\nExample: For an inquiry about canceling an order, retrieve the order and product details, and also reference the FAQ for the cancellation policy.\nExample: If there are questiona that require arithmetic, make sure to invoke the Calculator tool.\nExample: If there is a need for external up-to-date information, make sure to invoke the URL tool.\n\nAlways aim to deliver clear, concise, and user-focused solutions to ensure the best possible experience.\n```\n\n![customer-support-agent](./assets/customer-support-agent.png)  \nFor ease of use, this flow is also available here: [./flows/customer-support-agent.json](./flows/customer-support-agent.json).\n\n🥳 You did it! You now have an Agentic Flow with access to:\n- A company FAQ knowledgebase\n- Orders data\n- Product data\n- A calculator\n- Capability to fetch information from the internet\n\nLet's run some queries. For instance:\n\n- What's the shipping status of order 1001?\n- What was ordered with 1003?\n- What date will order 1004 arrive?\n- How can I cancel order 1001 and what is the shipping policy?\n- What's the amount of order 1005 in Euros?\n- The customer paid 110 euros for order 1001, how much should we return?\n\nObserve how all the different tools are being used to answer the user's questions.\n\n### 5. 📱 Create an external app that call the Langflow REST Endpoint\nIn this step we'll create a simple Python app that runs the Langflow flow.\n\n#### Steps: Use the Langflow API endpoint in Python\n1. In Langflow exit the Playground and click on `Share` in the right top corner and then click `API Access`\n2. Click on `Python`\n\n    ![langflow-python-api](./assets/langflow-python-api.png)\n\n3. Copy the code, use your Codespaces cloud IDE and paste it in a new file called `flow.py`\n    - Change the `url` variable on line to 10 to `http://localhost:7860`, make sure to keep the full path (`/api/...`)!\n    - Change the `input_value` variable on line 16 to something like '*How can I cancel order 1001 and what is the shipping policy?*'\n5. Save the file\n6. In the same API Access window in Langflow now click the `create and API key` link\n7. In the new window, click `+ Add New`, type a description (e.g. Support Agent) and click `Generate API Key`\n8. Make note of the generated API Key\n    - ⚠️ This is the only time you'll see it, so make sure you save it somewhere handy!\n\nLet's run it!  \nReturn to your Codespaces Cloud IDE and open a new `TERNINAL` window by clicking the `+` sign:\n\n![codespaces-new-terminal](./assets/codespaces-new-terminal.png)\n\nNow copy-past the following in the terminal and hit Enter:\n\n```bash\nexport LANGFLOW_API_KEY=\u003cyour just generated API key\u003e\nuv run flow.py\n```\n\nAs a response you'll see a JSON structure that contains the actual answer and additonal metadata.  \nThe answer you're probably looking for is located inside the JSONPath `$.outputs[0].outputs[0].results.message.text`.\n\nIf you change line 31 to the following, you'll see the actual response: `print(response.json()['outputs'][0]['outputs'][0]['results']['message']['text'])`\n\n### 6. 🤩 Add a visual front-end app\nIn this step we'll use a simple Streamlit app that implements a Customer Support Agent.\n\n⚠️ You need the Flow ID of your flow which can be found as the unique ID following `.../flow/` in the URL of Langflow while your Flow is open. Otherwise you can find it on line 10 in `flow.py`  following `.../run/`.\n\nIn order to run the app:\n```bash\nexport LANGFLOW_API_KEY=\u003cyour just generated API key\u003e\nexport LANGFLOW_FLOW_ID=\u003cyour flow id\u003e\nuv run streamlit run app.py\n```\n\nNow click `Open in browser` and the App will open:\n\n![streamlit-front-end](./assets/streamlit-front-end.png)\n\n### 7. Publish as an MCP server\nMCP helps you build agents and complex workflows on top of LLMs. LLMs frequently need to integrate with data and tools, and MCP provides:\n- A growing list of pre-built integrations that your LLM can directly plug into\n- The flexibility to switch between LLM providers and vendors\n- Best practices for securing your data within your infrastructure\n\nLangflow easily enables you to publish your flows as an MCP server. Let see how!\n\n#### Download Claude desktop\n1. Download [Claude Desktop](https://claude.ai/download)\n2. Create a (free) account and sign in\n\n#### Publish the flow as MCP server\n3. Go back to your Langflow canvas\n4. Click `Share` and `MCP Server`\n5. Click `Edit Tools` and ensure the Tool name and Tool description describe something meaningful. Also make sure the checkbox is checked.\n    ![mcp-tool](./assets/mcp-tool.png)\n6. Click `JSON`, select your environment and click the copy button\n\n#### Configure Claude desktop to invoke the MCP server\n\n7. Open Claude desktop\n8. Click `Settings` and `Developer`\n9. Click `Edit Config`, right-click `claude_desktop_config.json` and open it with your favorite IDE\n10. Now paste the JSON contents from Langflow and save it\n    ⚠️ You may need to define the full path to uvx. On a linux based environment use which uvx to find out where it's installed. See the example below:\n\n    ![claude-config](./assets/claude-config.png)\n\n11. Restart Claude desktop to load the new config and allow Claude to read the tool availability\n\n🥳 You did it! You now have access to the Langflow flow through a MCP client. To confirm the MCP server is accesible, click on the setting button. You should see the `lf-starter_project` being available. Upon clicking it, you'll see the `customer_support_agent` tool availability.\n\n![claude-mcp-server](/assets/claude-mcp-server.png)\n\nRun a query like:\n\n    What's the status of my order 1001\n\nClaude will ask you for approval to invoke the Customer Support Agent tool and you'll get something back like:\n\n![claude-desktop](./assets/claude-desktop.png)\n\n💡 There's more information about working with MCP in the [Claude developer docs](https://modelcontextprotocol.io/quickstart/user).\n\n💡 In case you want to debug MCP servers or understand what's happening on the line, you can use [MCP Inspector](https://github.com/modelcontextprotocol/inspector). It's easy to run it through:\n\n```sh\nnpx @modelcontextprotocol/inspector\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fwatsonx-langflow-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelderu%2Fwatsonx-langflow-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fwatsonx-langflow-agent/lists"}