<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tejas Kumar</title>
    <description>The latest articles on DEV Community by Tejas Kumar (@tejas_kumar_83c520d6bef27).</description>
    <link>https://dev.to/tejas_kumar_83c520d6bef27</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2513127%2Ff09f8119-9852-4e66-9d54-b985a7471d9e.jpg</url>
      <title>DEV Community: Tejas Kumar</title>
      <link>https://dev.to/tejas_kumar_83c520d6bef27</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tejas_kumar_83c520d6bef27"/>
    <language>en</language>
    <item>
      <title>How to Create Secure AI Applications</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Thu, 26 Jun 2025 20:54:26 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/how-to-create-secure-ai-applications-140b</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/how-to-create-secure-ai-applications-140b</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This post also exists as a &lt;a href="https://youtu.be/qkcdmlVv9Ko" rel="noopener noreferrer"&gt;video&lt;/a&gt; for those who prefer watching over reading.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You’ve built an impressive AI agent. It can query databases, call external APIs, and even process payments. But with every API call to a third-party LLM provider, you're potentially broadcasting sensitive data—API keys, PII, financial information—into a black box. Relying on the vendor's privacy policy is not a security strategy.&lt;/p&gt;

&lt;p&gt;It’s time to move beyond the default and engineer security into your AI applications from the ground up. This isn't about a single solution, but a spectrum of choices. We call it the &lt;strong&gt;Ladder of AI Security&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi398vquazcocdyi7p9ff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi398vquazcocdyi7p9ff.png" alt="The Ladder of AI Security" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This guide will walk you through four distinct levels of security for AI agents, complete with code examples using the Vercel AI SDK and Node.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 1: Transparent Agents (Unsafe)
&lt;/h2&gt;

&lt;p&gt;This is where most projects start. You connect your agent directly to a provider like OpenAI, passing data back and forth in plaintext.&lt;/p&gt;

&lt;p&gt;The architecture is what we're used to:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User -&amp;gt; Your App -&amp;gt; OpenAI API (Plaintext) -&amp;gt; Your App -&amp;gt; User&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Risks
&lt;/h3&gt;

&lt;p&gt;There are three main risks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Data Exposure to Vendor:&lt;/strong&gt; Your prompts and tool outputs, which may contain sensitive data, are sent to a third party. You have no control over how they store, process, or use that data for training future models.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Man-in-the-Middle:&lt;/strong&gt; While TLS helps, any compromise on your server or the network path exposes data.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Client-Side Vulnerabilities:&lt;/strong&gt; If secrets are handled in the browser, a malicious extension can easily scrape them.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A simple Langflow or AI SDK implementation often starts here. It's fast to prototype but not production-ready for sensitive workflows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// The default, insecure approach&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-4-turbo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Buy product 456 using credit card &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;USER_CREDIT_CARD&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a ticking time bomb. Let's defuse it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 2: Strategic Censorship
&lt;/h2&gt;

&lt;p&gt;The core principle here is simple: &lt;strong&gt;the LLM should never see the raw secret.&lt;/strong&gt; Instead, we treat the LLM as an untrusted orchestration engine. We give it an encrypted "token" or "lockbox" that it can pass around but cannot open. Only our application code holds the key.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Architecture
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Fetch Secret:&lt;/strong&gt; Your application retrieves a sensitive token (e.g., credit card details) from a secure store.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Encrypt:&lt;/strong&gt; Before sending it to the LLM as part of a tool's output, you encrypt the token using a key the LLM never sees.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Orchestrate:&lt;/strong&gt; The LLM receives the encrypted ciphertext and the non-secret initialization vector (IV). It decides to use another tool, passing the ciphertext as an argument.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Decrypt &amp;amp; Execute:&lt;/strong&gt; Your application code receives the ciphertext from the LLM, decrypts it with its private key, and uses the raw secret to perform the required action.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's implement this using Node.js's built-in &lt;code&gt;crypto&lt;/code&gt; module. &lt;strong&gt;Never roll your own crypto.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Encryption &amp;amp; Decryption Utilities
&lt;/h3&gt;

&lt;p&gt;We'll use &lt;code&gt;AES-256-GCM&lt;/code&gt;, a modern, authenticated symmetric cipher.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// crypto-utils.js&lt;/span&gt;

&lt;span class="c1"&gt;// Use a secure key management system in production (e.g., AWS KMS, HashiCorp Vault)&lt;/span&gt;
&lt;span class="c1"&gt;// For this example, we'll generate one on the fly.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;createKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AES-GCM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;256&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// extractable&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;encrypt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;decrypt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;webcrypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getRandomValues&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// GCM standard is 12 bytes&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encodedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextEncoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;webcrypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AES-GCM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;encodedData&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Return IV and ciphertext, both needed for decryption.&lt;/span&gt;
  &lt;span class="c1"&gt;// Base64 encode for easy transport in JSON.&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;decrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encrypted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encrypted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ciphertext&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encrypted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decryptedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;webcrypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;AES-GCM&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;ciphertext&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextDecoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decryptedData&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Integrating with an AI Agent
&lt;/h3&gt;

&lt;p&gt;Now, let's wire this into our Vercel AI SDK agent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@ai-sdk/openai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;decrypt&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./crypto-utils.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;createKey&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;toolResults&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;maxToolRoundtrips&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Tool to get the card. It returns an *encrypted* object.&lt;/span&gt;
      &lt;span class="na"&gt;getCreditCard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get the credit card for a user ID.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;userId&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`[APP] Getting card for user: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cardData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;number&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1234-5678-9012-3456&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;12/26&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Blessing K.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="p"&gt;};&lt;/span&gt; &lt;span class="c1"&gt;// Fetched from DB/Vault&lt;/span&gt;

          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encryptedCard&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cardData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[APP] Encrypting card data. Giving LLM the ciphertext.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

          &lt;span class="c1"&gt;// The LLM only sees the encrypted data&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;encryptedCard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="c1"&gt;// Tool to buy a product. It *expects* an encrypted object.&lt;/span&gt;
      &lt;span class="na"&gt;buyProduct&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Buy a product with the provided encrypted credit card object.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
          &lt;span class="na"&gt;encryptedCard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="na"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="na"&gt;ciphertext&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
          &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;encryptedCard&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[APP] Received encrypted card from LLM. Decrypting...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cardData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;decrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encryptedCard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

          &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="s2"&gt;`[SECURE EXECUTION] Buying product &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;productId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; with card ending in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;cardData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;
            &lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
          &lt;span class="p"&gt;);&lt;/span&gt;

          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;productId&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Get the credit card for user 123 and then buy product 456 with it.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`\nFinal Result: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pattern is incredibly powerful. The LLM acts as a stateless function orchestrator, passing opaque handles (our encrypted JSON) between tools, while our application maintains the security boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 3: Local-Only
&lt;/h2&gt;

&lt;p&gt;Even with encryption, you're still sending metadata and non-sensitive prompt text to a third party. For maximum privacy, you can eliminate the third party entirely by running the model locally.&lt;/p&gt;

&lt;p&gt;Tools like &lt;strong&gt;Ollama&lt;/strong&gt; have made this remarkably accessible.&lt;/p&gt;

&lt;p&gt;The architecture looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;User -&amp;gt; Your App -&amp;gt; Local LLM (Ollama) -&amp;gt; Your App -&amp;gt; User&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Benefit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Data Sovereignty:&lt;/strong&gt; No data ever leaves your machine or your VPC (Virtual Private Cloud). You don't need to encrypt data &lt;em&gt;for the LLM&lt;/em&gt;, because you control the LLM's environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Vendor Lock-in:&lt;/strong&gt; Swap out open-weight models as you see fit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost:&lt;/strong&gt; No per-token API fees (though there are hardware costs).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Catch
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardware:&lt;/strong&gt; You need a machine with sufficient RAM and, for good performance, a powerful GPU.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New Security Boundary:&lt;/strong&gt; The risk now shifts from a third-party vendor to the security of your own host machine. If an attacker gains access to the machine, they can read the process memory and potentially access the secrets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Langflow's Agent component natively supports Ollama. All you've got to do is drag an Ollama component into your flow, enter the connection details, choose a model, and then wire it up to the Agent, choosing "Custom" for the Agent's LLM choice.&lt;/p&gt;

&lt;p&gt;If you're using the Vercel AI SDK, here's how to point it to a local Ollama instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ollama&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ollama-ai-provider&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="c1"&gt;// Point to your local Ollama instance running a model like phi3&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;ollama&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;phi3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;What is the capital of France?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's that simple. All network traffic now stays on &lt;code&gt;localhost&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Level 4: Hardware-Enforced Security
&lt;/h2&gt;

&lt;p&gt;This is the gold standard for secure computing. It solves the problem of a compromised host by leveraging special hardware features.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;Trusted Execution Environment (TEE)&lt;/strong&gt; is an isolated area within a CPU. Code and data loaded inside a TEE are protected at the hardware level, meaning even the host operating system, kernel, or a cloud provider's hypervisor or administrators cannot access its memory.&lt;/p&gt;

&lt;p&gt;With this architecture, your entire AI agent, or at least the part that handles secrets, runs inside this hardware-secured enclave.&lt;/p&gt;

&lt;p&gt;Some examples of TEEs in the wild are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apple's "Private Cloud Compute" for Apple Intelligence and on-device "Secure Enclave" that stores keys for Apple Pay, iCloud Keychain, and even your fingerprints and face ID.&lt;/li&gt;
&lt;li&gt;AWS' Nitro Enclaves&lt;/li&gt;
&lt;li&gt;Azure Confidential Computing&lt;/li&gt;
&lt;li&gt;Google Cloud Confidential Computing&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How it works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Attestation:&lt;/strong&gt; The TEE cryptographically proves to the client that it is a genuine TEE running the expected code.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Sealed Data:&lt;/strong&gt; The TEE can encrypt data using a key that is fused into the hardware and inaccessible to the outside world.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Secure Inference:&lt;/strong&gt; An LLM (usually a smaller, highly quantized model) can run inference entirely within the TEE. Any sensitive data it processes is protected in memory.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  When to use this
&lt;/h3&gt;

&lt;p&gt;This is for high-stakes applications: processing medical records, financial data, or national security information. Implementing a TEE-based solution is complex and outside the scope of a simple blog post, but it's crucial to know this layer of security exists for when the stakes are highest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing Your Level
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Core Principle&lt;/th&gt;
&lt;th&gt;Mitigates Risk Of...&lt;/th&gt;
&lt;th&gt;When to Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Transparent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Speed &amp;amp; Simplicity&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Prototyping, non-sensitive data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Censorship&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LLM as Untrusted Orchestrator&lt;/td&gt;
&lt;td&gt;Vendor data misuse, sending raw secrets over the wire.&lt;/td&gt;
&lt;td&gt;Most production apps with sensitive tokens (API keys, PII).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Local-Only&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full Data Sovereignty&lt;/td&gt;
&lt;td&gt;All third-party data exposure.&lt;/td&gt;
&lt;td&gt;Privacy-first apps, internal enterprise tools, air-gapped environments.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;4. Hardware&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Trust No One (Not Even the Host)&lt;/td&gt;
&lt;td&gt;Compromised host machine, malicious cloud admin.&lt;/td&gt;
&lt;td&gt;High-security industries (finance, healthcare), government.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Security is a conscious design choice. By understanding this ladder, you can move from a default state of high risk to an intentional, secure architecture that protects your users and your business.&lt;/p&gt;

&lt;p&gt;What level is your project at? Share your own security strategies and challenges with us on &lt;a href="https://x.com/langflow_ai" rel="noopener noreferrer"&gt;X&lt;/a&gt; or &lt;a href="https://discord.com/invite/EqksyE2EX9" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Doesn't encrypting and decrypting data on every tool call add a lot of performance overhead?
&lt;/h3&gt;

&lt;p&gt;Yes, but it's almost always negligible. Modern CPUs have hardware acceleration for AES, meaning encryption/decryption operations take microseconds. In contrast, a network roundtrip and inference from a large language model take hundreds or thousands of milliseconds. The security gain from a sub-millisecond operation is an excellent trade-off. Your bottleneck will be the LLM, not the crypto.&lt;/p&gt;

&lt;h3&gt;
  
  
  You glossed over key management. What's a realistic way to handle the encryption key in production?
&lt;/h3&gt;

&lt;p&gt;Excellent question. The &lt;code&gt;createKey()&lt;/code&gt; function in the example is for demonstration only. In a real-world application, you must &lt;strong&gt;never&lt;/strong&gt; store keys in code. Use a dedicated secret management service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cloud KMS (Best Practice):&lt;/strong&gt; Use AWS KMS, Google Cloud KMS, or Azure Key Vault. Your application is granted IAM permissions to &lt;em&gt;use&lt;/em&gt; a key for encryption/decryption, but it never actually holds the key material itself. This is the most secure and common pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vaults:&lt;/strong&gt; Use a tool like HashiCorp Vault, which provides centralized secrets management, dynamic secrets, and tight access control.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment Variables:&lt;/strong&gt; A step up from hardcoding, but still risky as variables can be exposed in logs, deployment configurations, or shell history. Use this only in secure, tightly controlled environments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Are local, open-weight models from Ollama really good enough for complex tool use?
&lt;/h3&gt;

&lt;p&gt;It depends on the model size and the task complexity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High-End Models:&lt;/strong&gt; Larger models (e.g., Llama 3 70B, Mixtral 8x7B) have excellent function-calling and tool-use capabilities, often rivaling proprietary models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smaller Models:&lt;/strong&gt; Smaller models (e.g., 7B or 8B parameter models) may struggle with multi-step reasoning or consistently generating perfectly formatted JSON for tool calls. You may need more robust prompt engineering, output parsing, and error handling.
It's a trade-off between performance, hardware cost, and capability. Always test your specific use case.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Can I combine these security levels? For instance, using encryption with a local LLM?
&lt;/h3&gt;

&lt;p&gt;Absolutely, and it's a great example of &lt;strong&gt;defense-in-depth&lt;/strong&gt;. While a local LLM (Level 3) prevents data from leaving your server, the data still exists in plaintext in the model's memory context. If you also implement encryption (Level 2), you protect that data from other processes on the same machine or a potential memory dump by an attacker. This ensures the raw secret &lt;em&gt;only&lt;/em&gt; exists for the brief moment it's being used by your tool's &lt;code&gt;execute&lt;/code&gt; function and is never in the LLM's context, even locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  This is great for data protection, but what about prompt injection?
&lt;/h3&gt;

&lt;p&gt;This is a critical distinction. The techniques in this article primarily address &lt;strong&gt;data confidentiality and privacy&lt;/strong&gt;—preventing the LLM and third parties from seeing sensitive data. &lt;strong&gt;Prompt injection&lt;/strong&gt; is an attack on the &lt;strong&gt;integrity and control&lt;/strong&gt; of the LLM, where an attacker uses malicious input to trick the agent into performing unintended actions.&lt;br&gt;
They are separate but related problems. To combat prompt injection, you need other strategies like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strong input sanitization.&lt;/li&gt;
&lt;li&gt;Using separate, well-defined system and user prompts.&lt;/li&gt;
&lt;li&gt;Implementing fine-grained permissions for tools.&lt;/li&gt;
&lt;li&gt;Adding a human-in-the-loop confirmation step for destructive actions (like finalizing a purchase).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The article focuses on coding with the Vercel AI SDK. How does a visual tool like Langflow fit into building these secure AI agents?
&lt;/h3&gt;

&lt;p&gt;Langflow is the ideal visual front-end for designing and prototyping the exact AI agents discussed in this article. While the code examples show the underlying logic, Langflow allows you to build the same agent architecture—with models, tools, and prompts—using a drag-and-drop interface. This makes it incredibly fast to iterate and is perfect for developers who want to visualize their agent's flow or for teams with members who are less focused on coding. You can build in Langflow first, then export to code to add complex security logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can I connect an AI agent built in Langflow to a local model with Ollama, as mentioned in Level 3?
&lt;/h3&gt;

&lt;p&gt;Langflow has excellent, first-class support for Ollama, making it one of the easiest ways to build and run AI applications with local LLMs. In the Langflow interface, you simply add an Ollama component, point it to your local Ollama server URL (e.g., &lt;code&gt;http://localhost:11434&lt;/code&gt;), and select the model you have running (like Mistral or Llama 3). This allows your Langflow agent to achieve Level 3 security (Local-Only) without writing any custom integration code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I implement the Level 2 "Censorship" (encryption/decryption) pattern directly within my Langflow AI application?
&lt;/h3&gt;

&lt;p&gt;Yes. This is an advanced use case where Langflow's flexibility shines. You would use Langflow's "Custom Component" feature to create nodes that contain your Python security code. One component would contain the &lt;code&gt;encrypt&lt;/code&gt; function, and another would contain the &lt;code&gt;decrypt&lt;/code&gt; function from the blog post. Your agent's flow would then route the data through these custom components at the appropriate steps, creating a secure, encrypted workflow within the visual environment of Langflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the main advantage of using Langflow for AI agent development over coding everything from scratch?
&lt;/h3&gt;

&lt;p&gt;The primary advantage of Langflow is &lt;strong&gt;speed and clarity&lt;/strong&gt;. Langflow abstracts away the boilerplate code, allowing you to focus on the agent's logic, a concept central to modern AI. You can visually see how the prompt, tools, and LLM connect, making it easier to debug and explain to others. For building AI applications, Langflow acts as a powerful orchestrator that helps you experiment with different models (like swapping OpenAI for a local Ollama model) with just a few clicks.&lt;/p&gt;

&lt;h3&gt;
  
  
  So, for someone building a new AI application, is Langflow the recommended starting point?
&lt;/h3&gt;

&lt;p&gt;For a vast number of AI applications, &lt;strong&gt;yes&lt;/strong&gt;. Langflow is the perfect starting point for designing your agent's core logic. It allows you to quickly validate your ideas, test different prompts, and ensure your tool chain works as expected. Because Langflow is built on open-source libraries like LangChain, the concepts are fully transferable, making it an essential tool for both learning and professional AI agent development.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>webcrypto</category>
    </item>
    <item>
      <title>LLM Observability Explained (feat. Langfuse, LangSmith, and LangWatch)</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Thu, 19 Jun 2025 14:35:47 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/llm-observability-explained-feat-langfuse-langsmith-and-langwatch-26ih</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/llm-observability-explained-feat-langfuse-langsmith-and-langwatch-26ih</guid>
      <description>&lt;p&gt;Building a new application powered by Large Language Models (LLMs) is an exciting venture. With frameworks and APIs at our fingertips, creating a proof-of-concept can take mere hours. But transitioning from a clever prototype to production-ready software unveils a new set of challenges, central among them being a principle that underpins all robust software engineering: observability.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/TDcT9ao47Tk"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you've just shipped a new AI feature, how do you know what's really happening inside it? How many tokens is it consuming per query? What's your projected bill from your language model provider? Which requests are failing, and why? What data can you capture to fine-tune a model later for better performance and lower cost? These aren't just operational questions; they are fundamental to building reliable, scalable, and cost-effective AI applications.&lt;/p&gt;

&lt;p&gt;Observability is the key to answering these questions. It is especially critical in the world of LLMs, where the non-deterministic nature of model outputs can introduce a layer of unpredictability that traditional software doesn't have. Without observability, you're usually flying blind.&lt;/p&gt;

&lt;p&gt;Fortunately, instrumenting your application for observability is no longer the difficult task it once was. The modern AI stack has matured, and integrating powerful observability tools can be surprisingly straightforward. Let's explore how to do this with &lt;a href="https://langflow.org/" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; to see these concepts in action.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Foundation: Instrumenting Your Application
&lt;/h3&gt;

&lt;p&gt;At its core, observability in an AI context involves capturing data at each step of your application's logic. When a user sends a request, a lot happens: a prompt is constructed, one or more calls are made to an LLM, the output is parsed, and perhaps other tools like calculators or web search APIs are invoked. A good observability platform captures this entire sequence as a "trace."&lt;/p&gt;

&lt;p&gt;A trace is a structured log of the entire journey of a request, from start to finish. It shows you the parent-child relationships between different operations, the inputs and outputs of each step, and crucial metadata like latency and token counts.&lt;/p&gt;

&lt;p&gt;While you could build a system to capture this data yourself, a dedicated observability platform provides a full suite of tools out of the box: a user interface for exploring traces, dashboards for monitoring key metrics over time, and systems for evaluating the quality of your AI's responses.&lt;/p&gt;

&lt;p&gt;Let's look at how easily you can integrate some of the most popular platforms into a Langflow application. The process is often as simple as setting a few environment variables.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Tour of the AI Observability Landscape
&lt;/h3&gt;

&lt;p&gt;The ecosystem of AI observability tools is rich and growing. While they share common goals, they offer different philosophies and features. We'll look at three popular choices: LangWatch, LangSmith, and Langfuse.&lt;/p&gt;

&lt;h4&gt;
  
  
  LangWatch: Simplicity and Speed
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://langwatch.ai/" rel="noopener noreferrer"&gt;LangWatch&lt;/a&gt; is an open-source platform that prides itself on a frictionless developer experience. To &lt;a href="https://docs.langflow.org/integrations-langwatch" rel="noopener noreferrer"&gt;integrate it with an application built in Langflow&lt;/a&gt;, you only need to provide a single environment variable to Langflow: &lt;code&gt;LANGWATCH_API_KEY&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once configured, every request to your Langflow application automatically sends a detailed trace to your LangWatch dashboard. You'll see a live-reloading feed of messages, and clicking on any one of them reveals a detailed trace. This trace breaks down the entire workflow, from the initial chat input to the final output, showing you exactly how much time and how many tokens were spent at each stage—from prompt construction to the final LLM call. This immediate, granular feedback is invaluable for spotting bottlenecks and understanding costs.&lt;/p&gt;

&lt;h4&gt;
  
  
  LangSmith: Production-Grade and Battle-Tested
&lt;/h4&gt;

&lt;p&gt;From the creators of the popular LangChain library comes &lt;a href="https://www.langchain.com/langsmith" rel="noopener noreferrer"&gt;LangSmith&lt;/a&gt;, a platform designed for building production-grade LLM applications. While not open-source, it is battle-tested and offers a polished, comprehensive feature set.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.langflow.org/integrations-langsmith" rel="noopener noreferrer"&gt;Integration is similar&lt;/a&gt;: you set a few environment variables for the API endpoint, your API key, and a project name. Immediately, LangSmith begins capturing traces. Its UI provides a clear view of your application's run history, with detailed information on latency, token usage, and cost per run. LangSmith excels at providing pre-built dashboards that track key performance indicators like success rates, error rates, and latency distribution over time, giving you a high-level overview of your application's health.&lt;/p&gt;

&lt;h4&gt;
  
  
  Langfuse: The Open-Source Powerhouse
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://langfuse.com/" rel="noopener noreferrer"&gt;Langfuse&lt;/a&gt; has emerged as a favorite in the open-source community, and for good reason. It is incredibly powerful, offering deep, detailed tracing and extensive features for monitoring, debugging, and analytics. It requires a few more environment variables for its public key, secret key, and host, but the setup is still minimal.&lt;/p&gt;

&lt;p&gt;Where all of these tools truly shine is in their ability to visualize complex interactions, especially with AI agents that use multiple tools. If your application involves a sequence where the LLM decides to call a search engine, then a calculator, and then another prompt, Langfuse maps out this entire chain of thought beautifully. You can drill down into each tool call, inspect the inputs and outputs, and see precisely how the agent arrived at its final answer. This level of detail is indispensable for debugging the complex, multi-step reasoning of modern AI agents. Theirdashboards also offer a granular look at costs, breaking them down by operation, which can help you pinpoint exactly which part of your application is the most expensive.&lt;/p&gt;

&lt;h3&gt;
  
  
  From Data to Insight
&lt;/h3&gt;

&lt;p&gt;Integrating these tools is just the first step. The real value comes from what you &lt;em&gt;do&lt;/em&gt; with the data they provide. By regularly monitoring your application's traces and metrics, you can begin to ask and answer critical questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Is my application getting slower?&lt;/strong&gt; A rising p99 latency could indicate an issue with a downstream API or an inefficiently structured prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are my costs predictable?&lt;/strong&gt; Watching your token consumption can help you prevent bill shock and inform decisions like switching to a smaller, more efficient model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where are the errors happening?&lt;/strong&gt; Traces make it easy to pinpoint if failures are happening at the LLM level, in a data parsing step, or during a tool call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can I optimize my prompts?&lt;/strong&gt; By analyzing the most expensive and slowest traces, you might discover opportunities to re-engineer your prompts for better performance and lower cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Observability is not a passive activity. It is an active, ongoing process of exploration and optimization that is fundamental to the software development lifecycle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Start Building Observable AI Applications Today
&lt;/h3&gt;

&lt;p&gt;The journey to production AI is paved with good engineering practices, and observability is paramount among them. It empowers you to move with confidence, knowing you have the insight to diagnose problems, manage costs, and deliver a reliable experience to your users.&lt;/p&gt;

&lt;p&gt;We've seen how visual development platforms like &lt;a href="https://langflow.org/" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; can dramatically lower the barrier to entry, not just for building powerful AI applications but for instrumenting them with production-grade observability from day one. By abstracting away the boilerplate of integration, they allow you to focus on what truly matters: building efficient, reliable, and transparent AI systems.&lt;/p&gt;

&lt;p&gt;So, take your project to the next level. Explore these tools, instrument your application, and embrace the power of seeing what's inside the box. Your users—and your operations budget—will thank you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frequently Asked Questions
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What is AI observability and why do I need it?
&lt;/h4&gt;

&lt;p&gt;AI observability gives you visibility into how your AI applications behave in production. While traditional monitoring tracks basic metrics like server uptime, AI observability goes deeper - showing you exactly how your models think and perform. With platforms like Langflow, implementing observability becomes seamless through simple environment variables, letting you focus on building rather than instrumenting.&lt;/p&gt;

&lt;h4&gt;
  
  
  How is AI observability different from traditional application monitoring?
&lt;/h4&gt;

&lt;p&gt;Traditional monitoring focuses on server metrics, but AI systems need specialized observability. When using Langflow, you get visibility into unique AI-specific aspects like prompt construction, token usage, and the chain of reasoning your models follow. This deeper insight is crucial for building reliable AI applications.&lt;/p&gt;

&lt;h4&gt;
  
  
  What key metrics should I track in my AI application?
&lt;/h4&gt;

&lt;p&gt;Rather than tracking everything possible, focus on metrics that matter for your use case. With Langflow's integrations, you automatically get essential metrics like response times, costs, and success rates without any extra configuration. This data helps you optimize your application's performance and cost-effectiveness.&lt;/p&gt;

&lt;h4&gt;
  
  
  How do I choose between different observability platforms?
&lt;/h4&gt;

&lt;p&gt;The choice depends on your specific needs, but Langflow makes it easy to experiment. Since Langflow supports major platforms like LangWatch, LangSmith, and Langfuse through simple configuration, you can try different options without changing your application code. This flexibility lets you find the right fit for your team.&lt;/p&gt;

&lt;h4&gt;
  
  
  What's a "trace" in AI observability?
&lt;/h4&gt;

&lt;p&gt;Think of a trace as your application's story - it shows the journey from user input to final output. When using Langflow, traces are automatically captured and include rich details about each step, making it easy to understand and debug your AI workflows. This visibility is especially valuable when working with complex chains or agents.&lt;/p&gt;

&lt;h4&gt;
  
  
  How can observability help reduce costs?
&lt;/h4&gt;

&lt;p&gt;By providing detailed insights into token usage and API calls, observability helps identify optimization opportunities. Langflow's integrations make this data readily available, helping you make informed decisions about model selection and prompt engineering to keep costs under control.&lt;/p&gt;

&lt;h4&gt;
  
  
  What privacy considerations matter?
&lt;/h4&gt;

&lt;p&gt;Privacy is crucial when implementing observability. Langflow's integrations with major observability platforms respect data privacy by default, and you maintain control over what data is logged. This makes it easier to comply with regulations while still getting valuable insights.&lt;/p&gt;

&lt;h4&gt;
  
  
  How can I get started with AI observability?
&lt;/h4&gt;

&lt;p&gt;Getting started is straightforward with Langflow - simply add the appropriate environment variables for your chosen platform (LangWatch, LangSmith, or Langfuse), and you'll immediately begin capturing detailed traces and metrics. This low-friction approach lets you focus on building features while maintaining professional-grade observability from day one.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>monitoring</category>
    </item>
    <item>
      <title>Introducing Astra DB for AI Agents: A New Era of Database Interaction</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Wed, 12 Mar 2025 08:06:35 +0000</pubDate>
      <link>https://dev.to/datastax/introducing-astra-db-for-ai-agents-a-new-era-of-database-interaction-1364</link>
      <guid>https://dev.to/datastax/introducing-astra-db-for-ai-agents-a-new-era-of-database-interaction-1364</guid>
      <description>&lt;p&gt;Today we're thrilled to unveil a new way of interacting with our flagship vector database, Astra DB. Say hello to Astra DB over MCP—an innovative way to communicate with your database that leverages the Model Context Protocol (MCP) to let you create and manage databases without writing a single line of code.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/wRR-SzcI0zc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Model Context Protocol (MCP)?
&lt;/h2&gt;

&lt;p&gt;MCP is an innovation &lt;a href="https://www.anthropic.com/news/model-context-protocol" rel="noopener noreferrer"&gt;first pioneered by Anthropic&lt;/a&gt; in late 2024. It’s a standardized protocol designed for sharing context between language models and tools. This means that any MCP server can communicate with any MCP client, enabling language models to execute functions agentically on your behalf. Imagine being able to hand off entire functions to an AI—MCP makes that possible.&lt;/p&gt;

&lt;p&gt;For example, popular MCP clients include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://claude.ai/download" rel="noopener noreferrer"&gt;Claude Desktop&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.cursor.com/" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both can consume data from MCP servers and act agentically as a result. Let’s get hands on with Astra DB over MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hands-on with Astra DB over MCP
&lt;/h2&gt;

&lt;p&gt;In our demo, we explore how Astra DB over MCP unlocks a new way of interacting with your data. Let’s walk through the process.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Set up your Astra DB environment
&lt;/h3&gt;

&lt;p&gt;To get started, you need an Astra DB application token and an API endpoint. To get these, you’ll have to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sign up for Astra DB -&lt;/strong&gt; It’s free and quick. Just &lt;a href="https://astra.datastax.com/signup?utm_medium=byline&amp;amp;utm_campaign=astra-db-for-ai-agents-mcp&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;sign up&lt;/a&gt;, create a database, and you’ll receive your API endpoint along with an application token. Here are &lt;a href="https://docs.datastax.com/en/astra-db-serverless/api-reference/dataapiclient.html#set-environment-variables?utm_medium=byline&amp;amp;utm_campaign=astra-db-for-ai-agents-mcp&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;more detailed instructions&lt;/a&gt; to do so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create your database -&lt;/strong&gt; For this demo, we set up a vector database named “my_mcp_db.” Astra DB’s multi-cloud capability means you can choose your preferred region, and the database is ready within minutes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Integrating with an MCP client
&lt;/h3&gt;

&lt;p&gt;Once your Astra DB instance is ready, you can integrate it with an MCP client like Claude Desktop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure Claude Desktop -&lt;/strong&gt; Open the app, go to Preferences → Developer → Edit Config. This will take you to a JSON file. Paste the following JSON configuration snippet that includes your DB token and API endpoint.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Launch and verify -&lt;/strong&gt; Restart Claude Desktop and watch as it connects to Astra DB—instantly revealing 10 available MCP tools.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From here, you can ask Claude to do anything you like inside your database: create collections, insert data, clean up, and more. This is a handy way of interacting with your database via an AI assistant, but we can do more when we use Cursor as our MCP client.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a full, end-to-end application with a UI, database, and API
&lt;/h2&gt;

&lt;p&gt;The real magic happens when you use Astra DB over MCP in Cursor. To set this up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to Settings -&amp;gt; Cursor Settings -&amp;gt; MCP&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From there, you can add the server by clicking the "+ Add New MCP Server" button and entering the following values:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Name - Whatever you want&lt;/li&gt;
&lt;li&gt;Type - Command&lt;/li&gt;
&lt;li&gt;Command -
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;env ASTRA_DB_APPLICATION_TOKEN=your_astra_db_token ASTRA_DB_API_ENDPOINT=your_astra_db_endpoint npx -y @datastax/astra-db-mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once added, your editor will be fully connected to your Astra DB database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnd1zc2a77nbggkcrvmd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnd1zc2a77nbggkcrvmd.png" alt="an image showing your editor connected to your database." width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you can invoke the Cursor agent (by pressing Cmd+I on macOS) and ask it to build anything you want: whenever a database is needed, it will automatically operate Astra DB to do whatever is required.&lt;/p&gt;

&lt;p&gt;In our demo in the video above, the language model agent executes a series of tasks: from setting up the collection to auto-generating Next.js route handlers and fixing UI issues on the fly. The result? A fully functional to-do list app powered entirely by Astra DB over MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;Astra DB over MCP demonstrates the incredible potential of combining any tool with AI agents. By enabling agentic interactions between tools and language models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Developers can accelerate time to production without the overhead of boilerplate code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Non-technical users can create applications that are normally reserved for seasoned programmers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Innovation is democratized, letting you build everything from a Twitter clone to a YouTube replica with minimal effort.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;We’re excited to see what you’ll build using this new mode of development. Whether you’re a developer, a startup founder, or a tech enthusiast, Astra DB over MCP opens up a world of possibilities. So, what will you create? &lt;a href="https://discord.com/invite/datastax" rel="noopener noreferrer"&gt;Join the conversation on Discord&lt;/a&gt;, try out Astra DB over MCP, and let us know how you’re leveraging the power of agentic database interactions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQ)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. What is Astra DB over MCP?
&lt;/h3&gt;

&lt;p&gt;Astra DB over MCP is a new method of interacting with our flagship vector database, Astra DB, using the Model Context Protocol. It allows you to perform database operations through prompts with an AI agent—without writing any code.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. What is the Model Context Protocol (MCP)?
&lt;/h3&gt;

&lt;p&gt;MCP is an open standard, first pioneered by Anthropic in late 2024, that enables seamless communication between language models and external tools. It allows AI systems to share context and execute functions agentically on your behalf.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Do I need to write any code to interact with Astra DB over MCP?
&lt;/h3&gt;

&lt;p&gt;No! One of the key benefits of this new integration is that you can perform complex database operations—such as creating collections, inserting data, and building entire applications—without writing a single line of code. MCP clients like Claude Desktop, Cursor, etc. manage all the interactions for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. How do I get started with Astra DB over MCP?
&lt;/h3&gt;

&lt;p&gt;Simply &lt;a href="https://astra.datastax.com/signup?utm_medium=byline&amp;amp;utm_campaign=astra-db-for-ai-agents-mcp&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;sign up for Astra DB&lt;/a&gt;, create your database to receive an API endpoint and an application token, and then configure your MCP client by updating its settings with these credentials.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. What are some examples of MCP clients?
&lt;/h3&gt;

&lt;p&gt;Popular MCP clients include &lt;a href="https://claude.ai/download" rel="noopener noreferrer"&gt;Claude Desktop&lt;/a&gt;—a desktop application for interacting with AI models—and &lt;a href="https://www.cursor.com/" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;, an AI-enabled version of VS Code that integrates MCP tools directly into your development workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Is Astra DB over MCP an open-source project?
&lt;/h3&gt;

&lt;p&gt;Yes, AstraDB over MCP is an open-source project. You can &lt;a href="http://github.com/datastax/astra-db-mcp" rel="noopener noreferrer"&gt;access the code and contribute to its development via GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Where can I get help if I encounter issues?
&lt;/h3&gt;

&lt;p&gt;You can refer to our detailed documentation, check out the GitHub repository for troubleshooting tips, or &lt;a href="https://discord.com/invite/datastax" rel="noopener noreferrer"&gt;join our Discord community&lt;/a&gt; where fellow users and developers share advice and best practices.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>claude</category>
      <category>cursor</category>
    </item>
    <item>
      <title>Introducing Langflow.new: Frictionless AI</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Wed, 29 Jan 2025 17:15:56 +0000</pubDate>
      <link>https://dev.to/datastax/introducing-langflownew-frictionless-ai-42m4</link>
      <guid>https://dev.to/datastax/introducing-langflownew-frictionless-ai-42m4</guid>
      <description>&lt;p&gt;&lt;a href="https://www.datastax.com/products/langflow?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=introducing-langflow-frictionless-as&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; is DataStax’s flagship product for &lt;a href="https://www.youtube.com/watch?v=LuJ_FM1l1OA" rel="noopener noreferrer"&gt;building generative AI flows and agents&lt;/a&gt;. Today, we’re advancing the democratization of generative AI with our technical preview of &lt;a href="https://langflow.new/" rel="noopener noreferrer"&gt;Langflow.new&lt;/a&gt;: a fully open path to creating GenAI flows and agents for rapid prototyping and proofs of concept.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hqNik2yOCJI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can do with Langflow.new
&lt;/h2&gt;

&lt;p&gt;With Langflow.new, developers can immediately get started with Langflow and discover its value to build RAG pipelines, agentic flows, and more. When you land on the page, you’re immediately greeted with a basic AI agent flow. Let’s explore this in more detail: we see a series of blocks called components in Langflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedh9voaanix6la9m2uyi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedh9voaanix6la9m2uyi.png" alt="The default start screen of Langflow.new" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Specifically, we have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;strong&gt;URL&lt;/strong&gt; component that visits a URL and returns its content&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Calculator&lt;/strong&gt; component that serves as a function that effectively does math&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Chat Input&lt;/strong&gt; component that accepts a prompt from a user&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;Agent&lt;/strong&gt; component that accepts all other components as inputs&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;Chat Output&lt;/strong&gt; component that renders output from the Agent&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One important point about the URL and Calculator components here is that they are tools. Tools in the context of AI agents work very similarly to functions in programming, where the input parameters (called arguments) are generated and supplied by a language model, and their outputs (called return values) are returned to the language model.&lt;/p&gt;

&lt;p&gt;If we consider the Calculator component as a simple &lt;code&gt;calculate(num1, num2, operation)&lt;/code&gt; function that we expose to the agent, then the agent generates values for &lt;code&gt;num1, num2,&lt;/code&gt; and &lt;code&gt;operation&lt;/code&gt; based on the prompt from the user provided via the Chat Input. So if a user writes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Get me the sum of 3 and 7&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;then the LLM returns structured output that signals to the application (in this case, Langflow) to call the function &lt;code&gt;calculate&lt;/code&gt; with values &lt;code&gt;3&lt;/code&gt;, &lt;code&gt;7&lt;/code&gt;, and &lt;code&gt;sum&lt;/code&gt;, effectively calling &lt;code&gt;calculate(3, 7, “sum”)&lt;/code&gt;. This structured output could be similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "functionName": "calculate",
    "args": [3, 7, "sum"]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application (Langflow) then processes this structured output from the LLM to call the tool; it then sends its return value back to the language model to continue the flow.&lt;/p&gt;

&lt;p&gt;If we consider all of these tools working together when a user supplies a prompt like&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Convert 3425 USD to INR&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;then the language model will generate tool calls for each tool available like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[
    { "functionName": "getFromUrl", args: ["https://exchangerates.com/today?from=USD&amp;amp;to=INR"] },
    { "functionName: "calculator", args: [usdValue, inrValue, "multiply"] }
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From here, the application executes these functions with these inputs and yields its output to the language model. When there are no further tool calls and the language model returns only text, then the application returns this text to the user via the Chat Output component. Langflow is the glue (or runtime) between the Language Model, the tools, and the user’s prompts and outputs.&lt;/p&gt;

&lt;p&gt;With Langflow.new, you can experiment with any agentic flows and tools you wish, or get rid of them completely and create workflows that perform &lt;a href="https://www.youtube.com/watch?v=bQv0BaDbSDI" rel="noopener noreferrer"&gt;RAG&lt;/a&gt;, sentiment analysis, or whatever else you like.&lt;/p&gt;

&lt;p&gt;Once your flow is ready to go, you can download it and use it with any deployed Langflow instance: either hosted by DataStax as part of &lt;a href="https://langflow.datastax.com/?utm_medium=byline&amp;amp;utm_campaign=introducing-langflow-frictionless-ai&amp;amp;utm_source=devto" rel="noopener noreferrer"&gt;DataStax Langflow&lt;/a&gt;, the cloud offering, or &lt;a href="https://docs.langflow.org/get-started-installation" rel="noopener noreferrer"&gt;self-hosted&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspiration
&lt;/h2&gt;

&lt;p&gt;Taking &lt;a href="https://x.com/rauchg/status/1879976926233915468" rel="noopener noreferrer"&gt;cues from Guillermo Rauch&lt;/a&gt;, CEO and founder of &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;, we have opted to remove as much friction as possible between you, the users, and Langflow’s core resource: meaningful and useful GenAI flows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foitb9mmwh6rtxmq7rrj1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foitb9mmwh6rtxmq7rrj1.png" alt="A post from Vercel CEO Guillermo Rauch stating that common feedback he gives to founders is to remove friction between users and resources." width="800" height="474"&gt;&lt;/a&gt;With one less hurdle and increased access to a tool like Langflow, we’re excited to see what you come up with and where Langflow can best support the needs of your organization. Share your experiences, ideas, and stories with us on &lt;a href="https://x.com/datastaxdevs" rel="noopener noreferrer"&gt;𝕏&lt;/a&gt; or &lt;a href="https://dtsx.io/discord" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>langflow</category>
    </item>
    <item>
      <title>Biggest Lessons of 2024: Honor, Trauma, and People</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Tue, 31 Dec 2024 15:24:09 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/biggest-lessons-of-2024-honor-trauma-and-people-2een</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/biggest-lessons-of-2024-honor-trauma-and-people-2een</guid>
      <description>&lt;p&gt;It seems like just yesterday that we lit fireworks and popped champagne in our Berlin home surrounded by friends and family yet here we are one entire year later. 2024 was my best year yet. Let's unpack the top lessons I learned this year.&lt;/p&gt;

&lt;p&gt;Before we begin, I think it's worth emphasizing that learning is a consistent process and the best leaders tend to be the best learners, as indicated by this &lt;a href="https://www.harvardbusiness.org/leadership-learning-insights/2024-global-leadership-development-study/" rel="noopener noreferrer"&gt;2024 Harvard Business study&lt;/a&gt;. Every moment presents an opportunity to learn and when we invest the time to reflect and consider the lessons each season brings, it often tends to be among the highest yielding investments one can make. &lt;strong&gt;If we're not learning, we're not living.&lt;/strong&gt; With that, let's get into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 1: Honor All
&lt;/h2&gt;

&lt;p&gt;At the beginning of the year on January 7th, I heard my friend &lt;a href="https://www.instagram.com/daveschnitter/" rel="noopener noreferrer"&gt;Dave&lt;/a&gt; say something so profound. He decided he wanted to start the year talking about and carefully considering &lt;em&gt;love&lt;/em&gt; and what it means to truly love ourselves and those around us. In his exploration of the topic, he mentioned &lt;em&gt;"Love doesn't dishonor others"&lt;/em&gt; and then went on to explain it by example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you're kind to people but then gossip about them in their absence—even just to yourself—you dishonor them.&lt;/li&gt;
&lt;li&gt;When you look at a person who believes differently than you and consider them ignorant without even talking to them, you dishonor them. I've seen folks complain about &lt;em&gt;"those people who still wear masks! The pandemic is over! Come on!"&lt;/em&gt; I've heard people talk about their hatred of &lt;em&gt;"blue haired people"&lt;/em&gt;. I've watched people wish that &lt;a href="https://x.com/DramaAlert/status/1812943426947850278" rel="noopener noreferrer"&gt;the shooter didn't miss&lt;/a&gt;. All of this is dishonoring others and ultimately not loving.&lt;/li&gt;
&lt;li&gt;When you're contractually obligated to work ~40 hours a week and you do more or less, &lt;a href="https://dev.to/blog/coding-nights-weekends-good-work-life-balance#:~:text=you%E2%80%99ll%20inadvertently%20and%20(hopefully)%20unintentionally%20make%20the%20rest%20of%20your%20team%20look%20bad"&gt;you dishonor your teammates&lt;/a&gt;. Working overtime and being a 10x engineer sets unrealistic expectations and dishonors the good work your teammates are doing. Underworking raises the workload on others and also dishonors them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dave clearly illustrated how we tend to dishonor others and revealed to me my own flavor of dishonoring others which I wasn't even aware of. He then flipped the script and asked what honor might look like given that we now understand &lt;em&gt;dishonor&lt;/em&gt;. Like magic, I immediately became aware of a few things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Honoring others is a &lt;em&gt;verb&lt;/em&gt;:&lt;/strong&gt; we often talk about honor as a &lt;em&gt;value&lt;/em&gt; when we say "he has honor", "she is honorable", etc. and while it can be a value, it's also a &lt;em&gt;verb&lt;/em&gt;. It's something we do. It is a &lt;em&gt;deliberate choice&lt;/em&gt; to honor others. We can &lt;em&gt;do it&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honoring others is a &lt;em&gt;process&lt;/em&gt;:&lt;/strong&gt; I tend to believe most if not everything is a &lt;em&gt;process&lt;/em&gt; and not an &lt;em&gt;event&lt;/em&gt;. Things don't happen, but are constantly happening. We don't just breathe, we are breathing. Our cells don't divide, they are dividing. Things are processes, not events. If this is true, then honoring others is a &lt;em&gt;process&lt;/em&gt; and not an &lt;em&gt;event&lt;/em&gt;: I'm not going to honor you once, but it's a process and a lifestyle composed of multiple deliberate and intentional choices over a lifetime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honoring others is &lt;em&gt;context-dependent&lt;/em&gt;:&lt;/strong&gt; my best friend &lt;a href="https://twitter.com/jithinbas" rel="noopener noreferrer"&gt;JB&lt;/a&gt; and I grew up together. We met at age 5 and today, we live in the same city and meet each other somewhat regularly. Honoring him in the context of our friendship means we make dumb teenager jokes about each other's moms and talk nonsense. Funnily enough our moms are never &lt;em&gt;actually&lt;/em&gt; dishonored because we both mutually understand there is no disrespect intended, just young (now, slightly older) fools being fools. This is the context we grew up in and being &lt;em&gt;"familiar"&lt;/em&gt; in our shared historical context honors it and each other because we &lt;em&gt;"speak the same language"&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I sometimes go to the gym with other friends. In the locker room, honoring them might mean I whip their ass with a towel (or they whip mine) and we talk shit and laugh. I work at &lt;a href="https://www.datastax.com/blog/introducing-tejas-kumar-developer-relations-engineer" rel="noopener noreferrer"&gt;DataStax&lt;/a&gt; with a delightful team. Honoring them means I communicate clearly, have ideas, unblock and support where I can, and ship code and content at the highest quality I can. Honor is context-dependent and not one size fits all. Honoring context has shown very positive outcomes towards building unity, camaraderie, and togetherness.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftej.as%2F_astro%2Fehrlich-berlin.B-qwEhWg_21IrLr.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Ftej.as%2F_astro%2Fehrlich-berlin.B-qwEhWg_21IrLr.webp" alt="A bunch of developers in Berlin in front of the Brandenburg Gate" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few weeks ago, &lt;a href="https://x.com/ccccjjjjeeee" rel="noopener noreferrer"&gt;Christopher Ehrlich&lt;/a&gt;, &lt;a href="https://x.com/willklein_" rel="noopener noreferrer"&gt;Will Klein&lt;/a&gt; and I walked around Berlin talking about random topics, laughing, and sightseeing honoring the context we found ourselves in and it was a truly unforgettable experience. When we stopped by the &lt;a href="https://www.visitberlin.de/en/memorial-murdered-jews-europe" rel="noopener noreferrer"&gt;Berlin memorial to the murdered Jews of World War II&lt;/a&gt;, we honored that context with silence and reverence too.&lt;/p&gt;

&lt;p&gt;Learning to flexibly honor as many people and contexts as I can as consistently as I can has been extremely fulfilling and has &lt;strong&gt;severely&lt;/strong&gt; improved my quality of life. This is by far the biggest lesson I've learned this year, and honoring people and contexts the most significant skill I've cultivated with marvelous help.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Honor others
&lt;/h3&gt;

&lt;p&gt;I can say with full confidence that this has positively impacted every part of my life and those around me: I am a much better friend, coworker, and family member as reported by people in those groups relative to me. I am also kinder to myself, honoring my mind, body, and spirit as often as I can by being mindful of what I consume and what I produce. If you'd like to try and cultivate this skill in 2025, the main driver that worked for me was &lt;strong&gt;intentionality:&lt;/strong&gt; I firmly placed showing honor to others at the top of my mind since January 7th. I made a point to honor others (and contexts) as often as I could. What does this mean practically? When I communicate, &lt;strong&gt;I communicate with a &lt;em&gt;person&lt;/em&gt;, not an &lt;em&gt;avatar&lt;/em&gt;&lt;/strong&gt;. &lt;a href="https://x.com/TejasKumar_/status/1747176544433230198" rel="noopener noreferrer"&gt;I don't respond to pull requests with "LGTM".&lt;/a&gt; I don't half-ass greetings and send low-effort interactions like &lt;em&gt;"gm"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Prompted by my intention to show honor, I've spent most of the year &lt;em&gt;actually communicating with intent&lt;/em&gt; no matter the medium: sentences, not words, often padded with greetings and salutations to indicate that the person on the other side matters to me. After almost an entire year doing this, I've noticed that we're losing the humanity around communication in our culture today: when I intentionally honor people in communication, they end up being pleasantly surprised (that I care about them) and remark how refreshing it is. Being mindful of the actual human being I'm interacting with, and the context in which I'm interacting with them, has definitely set apart these interactions and made them orders of magnitude more impactful and meaningful to the point where people legitimately thank me and tell me they feel like "this was so special" when all I did was care. This slightly bothers me because this should not be an exception but instead be the rule.&lt;/p&gt;

&lt;p&gt;I hate to seem like an angry old man shaking my fist at the world, but it legitimately seems like most of us are severely broke when it comes to paying attention. When I deliberately made the choice to be intentional with showing honor to people, everything else fell into place. This is also backed by research from Gollwitzer and Brandstatter in this &lt;a href="https://kops.uni-konstanz.de/server/api/core/bitstreams/14cc2a36-5f01-4dc1-b9ca-f2d0ca0c8930/content" rel="noopener noreferrer"&gt;1997 paper&lt;/a&gt; that shows that literally just setting an intention makes the goal more attainable.&lt;/p&gt;

&lt;h3&gt;
  
  
  When Honor is too Hard
&lt;/h3&gt;

&lt;p&gt;Of course, sometimes we encounter people and/or contexts that seem impossible: people with whom we fundamentally disagree on many deep levels. How might we honor them? I found myself working with such a client while trying to intentionally honor others. Most interactions required extraordinary amounts of effort to process and then respond honorably. There was constant second guessing and making sure I was treating them with honor. There was a lot of &lt;em&gt;"am I the asshole?"&lt;/em&gt;. The floor was eggshells. Can you relate? Perhaps there are people who have wronged you, cheated you, or betrayed you. If not, perhaps there are those who only communicate indirectly and you never truly know where you stand. The thought of honoring them might seem absolutely ridiculous to you and it very well might be.&lt;/p&gt;

&lt;p&gt;In my particular situation, I found that the best course of action was to leave. To honor them was to say "we don't see eye to eye, and I cannot sustainably continue in this relationship [because it's far too taxing to do so honorably]" and suggest going our separate ways. Ironically, this was the one thing both sides agreed to in a long while and we honorably parted ways. Ultimately, it is my belief that &lt;a href="https://tej.as/blog/how-to-grow-professional-relationships-tjs-model#:~:text=Ultimately%2C%20human%20beings%20are%20more%20or%20less%20big%20bundles%20of%20chemicals%20with%20legs." rel="noopener noreferrer"&gt;we're really just bags of chemicals walking around and when we meet other chemicals, there's a reaction: sometimes positive, sometimes negative&lt;/a&gt;. This is no one's fault, so we do the best we can and sometimes we have to leave. Months later, we still talk once in a while and maintain a mutual respect for each other while having no intention of working together again. This brings up an important distinction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honor vs. Respect
&lt;/h3&gt;

&lt;p&gt;I've spent months thinking about this: aren't honor and respect the same thing? Two sides of the same coin? While I still don't know, I think they aren't. If we consider them as verbs, &lt;em&gt;honor&lt;/em&gt; is as described above but respect as a verb seems different? To respect someone to me seems to be to acknowledge their value and worth, which can also be done without interaction and from a distance. To honor them is to &lt;em&gt;do something&lt;/em&gt; to/for them that demonstrates this respect &lt;em&gt;and more&lt;/em&gt;. Honor seems like respect++. This likely deserves more thought and maybe a discussion (&lt;a href="https://x.com/intent/post?text=I%20don't%20know%20about%20that%20one%2C%20%40tejaskumar_!%20I%20think%20respect%2Fhonor%20is%3A%20" rel="noopener noreferrer"&gt;let me know what you think on 𝕏&lt;/a&gt;), but I'm comfortable with this distinction: honor is active, respect is passive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 2: You Can Just Do Things
&lt;/h2&gt;

&lt;p&gt;I've been building on the web for over 20 years at places like &lt;a href="https://www.spotify.com/us/" rel="noopener noreferrer"&gt;Spotify&lt;/a&gt;, &lt;a href="https://xata.io/" rel="noopener noreferrer"&gt;Xata&lt;/a&gt;, &lt;a href="https://vercel.com/" rel="noopener noreferrer"&gt;Vercel&lt;/a&gt;, and more. Over this time, I've come to believe that my technical skills are at a place where I can build whatever I want whenever I want. I am extremely comfortable with all parts of the software stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;for user interface (UI) work, I'm intimately familiar with JavaScript/TypeScript and popular UI frameworks&lt;/li&gt;
&lt;li&gt;for web API work, I'm more than comfortable with Node.js and Rust&lt;/li&gt;
&lt;li&gt;for database work, I've worked at Xata and deeply understand relational and non-relational models and when to use what&lt;/li&gt;
&lt;li&gt;for reliability, part of my role at Spotify was deploying a &lt;a href="https://support.atlassian.com/jira-service-management-cloud/docs/what-are-service-tiers/" rel="noopener noreferrer"&gt;tier 1 service&lt;/a&gt; with regional failover and redundancy&lt;/li&gt;
&lt;li&gt;to deploy and scale it all with devops, I'm confident in my abilities with Docker and today operate my own self-provisioned bare-metal Kubernetes cluster on &lt;a href="https://www.hetzner.com/" rel="noopener noreferrer"&gt;Hetzner&lt;/a&gt; with all the controllers, TLS termination and more with a fair amount of ease&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am not trying to flex, but the truth is that none of this is particularly challenging to me. Still, I haven't really built or shipped anything outside of a job despite being able to do so. I've done quite a bit of yapping about building things sporadically, but when it came time to put finger to key I often backed away. Why? My go-to answer/excuse was "it's so easy it's boring". While that's true, it wasn't the full story.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fear of Failure
&lt;/h3&gt;

&lt;p&gt;Do you know people like this? People who—all they do is yap but don't actually do the thing? I know quite a few and I myself could be one if I'm not careful (if I don't &lt;em&gt;intentionally&lt;/em&gt; avoid it). In fact, until this year, I was one! In a deep-dive discussion about this with &lt;a href="https://de.linkedin.com/in/lea-artemov-839107239?trk=public_profile_browsemap" rel="noopener noreferrer"&gt;my wife&lt;/a&gt;, she mentioned a Reddit thread where folks sounded similar: they wanted to be farmers but kept coming up with excuses and reasons not to.&lt;/p&gt;

&lt;p&gt;Ultimately, people in the comments called them out on it and mentioned that no matter how much their excuses get refuted, they still find a way to come up with another one because &lt;strong&gt;to them, the anticipated/predicted pain of going through with it and failing is greater than the pain of doing nothing&lt;/strong&gt;. While it makes sense that we want to avoid pain, I think we have enough &lt;a href="https://www.anderson.ucla.edu/faculty/keith.chen/negot.%20papers/GilovichMedvec_Regret95.pdf" rel="noopener noreferrer"&gt;data&lt;/a&gt; to know that this is just categorically false: the pain of not trying (regret) is far worse over time than trying and failing. This insight around the fear of failure was incredible because it very clearly described my own behavior. To fully understand this, we need to dig a little deeper into my past.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Pain of Failure
&lt;/h3&gt;

&lt;p&gt;One of first ever websites that I made was published in a magazine when I was 11 years old. 3 years later, I used to heavily enjoy online discussion forums about various topics: games, software, etc. I particularly remember enjoying making cool signature art. Inspired by how useful software forum solutions like &lt;a href="https://www.vbulletin.com/" rel="noopener noreferrer"&gt;vBulletin&lt;/a&gt;, &lt;a href="https://www.phpbb.com/" rel="noopener noreferrer"&gt;phpBB&lt;/a&gt;, and &lt;a href="https://mybb.com/" rel="noopener noreferrer"&gt;MyBB&lt;/a&gt; were, and the advent of Web 2.0 and interactive in-place editing with &lt;a href="https://www.computerweekly.com/de/definition/Asynchronous-JavaScript-and-XML-AJAX" rel="noopener noreferrer"&gt;AJAX&lt;/a&gt;, I set out to build my own forum software reimagined for Web 2.0 with AJAX as a first-class citizen: sort of like &lt;a href="https://en.wikipedia.org/wiki/Single-page_application" rel="noopener noreferrer"&gt;SPAs&lt;/a&gt; but for forum software before even &lt;a href="https://jquery.com/" rel="noopener noreferrer"&gt;jQuery&lt;/a&gt;. So, I built it (with &lt;a href="http://script.aculo.us/" rel="noopener noreferrer"&gt;Scriptaculous&lt;/a&gt; and &lt;a href="https://mootools.net/" rel="noopener noreferrer"&gt;MooTools&lt;/a&gt; if you're interested).&lt;/p&gt;

&lt;p&gt;While building it (as good as a 14 year old could), I fell in love with it. The more code I wrote, the more I enjoyed the process. The more I saw it come to life, the more hyped I got. I eventually made this hype contagious and shared it &lt;a href="https://www.theadminzone.com/threads/new-forum-software-on-the-block-radiantboard-coming-soon.37372/" rel="noopener noreferrer"&gt;widely on the internet&lt;/a&gt;. I created a countdown timer and had hundreds of people (literally around 300 at peak time) watching it tick down to the launch.&lt;/p&gt;

&lt;p&gt;On it went,&lt;/p&gt;

&lt;p&gt;00:03&lt;/p&gt;

&lt;p&gt;00:02&lt;/p&gt;

&lt;p&gt;00:01&lt;/p&gt;

&lt;p&gt;...boom. It crashed. &lt;a href="https://www.theadminzone.com/threads/new-forum-software-on-the-block-radiantboard-coming-soon.37372/post-266588" rel="noopener noreferrer"&gt;The server literally crashed.&lt;/a&gt; No Kubernetes, no replacement replicas, no failover, just a straight up &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503" rel="noopener noreferrer"&gt;&lt;code&gt;HTTP 503&lt;/code&gt;&lt;/a&gt; followed by ultimate rejection to resolve DNS and eventually, rejection from the community. I failed. And it hurt. A lot. It was a real &lt;a href="https://youtu.be/knBU0nXsxf4?si=lW8HroTLKpRDUzjr&amp;amp;t=3808" rel="noopener noreferrer"&gt;gut punch&lt;/a&gt;. You'd think I'd have been used to pain &lt;a href="https://www.youtube.com/live/B8e1r2L7iq8?si=rXISl_m5cYKKIu_-&amp;amp;t=3052" rel="noopener noreferrer"&gt;given my childhood&lt;/a&gt; but this was different because it wasn't physical pain, it was &lt;em&gt;social pain&lt;/em&gt;; compounded by the crumbling of my self-image: I thought I was good at this. Literally everyone around me said I was. &lt;em&gt;The magazines&lt;/em&gt; said I was! Am I really nothing? Is what I made actually useless?&lt;/p&gt;

&lt;p&gt;Fast forward 17 years and while there's little doubt that my skills and competencies have grown, the wound is still there. I've been afraid to fail ever since. And so sure, I could build anything I want, but ultimately I've just built a long list of excuses.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overcoming Trauma; Toward Healing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://drpaulconti.com/" rel="noopener noreferrer"&gt;Dr. Paul Conti&lt;/a&gt;, trained at Stanford University and having served on the faculty of Harvard Medical School before opening his own clinic, defines trauma as a loss of control: you're not in the driver's seat—your agency is robbed from you and you're controlled by external forces.&lt;/p&gt;

&lt;p&gt;This was me.&lt;/p&gt;

&lt;p&gt;The solution then is to take back agency, but how might one reclaim their agency unless they know it's been taken from them? We often live in cages that we don't see. My wife, this Reddit thread, the yappers, all joined together to show me my own cage and once I saw it, it immediately lost its power; exactly as described by the great psychologist &lt;a href="https://en.wikipedia.org/wiki/Carl_Jung" rel="noopener noreferrer"&gt;Dr. Carl Jung&lt;/a&gt;, who emphasized that evil's power operates primarily through our psychological blind spots. When we become conscious of the darkness within ourselves, we gain the ability to transform it.&lt;/p&gt;

&lt;p&gt;I can say that in 2024, this prevalent trauma for the last 17 years has finally healed through:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Becoming aware of my cage&lt;/li&gt;
&lt;li&gt;Recognizing that the cage is a lie: significant growth has happened since&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Intentionally&lt;/em&gt; making the effort to break it down&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I wonder if this is relatable at all and if you've got your own cage. Maybe one you don't see? &lt;a href="https://x.com/intent/post?text=OMG%20I%20just%20discovered%20my%20cage%2C%20%40tejaskumar_!%20%5B...%5D" rel="noopener noreferrer"&gt;Let me know on 𝕏&lt;/a&gt;. In any case, now that the cage is broken and I'm free to build whatever I want, I've thoroughly enjoyed building so many things that bring me joy happily, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the &lt;a href="https://tej.as/blog" rel="noopener noreferrer"&gt;blog portion of this website&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I've written some &lt;a href="https://tej.as/blog/how-to-grow-professional-relationships-tjs-model" rel="noopener noreferrer"&gt;wonderful&lt;/a&gt; &lt;a href="https://tej.as/blog/coding-nights-weekends-good-work-life-balance" rel="noopener noreferrer"&gt;articles&lt;/a&gt; that I enjoy recently&lt;/li&gt;
&lt;li&gt;I made a &lt;a href="https://www.datastax.com/blog/building-unreel-ai-movie-quiz" rel="noopener noreferrer"&gt;game: an AI-first multiplayer movie quiz called UnReel&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;I've been working nights and weekends outside of normal operational employment hours on a &lt;a href="https://topfu.co" rel="noopener noreferrer"&gt;marketing SaaS product&lt;/a&gt; that I'll likely launch in 2025 &lt;em&gt;if&lt;/em&gt; I can safely do so considering legal matters and Intellectual Property (IP) clauses with my employer. When we clear this, it'd be fun to launch it and see where it goes. I'm already talking to HR about it and I'm sure we'll figure something out. I've already shown this to &lt;a href="https://x.com/jamesqquick" rel="noopener noreferrer"&gt;friends&lt;/a&gt; and family and folks are often blown away and excited to use it. It's definitely a good sign.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course this time, I probably won't build it in isolation and then overhype it but instead invite people I respect to give me feedback and slowly onboard the first 100 users, listening to feedback and iterating along the way before a bigger launch, learning from the &lt;a href="https://www.theadminzone.com/threads/new-forum-software-on-the-block-radiantboard-coming-soon.37372/" rel="noopener noreferrer"&gt;earlier RadiantBoard debacle&lt;/a&gt;. The very fact that I'm doing this at all is evidence of healed trauma and a lack of fear failure. 2025 will be a good year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lesson 3: People are the Thing
&lt;/h2&gt;

&lt;p&gt;Last but finally not least is a lesson I knew, but one I continue learning anew: meaningless, meaningless; &lt;em&gt;everything under the sun is meaningless&lt;/em&gt;. I spent some time in SF this year and, respectfully, the zeitgeist smells of bullshit: there were a non-trivial number of conversations about "agents" and related topics where each person had a different context and working definition than the next, a vastly different experience level than the next, but the hype and confidence levels were equal.&lt;/p&gt;

&lt;p&gt;One person described an agent as a &lt;a href="https://openai.com/index/introducing-gpts/" rel="noopener noreferrer"&gt;custom GPT&lt;/a&gt;: it doesn't use tools, it doesn't model reasoning, it just has a knowledge base against which it can perform &lt;a href="https://youtu.be/uiZ6dwmVtYU?si=v0Xk1oJWYQba3GIm&amp;amp;t=813" rel="noopener noreferrer"&gt;RAG&lt;/a&gt; which is—to this person—an agentic action. It smells like bullshit. Just like the &lt;a href="https://www.rabbit.tech/" rel="noopener noreferrer"&gt;Rabbit R1&lt;/a&gt;, the &lt;a href="https://humane.com/" rel="noopener noreferrer"&gt;Humane pin&lt;/a&gt;, &lt;a href="https://www.makeuseof.com/why-i-find-apple-intelligence-underwhelming/" rel="noopener noreferrer"&gt;Apple Intelligence&lt;/a&gt;, and so many cases of &lt;em&gt;overpromise and underdeliver&lt;/em&gt;. I think the hype cycle is bullshit. I think tech bro posturing with esoteric language to appeal to VCs is bullshit. I think the grind is bullshit. There's just so much bullshit under the sun.&lt;/p&gt;

&lt;p&gt;Let's reconsider from first principles. To quote the great &lt;a href="https://en.wikipedia.org/wiki/Carl_Sagan" rel="noopener noreferrer"&gt;Carl Sagan&lt;/a&gt; about the &lt;a href="https://en.wikipedia.org/wiki/Pale_Blue_Dot" rel="noopener noreferrer"&gt;Pale Blue Dot&lt;/a&gt;, take a look at this picture for a few uninterrupted, quiet, reverent seconds:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65li4o55q6kp8wcmlgx0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65li4o55q6kp8wcmlgx0.jpg" alt="Pale Blue Dot" width="800" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, read his words:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Look again at that dot. That's here. That's home. That's us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, thousands of confident religions, ideologies, and economic doctrines, every hunter and forager, every hero and coward, every creator and destroyer of civilization, every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, every teacher of morals, every corrupt politician, every "superstar," every "supreme leader," every saint and sinner in the history of our species lived there--on a mote of dust suspended in a sunbeam.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Look at it again and think about that for a moment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65li4o55q6kp8wcmlgx0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65li4o55q6kp8wcmlgx0.jpg" alt="Pale Blue Dot" width="800" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now bring it back to the AI hype cycle and &lt;a href="https://x.com/intent/post?text=Nah%20%40tejaskumar_%20you're%20wrong%2C%20everything%20matters%20a%20lot" rel="noopener noreferrer"&gt;tell me you have the same perspective as before&lt;/a&gt;. I bet something changed. Don't get me wrong: AI is great, tech is great, ambition is wonderful, builders move the world forward. This is all well and good, but ultimately, we have to ask: &lt;a href="https://youtu.be/LL4mwJAt0i4?si=5ltTkr-i5kFyXsrt&amp;amp;t=1738" rel="noopener noreferrer"&gt;who are we doing it for? Is the dog wagging the tail or is the tail wagging the dog?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My favorite study is &lt;a href="https://www.longevity-project.com/stanford-center-on-longevity" rel="noopener noreferrer"&gt;the Longevity Project&lt;/a&gt; from Stanford University: a &lt;strong&gt;groundbreaking eight-decade research study&lt;/strong&gt; that began in 1921 when Stanford Professor Lewis Terman started tracking 1500 children to understand the factors that lead to a long and healthy life. 80 years later, the findings were that healthy relationships were the strongest predictor for longevity, and that their quality, not quantity, were the most weighted.&lt;/p&gt;

&lt;p&gt;To reinforce this fact, they also discovered that children whose parents divorced during childhood generally had shorter lifespans. TL;DR? &lt;strong&gt;People are the thing.&lt;/strong&gt; There's no real reason to participate in any Silicon Valley-style rat race and grind like a sigma giga Chad at the cost of human beings, relationships, and human flourishing. We do what we do for a purpose above the sun, because everything under the sun is meaningless.&lt;/p&gt;

&lt;p&gt;There's a similar study from palliative care nurse &lt;a href="https://bronnieware.com/blog/regrets-of-the-dying/" rel="noopener noreferrer"&gt;Bronnie Ware&lt;/a&gt; conducted between 2009 and 2012 who documented the most common regret among dying patients. The results?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People regretted not staying in touch with friends&lt;/li&gt;
&lt;li&gt;Many had let valuable friendships slip away over years due to busy lifestyles&lt;/li&gt;
&lt;li&gt;By the final weeks, only love and relationships remained significant&lt;/li&gt;
&lt;li&gt;Men consistently regretted working too hard and missing their children's youth&lt;/li&gt;
&lt;li&gt;They lamented missing companionship with their partners&lt;/li&gt;
&lt;li&gt;Physical details and material concerns fell away (no one was talking about AI agents)&lt;/li&gt;
&lt;li&gt;Financial matters became secondary, mainly addressed for loved ones' benefit&lt;/li&gt;
&lt;li&gt;The only things that truly mattered in the end were love and relationships&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Death is a humbling experience. It makes you question what you want out of your time here. I grew up constantly questioning this and I still do sometimes. All of what I do is almost always exclusively for people. Nothing else. People are the thing. Human beings are &lt;em&gt;it&lt;/em&gt;. Life on planet Earth and whatever other planet we may move to is a gift, and we only get it for as long as we get it. What are we doing with it in 2025?&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/d7bgMUykvsE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>yearinreview</category>
      <category>learning</category>
    </item>
    <item>
      <title>It's Okay to Code on Nights and Weekends</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Sun, 22 Dec 2024 20:34:18 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/its-okay-to-code-on-nights-and-weekends-2m5d</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/its-okay-to-code-on-nights-and-weekends-2m5d</guid>
      <description>&lt;p&gt;I’ve been wrestling with this for a long time (my entire life): I love coding and building software. A lot. I &lt;a href="https://www.youtube.com/live/B8e1r2L7iq8?si=CCTyvmnwlr3VKsav&amp;amp;start=3408" rel="noopener noreferrer"&gt;started when I was 8 years old&lt;/a&gt;. My nervous system developed wrapped around a computer.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/zOKCrgQOiME?start=12"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I hear a lot of &lt;em&gt;“have work/life balance”&lt;/em&gt; and &lt;em&gt;“touch grass”&lt;/em&gt; and while this is &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC10838459/" rel="noopener noreferrer"&gt;actually sound&lt;/a&gt;, &lt;strong&gt;coding is not work for me&lt;/strong&gt;: it brings me so much joy, meaning, and purpose that few other things even come close to and really only one other thing vastly exceeds.&lt;/p&gt;

&lt;p&gt;I code on the weekends and at night because I derive a lot of joy from it. It’s my greatest hobby and I have the privilege of it also being a significant portion of &lt;a href="https://www.datastax.com/blog/introducing-tejas-kumar-developer-relations-engineer" rel="noopener noreferrer"&gt;my job&lt;/a&gt;. I see nothing wrong with that and definitely don’t expect others to be the same, but to me this is not “wrong”. It’s just a chill dude who loves his craft.&lt;/p&gt;

&lt;p&gt;For years, I’ve tried to avoid my beloved hobby on the weekends because of self-doubt that others amplified: &lt;em&gt;“the weekend is for relaxing!! And family!!”&lt;/em&gt;—but aren’t hobbies a wonderful creative relaxing escape? Not sure how others do it, but my closest family and friends enjoy their hobbies (baking, climbing, etc.) on the weekend—sometimes with others, sometimes alone to recover. Why should a hobby that happens to be a part of my job be different?&lt;/p&gt;

&lt;p&gt;While trying to live by other folks’ rules and avoid coding on the weekends, I often found myself doing similar things: playing puzzle games, getting deeply invested in other logic-oriented tasks that also have a creative element... it was the same neural circuitry as coding but not &lt;em&gt;actually coding&lt;/em&gt;. I really was just coding (in a sense) but fooling myself and others that this specific logical game that gets all my attention was somehow different.&lt;/p&gt;

&lt;p&gt;My brain works the way it works and loves what it loves. There is no divorcing me from something so foundational that I started as a child.&lt;/p&gt;

&lt;p&gt;And so finally, the best conclusion I can come to today is this: &lt;strong&gt;doing what one loves and gives them purpose is never really a problem.&lt;/strong&gt; In fact, it’s a gift! There are so many people out there looking for that thing who haven’t yet found it and my heart genuinely goes out to them. I wish they are able to feel a fraction of the joy I feel in this wonderful hobby of mine as regularly as I feel it.&lt;/p&gt;

&lt;p&gt;So… when does it become problematic?&lt;/p&gt;

&lt;h2&gt;
  
  
  It Becomes Problematic when it Becomes a god
&lt;/h2&gt;

&lt;p&gt;I think this is a question of worship. We don’t talk a lot about that in highly intellectual and logical secular STEM, but if I look around, it’s quite clear to me that there’s a lot of worship around: where we devote ourselves to ideas, things, people, or ourselves; where one thing and our devotion to it eclipses other things including rest, relaxation, restoration, and relationships with family and friends.&lt;/p&gt;

&lt;p&gt;This is the line that ought not be crossed: if I worship my hobby and offer myself up to it like a living sacrifice, me and everything and everyone around me crumbles. I place a weight on it (and myself) that neither party can bear. In plain language, &lt;em&gt;“too much of a good thing becomes a bad thing when it becomes a god thing”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This is validated in this &lt;a href="https://www.nature.com/articles/s41598-024-77226-8" rel="noopener noreferrer"&gt;October 2024 research article from Nature&lt;/a&gt; that found that sports work among school students had a bell-shaped curve where there was a peak in cognition at about an hour of physical work per day, but a steep decline after 2 hours. We're likely all not school students doing sports, but the &lt;a href="https://en.wikipedia.org/wiki/Conservation_of_energy" rel="noopener noreferrer"&gt;law of conservation of energy&lt;/a&gt; represented here stands: if we give most/all of ourselves to topic A (in this case sports), then other topics will suffer. There's no two ways about this. We cannot (yet?) negotiate with the laws of thermodynamics.&lt;/p&gt;

&lt;p&gt;So, how do we prevent things from becoming gods? &lt;a href="https://pmc.ncbi.nlm.nih.gov/articles/PMC2863117/" rel="noopener noreferrer"&gt;Science&lt;/a&gt; tells us that the best way is to maintain multiple sources of meaning and engagement rather than intense focus in any single domain for extended periods of time. This involves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regular assessment for signs of imbalance like neglect of relationships or decreased life satisfaction&lt;/li&gt;
&lt;li&gt;Maintaining both individual pursuits and social connections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The key is cultivating what researchers call &lt;strong&gt;"psychological richness"&lt;/strong&gt;: having variety in experiences and perspectives rather than intense focus on any single pursuit for &lt;em&gt;too long&lt;/em&gt;: all our endeavors have an expiration time, or if you speak engineering, a &lt;a href="https://www.cloudflare.com/learning/cdn/glossary/time-to-live-ttl/#:~:text=What%20is%20time%2Dto%2Dlive%20(TTL)%20in%20networking,CDN%20caching%20and%20DNS%20caching." rel="noopener noreferrer"&gt;&lt;em&gt;TTL&lt;/em&gt;&lt;/a&gt;. In the case of the kids doing sports, it was about 2 hours. For us, we might spend all day, night, and weekend coding, but at some point we &lt;em&gt;will hit a wall&lt;/em&gt;. I know I do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95firgndhj1ffvuytf2o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95firgndhj1ffvuytf2o.png" alt="Psychological Richness expressed as a meme" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When I hit a wall, instead of becoming frustrated at myself or my equipment, I've learned to recognize that this is time for some psychological richness: I'll message my friends and family and see how they're doing, which will usually result in sharing a meal together and enjoying them. After an interaction like this, I realize I've completely forgotten about the thing that was irritating me as I hit my wall. I then go back to it and fix whatever issue I had within 15 minutes and not a lot of effort. I bet this experience I'm sharing is not unique to me given that I hear it constantly from other software engineers. &lt;a href="https://x.com/intent/post?text=The%20part%20about%20psychological%20richness%20from%20https://tej.as/blog/coding-nights-weekends-good-work-life-balance%20was%20totally%20relatable,%20@tejaskumar_!" rel="noopener noreferrer"&gt;Let me know if this is relatable at all on 𝕏&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  It Becomes Problematic when We Expect it of Others
&lt;/h2&gt;

&lt;p&gt;What works for us may not work for everyone. I realize that not everyone started coding at age 8 and likely has other interests. Good for them! Some developers find fulfillment in completely disconnecting from code outside work hours, while others might prefer to blend their passion across their entire schedule. Neither approach is inherently superior; they simply reflect different personalities and life circumstances.&lt;/p&gt;

&lt;p&gt;Pushing our own work patterns onto colleagues can create toxic environments where people feel pressured to match unrealistic expectations. This is especially problematic for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Junior developers still finding their path&lt;/li&gt;
&lt;li&gt;Parents and caregivers juggling multiple responsibilities&lt;/li&gt;
&lt;li&gt;Those who need clear boundaries between work and personal time&lt;/li&gt;
&lt;li&gt;People who find meaning and joy in other pursuits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is also exactly why doing &lt;em&gt;work&lt;/em&gt; work outside of work is not ideal: you'll inadvertently and (hopefully) unintentionally make the rest of your team look bad, while simulatenously getting annoyed that the others aren't doing as much as you. You'll also likely get your head puffed up with &lt;em&gt;"wow, I'm so great! Look at all I'm accomplishing!"&lt;/em&gt; and become a real nuisance to most everyone around you. I've fallen into this pattern before when I worked at &lt;a href="https://g2i.co" rel="noopener noreferrer"&gt;G2i&lt;/a&gt; and the outcome was not positive: most of the engineering org quit and mentioned it was because they couldn't work with me in their exit interview.&lt;/p&gt;

&lt;p&gt;Instead of going down that path, if it's truly the craft of coding alone that we enjoy, then we recognize that there are other applications of the craft outside of the work domain—like that side project you started but never finished. Maybe actually do something with all of those domains you keep paying for.&lt;/p&gt;

&lt;p&gt;One of the top reasons for all the things we hate in the world is &lt;a href="https://direct.mit.edu/ngtn/article/38/3/435/121229/Worldviews-in-Conflict-Negotiating-to-Bridge-the" rel="noopener noreferrer"&gt;folks imposing their modus operandi on others&lt;/a&gt;. Perhaps we'd all be better off if instead of &lt;em&gt;imposing&lt;/em&gt;, we stick to &lt;em&gt;proposing&lt;/em&gt; ideas and letting our peers do whatever works for them and figure it out along the way. This too is backed by science, specifically this &lt;a href="https://journals.sagepub.com/doi/10.1111/j.1529-1006.2006.00030.x" rel="noopener noreferrer"&gt;research paper that examines over 50 years of findings on team effectiveness&lt;/a&gt; and provides insights into how teams can be made more effective. Unsurprisingly, one of the main findings is that teams achieve greater effectiveness and stronger collective climate when team members collectively develop and agree upon frameworks, rather than having them imposed by individuals.&lt;/p&gt;

&lt;p&gt;What does all this mean for us practically? &lt;strong&gt;Just let people be.&lt;/strong&gt; If you like coding on nights and weekends, great. Do it. If others don't and it works for them, awesome. Good for them. There's no need for everyone to follow one specific way that works for one specific people group with some common attributes. In fact, there's beauty in the diversity.&lt;/p&gt;

&lt;h2&gt;
  
  
  It Becomes Problematic when Others Expect it of Us
&lt;/h2&gt;

&lt;p&gt;I've been in situations where &lt;strong&gt;when you repeatedly exceed expectations, then the expectations rise to where what was once considered exceeding them is now just meeting them.&lt;/strong&gt; When this happens, any average level of output due to any reason: fatigue, other priorities, new hobbies, is suddenly below average and this reflects poorly on your performance review despite you still performing on an average level at worst. As my coach &lt;a href="https://x.com/crtr0" rel="noopener noreferrer"&gt;Carter&lt;/a&gt; says, &lt;em&gt;"the prize for winning the cake eating contest is more cake"&lt;/em&gt;. Expectation management is extremely critical here.&lt;/p&gt;

&lt;p&gt;If this goes wrong the outcomes can be drastic, resulting in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implicit pressure to work nights and weekends&lt;/li&gt;
&lt;li&gt;Using enthusiastic developers as benchmarks for team productivity&lt;/li&gt;
&lt;li&gt;Celebrating unhealthy work patterns as badges of honor&lt;/li&gt;
&lt;li&gt;Conflating personal coding projects with work obligations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To prevent this, we must proactively manage expectations through clear communication and realistic goal-setting. This alone will be exceptional, because &lt;a href="https://www.ckju.net/en/blog/why-managing-expectations-essential-management-and-practical-ways-how-do/112977" rel="noopener noreferrer"&gt;expectations are rarely addressed proactively&lt;/a&gt;, not even by most leaders, which threatens organizational performance. &lt;strong&gt;Good leaders proactively manage expectations and make them explicit. Poor ones do not.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This idea is further reinforced and validated by this &lt;a href="https://www.mdpi.com/2076-3387/14/5/95" rel="noopener noreferrer"&gt;2024 research study from the Norwegian University of Science and Technology (NTNU) titled "The Role of Expectation Management in Value Creation"&lt;/a&gt; which proves that misaligned expectations significantly undermine job performance, organizational commitment and job satisfaction. The paper itself talks about how municipal managers have to improvize under strong economic pressure that forces them to rethink value creation when providing housing services with significantly less money than ideal. What they found was that the keys to creating value (read: delivering their housing services) heavily depended on:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Managing expectations effectively&lt;/li&gt;
&lt;li&gt;Building long-term relationships with their "customers"&lt;/li&gt;
&lt;li&gt;Balancing planned vs. urgent matters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While I bet most of us here aren't municipal managers helping residents with housing, there's a high probability that the work we do everyday is &lt;em&gt;value creation work&lt;/em&gt; all the same and so, these principles apply. When we are able to clearly maintain appropriate expectations that the coding we do during nights, weekends, and off hours is &lt;em&gt;hobby work&lt;/em&gt; and done &lt;em&gt;just because we love it&lt;/em&gt; and we may stop when we want and start when we want and follow the whims and ways of our desire, then we're likely to be in a healthier space where we retain the agency to do with our time that which we wish and don't slowly become slaves to the expectations of others.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Way Forward
&lt;/h2&gt;

&lt;p&gt;With all that said, here's a protocol that works exceedingly well for me:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Accept that I just deeply love my work, the work that &lt;a href="https://youtu.be/zOKCrgQOiME?si=Zsir46HhjRpNL0QU&amp;amp;t=744" rel="noopener noreferrer"&gt;found me as a child&lt;/a&gt;, and the work that I’ll probably die loving.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Recognize that this doesn't affect "work/life balance" because this is a deeply rooted part of my life with or without "work" (a job).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set my heart and mind on the right priorities: human beings, friends, family, and relationships are imbued with something so inherently and intrinsically beautiful and divine that sets them/us so far apart from any hobby that could ever exist. I intend to never lose sight of this.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Maintain awareness of seasons and cycles. There will be times when coding feels energizing and times when I need space from it. I try to listen to those rhythms rather than forcing myself to either code or not code based on external rules. Most external rules are made up and don't matter anyway.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pay strong attention to warning signs: decreased ability to psychologically detach from work, reduced sleep quality, elevated stress levels, declining social connections, and adjust where needed.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At this point in time, at 31 years of age, going through all that I have gone through and &lt;a href="https://www.youtube.com/live/B8e1r2L7iq8?si=CCTyvmnwlr3VKsav&amp;amp;t=2686" rel="noopener noreferrer"&gt;suffering all I’ve endured&lt;/a&gt;, this seems like the ideal, optimal, and most fruitful path for me. What do you think? &lt;a href="https://x.com/intent/post?text=Here's%20what%20I%20think%20about%20https%3A%2F%2Ftej.as%2Fblog%2Fcoding-nights-weekends-good-work-life-balance%2C%20%40tejaskumar_%3A%20" rel="noopener noreferrer"&gt;Let me know know on 𝕏&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>workplace</category>
      <category>coding</category>
      <category>productivity</category>
      <category>culture</category>
    </item>
    <item>
      <title>Announcing 12 Days of Codemas: The DataStax Holiday Giveaway!</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Fri, 20 Dec 2024 20:40:58 +0000</pubDate>
      <link>https://dev.to/datastax/announcing-12-days-of-codemas-the-datastax-holiday-giveaway-5d7l</link>
      <guid>https://dev.to/datastax/announcing-12-days-of-codemas-the-datastax-holiday-giveaway-5d7l</guid>
      <description>&lt;p&gt;Happy holidays from DataStax! This year, we’re celebrating by giving away $1,000 per day to developers who create content around Astra DB and/or Langflow during the holiday season.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VaiUXPdl1eM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How to enter
&lt;/h2&gt;

&lt;p&gt;Entering our giveaway is easy.&lt;/p&gt;

&lt;p&gt;Create content (a blog post, a video, or a software project on GitHub – see terms and conditions below for details) that features Astra DB and/or Langflow. Content must be human-created and not AI-generated, and posted on one or more of the following sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YouTube for videos&lt;/li&gt;
&lt;li&gt;GitHub for code &lt;/li&gt;
&lt;li&gt;For written content - dev.to, Medium, Reddit, Hashnode, or HackerNews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can post content on a personal blog too, but it must be crossposted on at least one of the above channels. Then, share it with us on social media by mentioning our handle (&lt;a class="mentioned-user" href="https://dev.to/datastaxdevs"&gt;@datastaxdevs&lt;/a&gt;) along with the hashtag #12DaysOfCodemas—and don’t forget to include a link to your content. We’ll count entries specifically and exclusively posted on 𝕏. &lt;/p&gt;

&lt;p&gt;That’s it! The date of your social post counts as the date of your submission. From there, you will enter a raffle to win $1,000 for your submission. If you win: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’ll get $1,000.&lt;/li&gt;
&lt;li&gt;We’ll share your winning piece on our social media accounts.&lt;/li&gt;
&lt;li&gt;A member of our team will contact you with next steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Content suggestions
&lt;/h2&gt;

&lt;p&gt;If you need inspiration about what content to create, here are some things we’d love to see exist in the world:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI agents that accomplish tasks and solve a specific problem using Langflow&lt;/li&gt;
&lt;li&gt;Content that highlights how Astra DB stacks up against similar vector databases, specifically for AI use cases like RAG (retrieval-augmented generation)&lt;/li&gt;
&lt;li&gt;Content about how to perform effective RAG with knowledge graphs&lt;/li&gt;
&lt;li&gt;We’d prefer content around topics that are more than just basic chat bots.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Happy building! &lt;/p&gt;

&lt;h2&gt;
  
  
  Terms and conditions
&lt;/h2&gt;

&lt;p&gt;The following terms and conditions apply to this giveaway.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eligibility and entry requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No purchase necessary to enter or win. This giveaway is open to individuals aged 18 years or older, excluding employees of DataStax, its subsidiaries, affiliates, and their immediate family members.  Open to legal residents of the 50 U.S. States and the District of Columbia. Void where prohibited by law.&lt;/p&gt;

&lt;p&gt;Winning a prize is contingent upon fulfilling all requirements set forth herein.&lt;/p&gt;

&lt;p&gt;You may not enter more times than indicated by using multiple accounts, identities or devices in an attempt to circumvent the rules. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entry period and submission guidelines&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The giveaway runs from December 12 (12:00 AM PST) to December 24, 2024 (11:59 PM PST). Each 24-hour period (day) constitutes a separate drawing period.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Content includes but is not limited to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A blog post of at least 500 words&lt;/li&gt;
&lt;li&gt;A video of at least 5 minutes in length&lt;/li&gt;
&lt;li&gt;A GitHub project with working code that integrates with Astra DB and/or Langflow, plus documentation including usage instructions in the README.md.
Content must not be generated by AI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Content must substantially feature DataStax Astra DB and/or DataStax Langflow&lt;/p&gt;

&lt;p&gt;Content must be original and not violate any third-party rights&lt;/p&gt;

&lt;p&gt;Content must be in English and publicly accessible&lt;/p&gt;

&lt;p&gt;DataStax reserves sole discretion to determine if content meets "meaningful use" criteria&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prize and winner selection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Daily prize of $1,000 USD (to the extent there is an entry that day)&lt;/p&gt;

&lt;p&gt;Winners selected through random drawing from eligible entries received that day&lt;/p&gt;

&lt;p&gt;One additional people’s choice winner will be drawn at the end of the event, chosen on the basis of its number of likes alone&lt;/p&gt;

&lt;p&gt;Winners will be notified via social media within 48 hours of selection&lt;/p&gt;

&lt;p&gt;Winners must respond within 72 hours of notification or forfeit prize&lt;/p&gt;

&lt;p&gt;Winners can only win a maximum of one time. If an individual wins more than one time, a new winner will be redrawn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Liability and rights&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DataStax reserves the right to verify eligibility of all entries&lt;/p&gt;

&lt;p&gt;If prize payment is not possible due to a violation of these terms (such as geographic restrictions, lack of appropriate documentation, or any other reason), DataStax reserves the right to conduct another drawing&lt;/p&gt;

&lt;p&gt;DataStax may disqualify entries that violate these terms or are fraudulent&lt;/p&gt;

&lt;p&gt;By entering, participants grant DataStax perpetual rights to distribute submitted content for promotional purposes without compensation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DataStax is not responsible for lost, delayed, or corrupted entries&lt;/p&gt;

&lt;p&gt;DataStax reserves the right to modify or cancel the giveaway due to technical issues or other unforeseen circumstances&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tax implications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Winners are responsible for all applicable taxes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Legal compliance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This promotion is governed by California law&lt;/p&gt;

&lt;p&gt;Any disputes will be resolved in the courts of DataStax's choosing&lt;/p&gt;

&lt;p&gt;Winners agree to comply with all applicable laws and regulations&lt;/p&gt;

&lt;p&gt;By participating, entrants agree to these terms and conditions and acknowledge that DataStax's decisions are final and binding.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>vectordatabase</category>
    </item>
    <item>
      <title>How We Built UnReel: An AI-Generated, Multiplayer Movie Quiz</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Thu, 19 Dec 2024 16:42:56 +0000</pubDate>
      <link>https://dev.to/datastax/how-we-built-unreel-an-ai-generated-multiplayer-movie-quiz-2a9d</link>
      <guid>https://dev.to/datastax/how-we-built-unreel-an-ai-generated-multiplayer-movie-quiz-2a9d</guid>
      <description>&lt;p&gt;We recently created an &lt;a href="https://playunreel.ai/" rel="noopener noreferrer"&gt;exciting multiplayer movie trivia game&lt;/a&gt; that combines real-time gaming with AI-generated questions. Here's how we put it together.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/O-LH32zuRAc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  The core components
&lt;/h2&gt;

&lt;p&gt;The game uses three main technologies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://docs.datastax.com/en/langflow/index.html?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=unreel&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; for AI question generation and RAG implementation&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.datastax.com/products/datastax-astra?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=unreel&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Astra DB&lt;/a&gt; for storing and retrieving movie content and questions&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.partykit.io/" rel="noopener noreferrer"&gt;PartyKit&lt;/a&gt; for real-time multiplayer functionality&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Question generation system
&lt;/h2&gt;

&lt;p&gt;We implemented a &lt;a href="https://www.datastax.com/guides/what-is-retrieval-augmented-generation?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=unreel&amp;amp;utm_content=" rel="noopener noreferrer"&gt;RAG (retrieval-augmented generation)&lt;/a&gt; system using Langflow to generate movie-related questions. The process involves reading a CSV file containing movie names and their quotes and pulling random items to generate not just contextually accurate movie quotes, but also some very believable red herrings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multiplayer architecture
&lt;/h2&gt;

&lt;p&gt;The game uses a client-server architecture where a central server maintains the true game state. This ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Fair gameplay across all players&lt;/li&gt;
&lt;li&gt;  Synchronized question delivery&lt;/li&gt;
&lt;li&gt;  Real-time score updates&lt;/li&gt;
&lt;li&gt;  Player state management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We built this with PartyKit because it brought us the ability to iterate rapidly. The game took 2 weeks from zero to MVP (after which we continued to refine it).&lt;/p&gt;

&lt;h2&gt;
  
  
  Game flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Room creation -&lt;/strong&gt; Players join dedicated game rooms, similar to a traditional lobby system. A room can contain up to foud teams of four players for a total of 16 players. &lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Question generation -&lt;/strong&gt; The system pulls movie content from a large CSV and generates questions using our Langflow pipeline.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Real-time interaction -&lt;/strong&gt; Players are given a movie quote and each player on each team has one of the potential answers. The answer could be a real movie, or the quote could have been AI generated. They collaborate on the same team, and play against other teams.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Score tracking -&lt;/strong&gt; The server tracks both correct answers and how quickly each team answers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;At the end, the teams that answer the most questions correctly the fastest wins.&lt;/p&gt;

&lt;h2&gt;
  
  
  Technical implementation
&lt;/h2&gt;

&lt;p&gt;This game has many moving parts, as you can imagine, but for the purposes of this post, we'll focus on just a few. Feel free to check out the &lt;a href="https://github.com/datastax/unreel" rel="noopener noreferrer"&gt;source code on GitHub&lt;/a&gt; for more details.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI question pipeline
&lt;/h3&gt;

&lt;p&gt;We needed two pipelines to create the question for the game:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; The first one took real movie quotes and generated alternative movies that could have been the answer. &lt;/li&gt;
&lt;li&gt; In the other, we generated fake movie quotes and the movies that could have spawned those quotes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The former was relatively straightforward, but generating fake movie quotes that sounded real was much more of a challenge.&lt;/p&gt;

&lt;p&gt;It was super important that AI generated quotes were close enough to real movie quotes and believable as real quotes in order to trick players into thinking they were actually real. This interaction forms the heart of the game. If generated quotes are too obvious, it ruins the challenge of the game. By introducing AI generated quotes into play, we inject a level of suspense, uncertainty, and intrigue among players.&lt;/p&gt;

&lt;p&gt;We experimented with multiple LLMs and providers ranging across Groq, OpenAI, Mistral, and Anthropic. This was an area where Langflow really shined, allowing us to connect and test out new models in seconds without having to change our application logic while performing test runs. &lt;/p&gt;

&lt;p&gt;We landed on &lt;a href="https://mistral.ai/news/mixtral-of-experts/" rel="noopener noreferrer"&gt;MistralAI's open-mixtral-8x7b&lt;/a&gt; model using a temperature of 0.5 (for some creativity, but not too much) and seeded it with real movie quotes to provide the best results. &lt;/p&gt;

&lt;p&gt;It turns out we required a bit of finesse between generating quotes like "You can't handle the truth, or this spicy taco" (fake) or "If you're yearning for chaos, my friend, chaos we shall have" (also fake). For some reason, we found that multiple LLMs really wanted to include food references. Once we dialed the settings in, the output was solid and the game became a lot more fun.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ajnn975mjt87d5pz23o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ajnn975mjt87d5pz23o.png" alt="A diagram" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Multiplayer coordination and device orientation
&lt;/h3&gt;

&lt;p&gt;For a multiplayer game, &lt;a href="https://developers.cloudflare.com/durable-objects/" rel="noopener noreferrer"&gt;Cloudflare Durable Objects&lt;/a&gt; are a very good primitive: each room is essentially a Durable Object that is provisioned at one of Cloudflare's points of presence near wherever the game is initiated. This provides automatic load balancing at production scale.&lt;/p&gt;

&lt;p&gt;Here's a preview of our single file that runs all the coordination:&lt;/p&gt;

&lt;p&gt;For the sake of brevity, we've left out some implementation, but this outline gives you the gist of how we implemented the multiplayer feature. &lt;a href="https://github.com/datastax/unreel/blob/main/controller/src/server.ts" rel="noopener noreferrer"&gt;It's all contained here.&lt;/a&gt; We were very impressed with PartyKit because as soon as we filled this in and hit partykit dev, we had real-time multiplayer infrastructure—instantly. &lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons learned
&lt;/h2&gt;

&lt;p&gt;Building this game was a great experience around building production-grade software with generative AI. To finish this, here are some lessons we've learned.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Perceived effort for GenAI can be misleading -&lt;/strong&gt; We've seen time and time again: the initial effort for GenAI applications can happen very fast, giving the impression that work is almost complete within hours or days, but the &lt;a href="https://www.pivotaltracker.com/buildtv/why-the-last-20-percent-of-a-project-is-the-hardest-to-get-through" rel="noopener noreferrer"&gt;"last 20%"&lt;/a&gt; of work may actually take the most effort. In UnReel's case, ~95% of the GenAI logic and flow was completed within a day or so, but tweaking LLMs, temperature, and proper seed data to really nail the output we were looking for took the most effort overall. Ensure time estimates take this into account.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Generating more results in a single step may be more efficient than asking LLMs for singular responses -&lt;/strong&gt; LLMs, by their nature and depending on the task at hand, can easily take multiple seconds to return a response. Since UnReel required multiple questions (usually 10 in our case) for teams to answer, it was actually faster to ask the LLMs to return all 10 at once instead of generating a movie quote in real-time for each question.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;UI state is almost always better derived from server state -&lt;/strong&gt; One important lesson we learned here was to never share state between server and client for these kinds of applications. Instead, the server contains all the state, and the UI derives it. If the UI cannot derive its state from server state, the state is likely improperly designed.
Without a single source of unidirectional state, our game was often in a very mixed and confusing state that we never intended it to be in. Using a single source of state, we were able to derive UIs for multiple different screens, including the game play, an admin, and a leaderboard. They all looked and acted differently, but remained perfectly in sync.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Idempotency is king&lt;/strong&gt; - With distributed systems and coordinating across so many concurrent sessions that are supposed to have identical states, we often ran into situations where a score would go from 24 to 23,085 when it was supposed to go to 32.
The reason for this was that user devices sometimes sent many of the same events to be processed as opposed to a single one. Creating behavior that is unaffected by identical repeat events was crucial in building UnReel.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Check it out
&lt;/h2&gt;

&lt;p&gt;Building this game, we learned a ton about Astra DB, Langflow, and PartyKit, and we gathered quite a bit of feedback that has already been actioned. Should you wish to try your hand at building with &lt;a href="https://www.datastax.com/products/datastax-astra?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=unreel&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Astra DB&lt;/a&gt; or &lt;a href="https://www.langflow.org/" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt;, feel free to sign up and give them a try.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>langflow</category>
      <category>partykit</category>
      <category>mistral</category>
    </item>
    <item>
      <title>Choosing a Vector Store for LangChain</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Wed, 18 Dec 2024 17:02:10 +0000</pubDate>
      <link>https://dev.to/datastax/choosing-a-vector-store-for-langchain-4n48</link>
      <guid>https://dev.to/datastax/choosing-a-vector-store-for-langchain-4n48</guid>
      <description>&lt;p&gt;It can be challenging to shepherd GenAI apps from prototype to production. Vector stores and LangChain are technologies that, used together, can increase response accuracy and speed up release times. &lt;/p&gt;

&lt;p&gt;In this post, you'll learn what vector stores and LangChain do, how they work together, and how to choose a vector store that integrates seamlessly with LangChain. &lt;/p&gt;

&lt;h2&gt;
  
  
  Using a vector store with LangChain
&lt;/h2&gt;

&lt;p&gt;First, let's take a quick look at what vector store and LangChain each contribute to building an accurate and reliable GenAI app. &lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain
&lt;/h3&gt;

&lt;p&gt;A GenAI app typically consists of multiple components. It may use one or more &lt;a href="https://www.datastax.com/guides/what-is-a-large-language-model?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;large language models (LLMs)&lt;/a&gt; - generalized AI systems trained on large volumes of data - to respond to different types of queries. It will also commonly include components such as response parsers, verifiers, external data stores, cached data, agents (e.g., chatbots), and integrations with third-party APIs. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.langchain.com/" rel="noopener noreferrer"&gt;LangChain&lt;/a&gt; is a framework, available in both &lt;a href="https://www.datastax.com/guides/what-is-langchain?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Python&lt;/a&gt; and &lt;a href="https://www.datastax.com/integrations/langchain-javascript?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt;, that's designed to streamline AI application development. It represents all of the components of a GenAI application as objects and provides a simple language to assemble (chain) them into a request/response processing pipeline. &lt;/p&gt;

&lt;p&gt;Using LangChain, you can create complex applications using hundreds of components—sophisticated chatbots, code renderers, etc.—with just a few dozen lines of code. LangChain also implements operational robustness features,  such as LLM streaming and parallelization, so you don't have to code them yourself. &lt;/p&gt;

&lt;h3&gt;
  
  
  Vector stores
&lt;/h3&gt;

&lt;p&gt;LLMs are very good at processing natural language queries and creating responses based on their training set. However, that training set is generalized and usually a couple of years old. Obtaining accurate and timely responses requires supplying additional context with your prompts. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.datastax.com/guides/what-is-retrieval-augmented-generation?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Retrieval-augmented generation (RAG)&lt;/a&gt; is a technique that takes a user's query and gathers additional context from external, domain-specific data stores - e.g., your product catalog and manuals, and your customer support logs. It then includes the most relevant context in the prompt to the LLM. &lt;/p&gt;

&lt;p&gt;A &lt;a href="https://www.datastax.com/guides/what-is-a-vector-database?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;vector database&lt;/a&gt;, or vector store, has become the go-to method for implementing such searches because vector databases excel at storing high-dimensional data with retrieval via semantic search. A vector store represents multi-modal data as mathematical vectors and then retrieves similar instances (nearest neighbors) based on these calculations. &lt;/p&gt;

&lt;p&gt;Vector stores can process queries and return nearest neighbors with low latency - a key requirement for a multi-step AI processing pipeline. Including this additional data in your GenAI prompts results in timely, more accurate, domain-specific LLM responses with fewer hallucinations. &lt;/p&gt;

&lt;h2&gt;
  
  
  Considerations when selecting a vector store for LangChain
&lt;/h2&gt;

&lt;p&gt;Because LangChain aims to be an "everything framework" for AI apps, it supports a number of different vector stores. However, not all vector databases are created equal. When choosing one, we recommend keeping the following factors in mind. &lt;/p&gt;

&lt;h3&gt;
  
  
  Ease of use
&lt;/h3&gt;

&lt;p&gt;One consideration for a vector store is how easy it is to store and retrieve data, particularly for application developers who may be new to the technology.  Do users have to understand the underlying storage model in detail to load data? Or does it provide an easy API to initialize? Similarly, is it easy to turn a user query into a vector embedding you can use to perform lookups? &lt;/p&gt;

&lt;h3&gt;
  
  
  Performance
&lt;/h3&gt;

&lt;p&gt;"Performance" can mean a few different things for a vector store:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Throughput -&lt;/strong&gt; GenAI use cases require access to large volumes of recent and relative data to ensure accuracy. Make sure to select a vector store with rapid data ingestion and indexing &lt;a href="https://www.datastax.com/blog/astra-db-vs-pinecone-gigaom-performance-study?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;as measured by industry benchmarks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query execution time -&lt;/strong&gt; &lt;a href="https://www.nngroup.com/articles/website-response-times/" rel="noopener noreferrer"&gt;A typical interactive online application should respond quickly&lt;/a&gt; to feel seamless and to keep a user engaged. For chatbots - a popular GenAI use case - the pipeline should respond within the same amount of time a user feels it would take a human operator to respond. When adding a vector store to your GenAI app stack, choose one that provides the lowest latency and fastest query execution time for your use case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accuracy and relevancy -&lt;/strong&gt; Data isn't any good if it's the wrong data. Make sure to use a metric &lt;a href="https://towardsdatascience.com/a-look-at-precision-recall-and-f1-score-36b5fd0dd3ec?gi=d92028bb23e6" rel="noopener noreferrer"&gt;such as an F1-Score&lt;/a&gt; to gauge the accuracy of responses for your vector database queries. &lt;/p&gt;

&lt;h3&gt;
  
  
  System reliability
&lt;/h3&gt;

&lt;p&gt;Finally, consider system reliability. Adding a vector store to your app means adding yet another architectural component you have to ensure has high reliability and can scale to meet demand. &lt;/p&gt;

&lt;p&gt;The easiest way to address reliability concerns is by using a serverless vector store. A &lt;a href="https://www.datastax.com/guides/what-is-a-serverless-database?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;serverless database&lt;/a&gt; is fully operated and managed by a third-party provider and scales automatically to meet your storage and interactive user requirements. &lt;/p&gt;

&lt;h2&gt;
  
  
  Vector stores that integrate with LangChain
&lt;/h2&gt;

&lt;p&gt;Which vector store you use with LangChain will highly depend on your requirements. At DataStax, we've put a lot of effort into creating solutions that enable GenAI app developers to add RAG functionality with minimal effort. Here are two ways to take advantage of it. &lt;/p&gt;

&lt;h3&gt;
  
  
  Apache Cassandra
&lt;/h3&gt;

&lt;p&gt;Apache Cassandra® is a popular NoSQL distributed database system used by companies such as Uber, Netflix, and Priceline. Using its custom query language (CQL, a variant of SQL), developers can access large volumes of data reliably and with industry-leading query performance. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.datastax.com/blog/apache-cassandra-5-0-and-datastax-the-benefits-of-staying-in-sync?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Cassandra Version 5.0 incorporates work done by our team at DataStax&lt;/a&gt; to add support for approximate nearest neighbor vector search and Storage-Attached Indexes, bringing the power of vector storage to all Cassandra users. LangChain users can integrate Cassandra easily into their GenAI pipelines &lt;a href="https://python.langchain.com/docs/integrations/providers/cassandra/" rel="noopener noreferrer"&gt;using the LangChain Cassandra provider&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Astra DB
&lt;/h3&gt;

&lt;p&gt;The easiest way to add a vector store to your application is to leverage a serverless provider. That's where DataStax comes in. &lt;/p&gt;

&lt;p&gt;Astra DB is a zero-friction drop-in replacement for Cassandra made available as a fully managed service. Astra DB provides petabyte scalability along with fast query response times, low latency, and strong security and compliance. It's also affordable - up to 5x cheaper than hosting a Cassandra cluster yourself. &lt;/p&gt;

&lt;p&gt;You can add Astra DB easily to both &lt;a href="https://docs.datastax.com/en/astra-db-serverless/integrations/langchain.html?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;LangChain Python&lt;/a&gt; and &lt;a href="https://docs.datastax.com/en/astra-db-serverless/integrations/langchain-js.html?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;LangChain JS&lt;/a&gt; applications. DataStax makes this integration even easier with &lt;a href="https://www.datastax.com/products/langflow?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt;, a no-code Integrated Developer Environment (IDE) you can use to assemble and configure your LangChain GenAI apps visually. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using a vector store with LangChain eliminates a lot of the heavy lifting involved in creating a highly reliable, high-performance, and accurate GenAI application. DataStax reduces that overhead even further by providing a full-stack AI platform to bring your apps quickly from prototype to production.&lt;/p&gt;

&lt;p&gt;Want to try it for yourself? &lt;a href="https://astra.datastax.com/signup?utm_medium=byline&amp;amp;utm_source=devto&amp;amp;utm_campaign=vector_store_langchain&amp;amp;utm_content=" rel="noopener noreferrer"&gt;Sign up for a free DataStax account today&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>langchain</category>
      <category>vectordatabase</category>
      <category>genai</category>
    </item>
    <item>
      <title>Instantly Chat with Your PDFs Using Langflow</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Fri, 13 Dec 2024 00:57:59 +0000</pubDate>
      <link>https://dev.to/datastax/instantly-chat-with-your-pdfs-using-langflow-2cl</link>
      <guid>https://dev.to/datastax/instantly-chat-with-your-pdfs-using-langflow-2cl</guid>
      <description>&lt;p&gt;&lt;a href="https://www.datastax.com/products/langflow" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt;, DataStax’s drag-and-drop IDE, offers an intuitive, low-code approach to building PDF chatbots that can understand and answer questions about your documents. This powerful, open-source tool is accessible to both beginners and experienced developers. Here’s a quick look at how easy it is to build an app that enables you to chat with PDFs. &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up your PDF chatbot
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://langflow.datastax.com" rel="noopener noreferrer"&gt;Sign up for Langflow&lt;/a&gt; and create a new project. Then, navigate to “All Templates”, and select the Document Q&amp;amp;A template to begin. The platform provides a visual workflow creator where you can assemble your chatbot's components without writing code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa01gb4dhriz4xuiyohz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa01gb4dhriz4xuiyohz.gif" alt="Image description" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Document Q&amp;amp;A flow contains the following components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;File -&lt;/strong&gt; Handles PDF document upload and processing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parse Data -&lt;/strong&gt; Turns the PDF content into text for the next step&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt -&lt;/strong&gt; The prompt we send to the language model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat Input -&lt;/strong&gt; The question for the user&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI (or any other LLM provider) -&lt;/strong&gt; The Language Model that generates the answers, and finally&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chat Output -&lt;/strong&gt; A component to render the answer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you add your appropriate API keys to the flow, you can immediately start chatting with your PDF by clicking the Playground button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzyzc1kud0tsljn76i95.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzyzc1kud0tsljn76i95.gif" alt="Image description" width="950" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;p&gt;While this flow works quite well for most PDFs, you could go even further using the Unstructured Langflow component and work with key elements within your PDF including titles, paragraphs, and tables. You can customize text extraction settings for complex documents containing images and varied formatting. &lt;/p&gt;

&lt;h2&gt;
  
  
  Interaction Capabilities
&lt;/h2&gt;

&lt;p&gt;Your chatbot can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Answer specific questions about PDF content&lt;/li&gt;
&lt;li&gt;Maintain context through Langflow’s powerful conversation memory support&lt;/li&gt;
&lt;li&gt;Be exposed over an API for any application user interface&lt;/li&gt;
&lt;li&gt;Function as an AI agent using context from your document&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;Once you’re happy with your flow, you can continue to chat with your PDF in the Langflow playground, or integrate it into an frontend user interface: this exact flow will run deterministically via an HTTP API. To use this feature, click the API button right next to the playground button as highlighted above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Taking it further
&lt;/h2&gt;

&lt;p&gt;Now that we’re familiar with a basic PDF chat setup with Langflow, we can take things further by storing the contents of PDFs and other documents in our flagship vector database, &lt;a href="https://www.datastax.com/products/datastax-astra" rel="noopener noreferrer"&gt;DataStax Astra DB&lt;/a&gt;, and retrieving only the portions of content that semantically match a user’s query using vector search. Stay tuned for that in an upcoming post.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Learn AI and win $1000 for doing so: DataStax 12 days of Codemas</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Mon, 09 Dec 2024 15:02:33 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/learn-ai-and-win-1000-for-doing-so-datastax-12-days-of-codemas-42lj</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/learn-ai-and-win-1000-for-doing-so-datastax-12-days-of-codemas-42lj</guid>
      <description>&lt;p&gt;Happy holidays from DataStax! This year, we’re celebrating by giving away $1,000 per day to developers who create content around &lt;a href="https://www.datastax.com/products/datastax-astra" rel="noopener noreferrer"&gt;Astra DB&lt;/a&gt; and/or &lt;a href="https://www.datastax.com/products/langflow" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt; during the holiday season.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VaiUXPdl1eM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How to enter
&lt;/h2&gt;

&lt;p&gt;Entering our giveaway is easy.&lt;/p&gt;

&lt;p&gt;Create content (a blog post, a video, or a software project on GitHub – see terms and conditions below for details) that features Astra DB and/or Langflow. Content must be human-created and not AI-generated, and posted on one or more of the following sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://youtube.com/" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt; for videos&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; for code &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For written content - &lt;a href="http://dev.to/"&gt;dev.to&lt;/a&gt;, &lt;a href="https://medium.com/" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.reddit.com/" rel="noopener noreferrer"&gt;Reddit&lt;/a&gt;, &lt;a href="https://hashnode.dev/" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;, or &lt;a href="https://news.ycombinator.com/" rel="noopener noreferrer"&gt;HackerNews&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can post content on a personal blog too, but it must be crossposted on at least one of the above channels. Then, share it with us on social media by mentioning our handle (&lt;a class="mentioned-user" href="https://dev.to/datastaxdevs"&gt;@datastaxdevs&lt;/a&gt;) along with the hashtag #12DaysOfCodemas—and don’t forget to include a link to your content. We’ll count entries specifically and exclusively posted on &lt;a href="https://x.com/datastaxdevs" rel="noopener noreferrer"&gt;𝕏&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;That’s it! The date of your social post counts as the date of your submission. From there, you will enter a raffle to win $1,000 for your submission. If you win: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;You’ll get $1,000.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We’ll share your winning piece on our social media accounts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A member of our team will contact you with next steps.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Content suggestions
&lt;/h2&gt;

&lt;p&gt;If you need inspiration about what content to create, here are some things we’d love to see exist in the world:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AI agents that accomplish tasks and solve a specific problem using Langflow&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Content that highlights how Astra DB stacks up against similar vector databases, specifically for AI use cases like &lt;a href="https://www.datastax.com/de/blog/what-is-rag-retrieval-augmented-generation" rel="noopener noreferrer"&gt;RAG&lt;/a&gt; (retrieval-augmented generation)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Content about how to perform effective RAG with &lt;a href="https://www.datastax.com/de/guides/graph-rag" rel="noopener noreferrer"&gt;knowledge graphs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’d prefer content around topics that are more than just basic chat bots.&lt;/p&gt;

&lt;p&gt;Happy building! &lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Terms and conditions&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The following terms and conditions apply to this giveaway.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Eligibility and entry requirements&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;No purchase necessary to enter or win. This giveaway is open to individuals aged 18 years or older, excluding employees of DataStax, its subsidiaries, affiliates, and their immediate family members.  Open to legal residents of the 50 U.S. States and the District of Columbia. Void where prohibited by law.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winning a prize is contingent upon fulfilling all requirements set forth herein.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You may not enter more times than indicated by using multiple accounts, identities or devices in an attempt to circumvent the rules.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Entry period and submission guidelines&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The giveaway runs from December 12 (12:00 AM PST) to December 24, 2024 (11:59 PM PST). Each 24-hour period (day) constitutes a separate drawing period.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Content requirements&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Content includes but is not limited to:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;A blog post of at least 500 words&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;A video of at least 5 minutes in length&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;A GitHub project with working code that integrates with Astra DB and/or Langflow, plus documentation including usage instructions in the README.md.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Content must not be generated by AI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Content must substantially feature DataStax Astra DB and/or DataStax Langflow&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Content must be original and not violate any third-party rights&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Content must be in English and publicly accessible&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DataStax reserves sole discretion to determine if content meets "meaningful use" criteria&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Prize and winner selection&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Daily prize of $1,000 USD (to the extent there is an entry that day)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners selected through random drawing from eligible entries received that day&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;One additional people’s choice winner will be drawn at the end of the event, chosen on the basis of its number of likes alone&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners will be notified via social media within 48 hours of selection&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners must respond within 72 hours of notification or forfeit prize&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners can only win a maximum of one time. If an individual wins more than one time, a new winner will be redrawn.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Liability and rights&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DataStax reserves the right to verify eligibility of all entries&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If prize payment is not possible due to a violation of these terms (such as geographic restrictions, lack of appropriate documentation, or any other reason), DataStax reserves the right to conduct another drawing&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DataStax may disqualify entries that violate these terms or are fraudulent&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By entering, participants grant DataStax perpetual rights to distribute submitted content for promotional purposes without compensation&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Technical issues&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DataStax is not responsible for lost, delayed, or corrupted entries&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DataStax reserves the right to modify or cancel the giveaway due to technical issues or other unforeseen circumstances&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Tax implications&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners are responsible for all applicable taxes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Legal compliance&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This promotion is governed by California law&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Any disputes will be resolved in the courts of DataStax's choosing&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Winners agree to comply with all applicable laws and regulations&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By participating, entrants agree to these terms and conditions and acknowledge that DataStax's decisions are final and binding.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>vectordatabase</category>
      <category>langchain</category>
    </item>
    <item>
      <title>Building a Scalable AI Chat Application with Python, LangChain and Vector Search</title>
      <dc:creator>Tejas Kumar</dc:creator>
      <pubDate>Mon, 09 Dec 2024 09:48:03 +0000</pubDate>
      <link>https://dev.to/tejas_kumar_83c520d6bef27/building-a-scalable-ai-chat-application-with-python-langchain-and-vector-search-51pm</link>
      <guid>https://dev.to/tejas_kumar_83c520d6bef27/building-a-scalable-ai-chat-application-with-python-langchain-and-vector-search-51pm</guid>
      <description>&lt;p&gt;Building a production-ready AI chat application requires robust vector storage and efficient workflow management. Let's explore how to create this using &lt;a href="https://www.datastax.com/products/datastax-astra" rel="noopener noreferrer"&gt;Astra DB&lt;/a&gt; and &lt;a href="https://langflow.org" rel="noopener noreferrer"&gt;Langflow&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Setup
&lt;/h2&gt;

&lt;p&gt;First, let's set up our Python environment with the required dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.vectorstores&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;AstraDB&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_core.embeddings&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Embeddings&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;astrapy.info&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CollectionVectorServiceOptions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Vector Storage Configuration
&lt;/h2&gt;

&lt;p&gt;Astra DB provides enterprise-grade vector storage capabilities optimized for AI applications. Here's how to initialize it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;openai_vectorize_options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CollectionVectorServiceOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;provider&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;openai&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text-embedding-3-small&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;authentication&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;providerKey&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;vector_store&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AstraDBVectorStore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;collection_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chat_history&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_endpoint&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_ASTRA_DB_ENDPOINT&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_ASTRA_DB_TOKEN&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;namespace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_NAMESPACE&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;collection_vector_service_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;openai_vectorize_options&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Building the Chat Interface
&lt;/h2&gt;

&lt;p&gt;We'll use Langflow to create a visual workflow for our chat application. Langflow provides a drag-and-drop interface that simplifies the development process. The workflow consists of:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Components Setup&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input processing&lt;/li&gt;
&lt;li&gt;Vector search integration&lt;/li&gt;
&lt;li&gt;Response generation&lt;/li&gt;
&lt;li&gt;Output formatting&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Document Embedding and Retrieval
&lt;/h2&gt;

&lt;p&gt;Vector search in Astra DB enables efficient similarity matching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;retriever&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vector_store&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;as_retriever&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;similarity_score_threshold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_kwargs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;k&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;score_threshold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production Considerations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;br&gt;
Astra DB provides massive scalability for AI projects, supporting trillions of vectors with enterprise-grade security across any cloud platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;br&gt;
The platform adheres to PCI Security Council standards and protects PHI and PII data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;br&gt;
Astra DB offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simultaneous query/update capabilities&lt;/li&gt;
&lt;li&gt;Ultra-low latency&lt;/li&gt;
&lt;li&gt;Native support for mixed workloads with vector, non-vector, and streaming data&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Workflow Integration
&lt;/h2&gt;

&lt;p&gt;Langflow's visual IDE allows for rapid development and iteration:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drag-and-drop interface for connecting components&lt;/li&gt;
&lt;li&gt;Pre-built templates for common patterns&lt;/li&gt;
&lt;li&gt;Real-time testing and debugging&lt;/li&gt;
&lt;li&gt;Custom component support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This architecture provides a robust foundation for building production-ready AI chat applications that can scale with your needs while maintaining high performance and security standards.&lt;/p&gt;

</description>
      <category>python</category>
      <category>vectordatabase</category>
      <category>langchain</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
