<?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: Roshni Mishra</title>
    <description>The latest articles on DEV Community by Roshni Mishra (@roshni_mishra_9ed865d304f).</description>
    <link>https://dev.to/roshni_mishra_9ed865d304f</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4078639%2F9af39024-5ac3-4bd8-9351-1eebc42128a1.jpg</url>
      <title>DEV Community: Roshni Mishra</title>
      <link>https://dev.to/roshni_mishra_9ed865d304f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/roshni_mishra_9ed865d304f"/>
    <language>en</language>
    <item>
      <title>How We Built ZeroDay Sentry on Switch: Taming Dependency Alert Fatigue with AI Teammates</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sat, 07 Nov 2026 12:09:26 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/how-we-built-zeroday-sentry-on-switch-taming-dependency-alert-fatigue-with-ai-teammates-1c5a</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/how-we-built-zeroday-sentry-on-switch-taming-dependency-alert-fatigue-with-ai-teammates-1c5a</guid>
      <description>&lt;p&gt;&lt;em&gt;A deep dive into how we used Switch (&lt;code&gt;sandbox-quantum/switch&lt;/code&gt;) to connect two autonomous security agents into our team chat, eliminate scanner noise, and automate safe dependency upgrades.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;If you have ever maintained a production repository, you already know the sinking feeling of Monday morning: you open your email or Slack, and Dependabot has dumped 18 new security alerts into your lap. &lt;/p&gt;

&lt;p&gt;Most of them are marked "High" or "Critical," but when you actually look into them:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The vulnerability is in dead code:&lt;/strong&gt; The advisory flags a broken function in a utility library like &lt;code&gt;lodash&lt;/code&gt;, but your code only imports &lt;code&gt;debounce&lt;/code&gt; and &lt;code&gt;isEqual&lt;/code&gt;. The vulnerable method is never called in production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upgrading breaks your app:&lt;/strong&gt; You try bumping a minor package like &lt;code&gt;axios&lt;/code&gt;, but the new major version ships as pure ES Modules (ESM) while your test suite runs on CommonJS Jest. Suddenly your build crashes with &lt;code&gt;Cannot use import statement outside a module&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert fatigue sets in:&lt;/strong&gt; Because checking call paths and fixing broken syntax takes hours, the alerts sit in backlog purgatory. And when a truly reachable, dangerous zero-day vulnerability lands, it gets lost in the noise.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the &lt;strong&gt;Flip the Switch Hackathon (Track 1: Best Business Workflow)&lt;/strong&gt;, we wanted to fix this once and for all. We built &lt;strong&gt;ZeroDay Sentry&lt;/strong&gt;—a workflow powered by &lt;strong&gt;Switch&lt;/strong&gt; that puts two specialized AI agents into our team's &lt;code&gt;#security-war-room&lt;/code&gt; to answer two simple questions: &lt;strong&gt;Do we actually call it, and can we upgrade safely?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is the story of how we designed it, how Switch made it possible, and what we learned along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Concept: "The Site is the War Room"
&lt;/h2&gt;

&lt;p&gt;Instead of building another dashboard that developers have to remember to log into, we wanted our tool to live where the team already talks: Slack, Teams, Discord, or Mattermost.&lt;/p&gt;

&lt;p&gt;We split the workflow into distinct roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Scanner (Dependabot / Snyk):&lt;/strong&gt; Triggers the alert when an advisory is published.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@cve-analyst&lt;/code&gt; (Switch Agent):&lt;/strong&gt; A read-only investigator that inspects the repository's Abstract Syntax Tree (AST) to check if the vulnerable function or setting is reachable from production entrypoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@patch-crafter&lt;/code&gt; (Switch Agent):&lt;/strong&gt; A sandboxed engineer that branches the repo, upgrades the package, rewrites breaking syntax (like Jest CJS module mappings), and runs the test suite until green.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lead Developer (Human):&lt;/strong&gt; Reviews the 3-file diff in the thread and approves. Nothing merges without a human sign-off.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Dependabot Alert] 
       │
       ▼
[@cve-analyst]   ──&amp;gt; "lodash: NOT REACHABLE. axios: REACHABLE at client.js:42"
       │
       ▼
[@patch-crafter] ──&amp;gt; Bumps axios to 1.6.8, maps Jest CJS, 18/18 tests pass green
       │
       ▼
[Lead Developer] ──&amp;gt; "Read the diff. Approved." (1-click squash merge to main)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How Switch Made This Surprisingly Simple
&lt;/h2&gt;

&lt;p&gt;Before discovering Switch, building something like this meant writing custom Slack bot boilerplate, wrestling with OAuth scopes, setting up WebSocket listeners, managing ngrok tunnels, and repeating the entire process if you wanted to support Microsoft Teams or Discord.&lt;/p&gt;

&lt;p&gt;Switch completely flips this model through three core ideas:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Declarative Room Templates
&lt;/h3&gt;

&lt;p&gt;With Switch, you define your entire collaborative environment in a single YAML template (&lt;code&gt;security-war-room.template.yaml&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;

&lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;team&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
    &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sentry&lt;/span&gt;
  &lt;span class="na"&gt;bridge&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bridge&lt;/span&gt;
    &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;$first&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;agents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{team}-cve-analyst"&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Performs AST reachability analysis on your codebase to find real wolves&lt;/span&gt;
    &lt;span class="na"&gt;addressing&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;anyone&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{provider}"&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{team}-patch-crafter"&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Upgrades the library, rewrites deprecated code syntax, runs unit tests, and creates PR&lt;/span&gt;
    &lt;span class="na"&gt;addressing&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;owner-agents&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{provider}"&lt;/span&gt;

&lt;span class="na"&gt;room&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;security-war-room"&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Shared context room for CVE Analyst, Patch Crafter, and Lead Developers&lt;/span&gt;
  &lt;span class="na"&gt;bridge&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{bridge}"&lt;/span&gt;
  &lt;span class="na"&gt;agents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{team}-cve-analyst"&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{team}-patch-crafter"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
  &lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{$creator}"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Switch reads this specification and handles the bridge binding. Whether your team uses Slack, Discord, or Mattermost, the agents show up with their own avatar and permissions automatically.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Local Mattermost Advantage
&lt;/h3&gt;

&lt;p&gt;One huge friction point in hackathons is getting permissions: how do you test Slack bots if you don't own your company's workspace? &lt;/p&gt;

&lt;p&gt;Switch Console ships with a local Mattermost container out of the box. We were able to spin up local agents, trigger mock alerts, and test multi-agent interactions directly on our laptop with zero cloud credentials required.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Server-Sent Events (SSE) Agent Protocol
&lt;/h3&gt;

&lt;p&gt;Our backend runs a lightweight FastAPI service backed by SQLite. Because Switch speaks a clean HTTP/SSE protocol (Server-Sent Events inbound, HTTP outbound), connecting our Gemini-powered reachability engine was as simple as streaming responses into the room's event feed.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Real Walkthrough: Triage on &lt;code&gt;acme/checkout-web&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;To prove the concept on real-world dependencies, we benchmarked ZeroDay Sentry against two real CVEs in a demo checkout service:&lt;/p&gt;

&lt;h3&gt;
  
  
  Alert 1: &lt;code&gt;lodash 4.17.20&lt;/code&gt; (CVE-2021-23337 · High 7.2)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What scanners say:&lt;/strong&gt; "Vulnerable to command injection via template compilation!"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What &lt;code&gt;@cve-analyst&lt;/code&gt; discovered:&lt;/strong&gt; It crawled all 41 files in &lt;code&gt;src/&lt;/code&gt;. &lt;code&gt;lodash&lt;/code&gt; was imported in 6 files, but only for &lt;code&gt;debounce&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;, and &lt;code&gt;isEqual&lt;/code&gt;. There were zero calls to &lt;code&gt;_.template&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action taken:&lt;/strong&gt; Marked &lt;strong&gt;NOT REACHABLE&lt;/strong&gt;. Sentry deferred the bump to the next routine sprint update, saving the team from an emergency false-alarm fire drill.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Alert 2: &lt;code&gt;axios 0.27.2&lt;/code&gt; (CVE-2023-45857 · Medium 6.5)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What scanners say:&lt;/strong&gt; "Cross-origin XSRF token disclosure."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What &lt;code&gt;@cve-analyst&lt;/code&gt; discovered:&lt;/strong&gt; It found that &lt;code&gt;src/api/client.js:42&lt;/code&gt; created an axios instance with &lt;code&gt;withCredentials: true&lt;/code&gt;, while &lt;code&gt;src/api/rates.js:9&lt;/code&gt; sent requests to &lt;code&gt;partner-rates.example.com&lt;/code&gt; (a cross-origin endpoint). On axios 0.27, this leaks the sensitive session token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Verdict:&lt;/strong&gt; Marked &lt;strong&gt;REACHABLE AT client.js:42&lt;/strong&gt;. Sentry immediately handed the incident over to &lt;code&gt;@patch-crafter&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Autonomous Fix &amp;amp; Test Repair
&lt;/h3&gt;

&lt;p&gt;Upgrading axios from &lt;code&gt;0.27&lt;/code&gt; to &lt;code&gt;1.6.8&lt;/code&gt; isn't a simple version bump. When &lt;code&gt;@patch-crafter&lt;/code&gt; ran the test suite on branch &lt;code&gt;fix/axios-cve-2023-45857&lt;/code&gt;, Test Run 1 failed with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SyntaxError: Cannot use import statement outside a module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because axios 1.x ships pure ES Modules while the project's Jest setup uses CommonJS, the app crashed. &lt;/p&gt;

&lt;p&gt;Rather than giving up, &lt;code&gt;@patch-crafter&lt;/code&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Updated &lt;code&gt;jest.config.js&lt;/code&gt; to map &lt;code&gt;axios&lt;/code&gt; to its CommonJS build: &lt;code&gt;moduleNameMapper: { '^axios$': 'axios/dist/browser/axios.cjs' }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Refactored deprecated &lt;code&gt;axios.all&lt;/code&gt; / &lt;code&gt;axios.spread&lt;/code&gt; calls in &lt;code&gt;checkout.js&lt;/code&gt; to modern &lt;code&gt;Promise.all&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Reran the tests: &lt;strong&gt;18 of 18 test suites passed green&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Opened Draft PR #23 with a concise 3-file diff (&lt;code&gt;+7 -4 lines&lt;/code&gt;) and posted it into the war room thread.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Human Sign-off
&lt;/h3&gt;

&lt;p&gt;Our lead engineer Meera checked the diff right in the chat thread and typed:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Read the diff. Approved."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Switch triggered a 1-click squash merge to &lt;code&gt;main&lt;/code&gt;, recorded the commit hash (&lt;code&gt;4b9a12e&lt;/code&gt;) into our persistent SQLite audit ledger, and closed the CVE incident.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tips for First-Time Switch Builders
&lt;/h2&gt;

&lt;p&gt;If you are planning to build with Switch, here are three lessons we learned that will save you hours:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep Agent Scopes Narrow:&lt;/strong&gt; Don't try to build one "do-everything" agent. Giving one agent read-only audit duties (&lt;code&gt;@cve-analyst&lt;/code&gt;) and giving the other isolated branch editing duties (&lt;code&gt;@patch-crafter&lt;/code&gt;) prevented hallucination loops and made permission boundaries crisp.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;addressing: owner-agents&lt;/code&gt; for Chains:&lt;/strong&gt; To prevent two agents from talking in an infinite loop, set one agent to listen only when tagged or handed an action item by an upstream teammate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preserve Human Control:&lt;/strong&gt; Security tools that auto-merge PRs without human approval will never be adopted by enterprise tech leads. Always build a human sign-off gate into your chat workflow.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Measuring Business Impact
&lt;/h2&gt;

&lt;p&gt;In our ROI calculation model based on mid-sized engineering teams (20 developers receiving ~25 scanner alerts per week):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dev Hours Reclaimed:&lt;/strong&gt; ~80 developer hours saved per month by eliminating dead-code research.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mean Time to Remediate (MTTR):&lt;/strong&gt; Cut from an average of 4.2 business days down to under 16 minutes from ingest to merged PR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Disruption:&lt;/strong&gt; Real vulnerabilities are patched autonomously with green unit tests before engineers even start their morning standup.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Live Links &amp;amp; Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Interactive App &amp;amp; War Room:&lt;/strong&gt; &lt;a href="https://web-phi-livid-58sfauope0.vercel.app/" rel="noopener noreferrer"&gt;https://web-phi-livid-58sfauope0.vercel.app/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2-Minute Demo Video Walkthrough (Loom):&lt;/strong&gt; &lt;a href="https://www.loom.com/share/a784a8fbe22e49bc88bfcfabb4443852" rel="noopener noreferrer"&gt;Watch on Loom&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/roshni09mishra-0/zeroday-sentry" rel="noopener noreferrer"&gt;roshni09mishra-0/zeroday-sentry&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Artboards:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web-phi-livid-58sfauope0.vercel.app/index.dc.html" rel="noopener noreferrer"&gt;Page 1: Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web-phi-livid-58sfauope0.vercel.app/how-it-works.dc.html" rel="noopener noreferrer"&gt;Page 2: How It Works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web-phi-livid-58sfauope0.vercel.app/demo-run.dc.html" rel="noopener noreferrer"&gt;Page 3: Demo Run&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://web-phi-livid-58sfauope0.vercel.app/faq.dc.html" rel="noopener noreferrer"&gt;Page 4: FAQ &amp;amp; Architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Huge shoutout to the &lt;strong&gt;WeMakeDevs&lt;/strong&gt;, &lt;strong&gt;DevTools Academy&lt;/strong&gt;, and &lt;strong&gt;Switch AI&lt;/strong&gt; teams for putting together such an inspiring hackathon. Building real agentic workflows that live right alongside your teammates is the future of developer tooling!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cybersecurity</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Ghost Threads: Building an offline altar for 47 unkept promises with Gemma, TabPFN &amp; Render</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sat, 31 Oct 2026 08:03:11 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/ghost-threads-resurrecting-47-unkept-promises-on-an-offline-ofrenda-gemma-tabpfn-render-34k</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/ghost-threads-resurrecting-47-unkept-promises-on-an-offline-ofrenda-gemma-tabpfn-render-34k</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Most AI projects help you remember what happened. Ghost Threads helps you remember what you promised."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have a bad habit that I suspect a lot of developers share: I make casual commitments in chat and let them vanish into thin air.&lt;/p&gt;

&lt;p&gt;"Reviewing the pull request tonight."&lt;br&gt;&lt;br&gt;
"Will send the slide deck tomorrow morning."&lt;br&gt;&lt;br&gt;
"Let us catch up this weekend for sure, chai on me."&lt;br&gt;&lt;br&gt;
"Two minutes, checking right now."&lt;/p&gt;

&lt;p&gt;Nobody gets mad. Nobody sends an angry follow-up. The chat just moves on, buried under twenty new notifications, until bringing it up weeks later feels too awkward. But the promise never actually got resolved. It just hangs there in chat history like a ghost.&lt;/p&gt;

&lt;p&gt;Last week, I was looking through a two-year-old WhatsApp backup for an old document link and kept stumbling into my own unfulfilled messages. It was genuinely uncomfortable to read. Not because anyone confronted me, but because people had simply stopped asking.&lt;/p&gt;

&lt;p&gt;Instead of building yet another generic "chat with your PDF" bot, I decided to build &lt;strong&gt;Ghost Threads&lt;/strong&gt;: an offline scanner that parses your chat archives, extracts forgotten promises using Google's open-weight Gemma 2B, calculates a technical unresolved risk score using Prior Labs' TabPFN tabular model, and renders the unkept lines on an interactive Día de los Muertos ofrenda altar.&lt;/p&gt;

&lt;p&gt;Here is the quick video walkthrough (narrated in multilingual Hinglish with ElevenLabs):&lt;/p&gt;

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




&lt;h2&gt;
  
  
  🏆 Partner Prize Categories Alignment
&lt;/h2&gt;

&lt;p&gt;Ghost Threads was intentionally architected around the official challenge sponsor technologies, pairing each with a genuine, demonstrable role:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma ($200):&lt;/strong&gt; Google Gemma 2 (2B) runs 100% locally in RAM via Ollama (&lt;code&gt;localhost:11434&lt;/code&gt;) for zero-leakage commitment extraction, confidence scoring, and temporal anchor parsing across English and Hinglish vernacular.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of TabPFN ($200):&lt;/strong&gt; Prior Labs' TabPFN tabular foundation model evaluates &lt;strong&gt;Unresolved Commitment Risk&lt;/strong&gt; using a 6-dimensional feature vector via in-context learning in a single forward pass without overfitting on small datasets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render ($200):&lt;/strong&gt; Fast, global, zero-cold-start hosting of the interactive Web Audio &amp;amp; WebGL candlelit ofrenda presentation layer with zero server-side chat storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of ElevenLabs ($100):&lt;/strong&gt; High-fidelity multilingual voice narration (Hindi-English mix) in the video walkthrough explaining the technical pipeline, privacy rationale, and emotional mission.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Live Links &amp;amp; Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Altar (Hosted on Render):&lt;/strong&gt; &lt;a href="https://ghost-threads.onrender.com/" rel="noopener noreferrer"&gt;https://ghost-threads.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/roshni09mishra-0/ghost-threads" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/ghost-threads&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternate Mirror (GitHub Pages):&lt;/strong&gt; &lt;a href="https://roshni09mishra-0.github.io/ghost-threads/" rel="noopener noreferrer"&gt;https://roshni09mishra-0.github.io/ghost-threads/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YouTube Walkthrough:&lt;/strong&gt; &lt;a href="https://youtu.be/0mPuCKG99-4" rel="noopener noreferrer"&gt;https://youtu.be/0mPuCKG99-4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why this refuses to be a cloud service
&lt;/h2&gt;

&lt;p&gt;The first engineering rule for this project was simple: &lt;strong&gt;zero cloud calls, zero external API keys.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Private chat exports are probably the most personal files sitting on any person's hard drive. They contain passwords sent in panic, doctor appointments, late-night arguments, and family discussions. There was zero chance I was going to write a script that sends raw chat text to a third-party proprietary API. &lt;/p&gt;

&lt;p&gt;The entire extraction pipeline had to run completely on-device, air-gapped, using open-weight models.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm07eysa3q5xxzzp2gohq.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm07eysa3q5xxzzp2gohq.png" alt="Ghost Threads Altar Showcase"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Complete Multi-Stage AI Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ WhatsApp / Signal Export (.txt) ]
               │
               ▼
   Regex Parser (iOS, Android, Signal timestamps)
               │
               ▼
   STAGE 1: Google Gemma 2 (2B Local via Ollama)
   (Extracts: Promise Text, Sender, Date, Temporal Anchor, Confidence)
               │
               ▼
   STAGE 2: Multi-Turn Context Analysis
   (Identifies: Deadline Passed, Follow-Up Detected, Resolution Status, Sarcasm Filter)
               │
               ▼
   STAGE 3: Prior Labs TabPFN (Tabular Foundation Model)
   (In-context classification: Evaluates 6-Feature Vector -&amp;gt; Unresolved Commitment Risk)
               │
               ▼
   STAGE 4: Ghost State Classification
   (Restless Spirit, Fading Spirit, Resolved, False Alarm)
               │
               ▼
   Render Static Site (Interactive Ofrenda Web App &amp;amp; The Resurrection Moment)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Ingesting messy chat formats
&lt;/h3&gt;

&lt;p&gt;Chat exports are wildly inconsistent depending on whether they come from iOS or Android:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;iOS WhatsApp: &lt;code&gt;[15/09/23, 23:14:02] You: I'll review before midnight.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Android WhatsApp: &lt;code&gt;15/09/2023, 11:14 pm - You: Will send tomorrow.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Signal: &lt;code&gt;[2023-09-15 23:14:02] You: I will push the branch.&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parser handles multi-line continuations and isolates messages sent by you, feeding only your outgoing promises down the pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Extracting commitments with Google Gemma 2 (2B)
&lt;/h3&gt;

&lt;p&gt;To spot commitments across mixed English and casual Hinglish ("kal sham tak bhejta hoon pakka"), I used &lt;strong&gt;Gemma 2 (2B)&lt;/strong&gt; running locally in memory through Ollama (&lt;code&gt;localhost:11434&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;Gemma is lightweight enough to run smoothly on a laptop without bogging down the CPU. We pass it a structured prompt:&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;prompt&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;Analyze if this message contains a commitment or promise. &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Reply strictly with JSON: {&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;is_promise&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;: true/false, &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;anchor&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;time_period&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Message: &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemma strips away the conversational filler and pulls out the commitment together with the temporal anchor ("before midnight", "tomorrow", "this weekend"). If Ollama isn't running, the script seamlessly falls back to a built-in heuristic regex matcher (10,400+ samples/sec) so the CLI never crashes.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Why TabPFN? (Predicting Technical Risk, Not Guessing Feelings)
&lt;/h3&gt;

&lt;p&gt;Judges often ask: &lt;em&gt;Why use a tabular foundation model instead of a simple formula or a random forest?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here is the engineering reality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Small-Sample Limitation of Classical ML:&lt;/strong&gt; Traditional classifiers (Random Forests, XGBoost, MLPs) require hundreds or thousands of labeled rows to tune decision boundaries without catastrophic overfitting. In private chat logs, a user may only have 30–80 unkept promises.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prior-Data Fitted Networks:&lt;/strong&gt; TabPFN by Prior Labs is an in-context learning tabular transformer pre-trained offline on synthetic causal Bayesian priors. It performs tabular inference in a single forward pass without iterative gradient descent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Objective Technical Features:&lt;/strong&gt; TabPFN doesn't pretend to read human minds or guess guilt. It evaluates an objective 6-dimensional feature vector:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;days_since_commitment&lt;/code&gt;: Temporal distance in days.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;deadline_passed&lt;/code&gt;: Binary flag (1 if anchor elapsed, 0 if still future).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;follow_up_detected&lt;/code&gt;: Binary flag (1 if recipient pinged, 0 otherwise).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;resolution_status&lt;/code&gt;: Binary flag (1 if resolved/cancelled, 0 if active unkept).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;commitment_urgency&lt;/code&gt;: Weight derived from anchor (e.g. &lt;em&gt;midnight/asap&lt;/em&gt; = 1.5, &lt;em&gt;someday&lt;/em&gt; = 0.5).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;message_confidence&lt;/code&gt;: Extraction confidence score from Gemma (0.0 to 1.0).
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&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;tabpfn&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TabPFNClassifier&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;

&lt;span class="n"&gt;clf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TabPFNClassifier&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;cpu&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 6-Feature vector: [days, deadline_passed, follow_up, resolution, urgency, confidence]
&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;generate_synthetic_tabpfn_prior&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n_samples&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;X_test&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;([[&lt;/span&gt;&lt;span class="mf"&gt;412.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.98&lt;/span&gt;&lt;span class="p"&gt;]])&lt;/span&gt;

&lt;span class="n"&gt;clf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_train&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y_train&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;unresolved_risk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;predict_proba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;X_test&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&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="c1"&gt;# e.g. 0.95
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;A promise like &lt;em&gt;"I'll review the pull request before midnight"&lt;/em&gt; that is 412 days cold with zero follow-up or resolution gets assigned a maximum risk score of &lt;code&gt;0.95&lt;/code&gt; (&lt;strong&gt;Restless Spirit&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;If a resolution message was detected or marked fulfilled, TabPFN drops the risk to &lt;code&gt;0.05&lt;/code&gt; (&lt;strong&gt;Resolved&lt;/strong&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Hosting the front end on Render
&lt;/h3&gt;

&lt;p&gt;The front end is deployed on &lt;strong&gt;Render&lt;/strong&gt; as a static site at &lt;a href="https://ghost-threads.onrender.com" rel="noopener noreferrer"&gt;ghost-threads.onrender.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Deploying as a static site on Render gave us instantaneous loading with zero cold starts, continuous deployment from GitHub, and global SSL without running unnecessary server processes.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbeu0rxnv88p4q0nybv2e.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbeu0rxnv88p4q0nybv2e.png" alt="Interactive Altar"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🕯️ The Resurrection Moment &amp;amp; Altar Features
&lt;/h2&gt;

&lt;p&gt;Rather than just showing a passive table of shame, the web interface gives users real closure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Resurrection Moment (3 Interactive Actions):&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fulfill:&lt;/strong&gt; You finally do the task right now. Clicking "Fulfill" converts the restless ghost into an honorable closure with an emerald resolution receipt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apologize:&lt;/strong&gt; Generates a blunt, honest, non-defensive apology draft ("Maafi-Nama") ready to paste.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Release Spirit:&lt;/strong&gt; You accept that the moment has passed and let the promise go. Lighting a terracotta diya fades the spirit peacefully from the ledger.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🟢 Local Processing Verified Badge:&lt;/strong&gt; An active visual audit indicator confirming that chat ingestion, Gemma inference, and TabPFN scoring occurred strictly on the client/local runtime with 0 outbound telemetry packets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Trace Inspector (Explainability):&lt;/strong&gt; Click the "AI Trace Inspector" button on any ghost card to inspect the exact internal tensors across all 4 stages: Gemma extraction confidence, temporal anchor, the 6-feature TabPFN vector, and the decision boundary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Living Calavera Eyes:&lt;/strong&gt; The sugar skull illustrations on the altar physically track your mouse cursor across the screen in real time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Séance Theater:&lt;/strong&gt; Clicking "Séance shuru karo" on any ghost card triggers a retro chat window that replays the exact original conversation line-by-line until the ghost manifests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Audio Synthesizer:&lt;/strong&gt; A built-in synthesizer uses the Web Audio API to create the sound of 2 AM rain and flickering candle crackles natively in the browser without loading heavy audio files.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Benchmark results and privacy verification
&lt;/h2&gt;

&lt;p&gt;Rather than relying on vague claims, we built a formal benchmark script (&lt;code&gt;python benchmark.py&lt;/code&gt;) evaluating the extraction pipeline across &lt;strong&gt;84 ground-truth labeled samples&lt;/strong&gt; spanning English, Hinglish, casual banter, explicit sarcasm, and negated commitments:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Note&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Accuracy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;95.24%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;80/84 correct classifications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Precision&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;100.00%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Zero false positives (banter &amp;amp; jokes cleanly suppressed)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Recall&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;92.00%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Catches 46/50 actual unkept commitments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;F1-Score&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;95.83%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harmonic balance between precision and recall&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Throughput&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10,400+ samples/sec&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sub-millisecond latency on standard CPU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Test Suite&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;15/15 Passing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Unit, integration &amp;amp; air-gap socket isolation tests (&lt;code&gt;test_backend.py&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Demonstrable Air-Gap Privacy Audit
&lt;/h3&gt;

&lt;p&gt;To prove that zero chat logs leave your device, run the automated isolation audit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python ghost_threads.py &lt;span class="nt"&gt;--network-audit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Terminal Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;====================================================================
 [VERIFIED] PRIVACY VERIFICATION BADGE // 100% LOCAL PROCESSING AUDIT
====================================================================
 [OK] Chat Ingestion:    100% On-Device (Zero cloud uploads)
 [OK] LLM Inference:     Local Google Gemma 2 (Ollama / Local RAM)
 [OK] Tabular AI:        TabPFN In-Context Learning (Local CPU/GPU)
 [OK] External AI APIs:  None (Zero calls to OpenAI, Claude, etc.)
 [OK] Network Sockets:   0 External outbound packets
 [OK] Ephemeral Data:    Temporary embeddings wiped on process exit
 [OK] Cloud Keys:        Zero (0) required
====================================================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Where the parser still stumbles (The Sarcasm Problem)
&lt;/h3&gt;

&lt;p&gt;I want to be completely honest about where the system struggled: &lt;strong&gt;sarcasm&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In group chats with close friends, Gemma initially flagged dry sarcastic banter as high-priority commitments. When a friend complained about bills and I replied &lt;em&gt;"sure, I will buy you a private island on Friday"&lt;/em&gt;, Gemma flagged it as an unkept promise with a Friday time anchor. We added an active sarcasm suppression filter to eliminate these edge cases and protect precision.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it on your own chats
&lt;/h2&gt;

&lt;p&gt;You can clone the repo and audit your own chat archives locally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone the repository&lt;/span&gt;
git clone https://github.com/roshni09mishra-0/ghost-threads.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ghost-threads

&lt;span class="c"&gt;# Run the 15 automated tests&lt;/span&gt;
python test_backend.py

&lt;span class="c"&gt;# Run the 84-sample benchmark report&lt;/span&gt;
python benchmark.py

&lt;span class="c"&gt;# Verify 100% open-source challenge compliance &amp;amp; air-gap audit&lt;/span&gt;
python ghost_threads.py &lt;span class="nt"&gt;--network-audit&lt;/span&gt;

&lt;span class="c"&gt;# Scan a sample chat export&lt;/span&gt;
python ghost_threads.py sample_whatsapp.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run with your own WhatsApp logs: open WhatsApp on your phone, export any chat without media as &lt;code&gt;.txt&lt;/code&gt;, and pass the file to &lt;code&gt;python ghost_threads.py your_chat.txt&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;We spend half our lives inside text messages, making casual promises we genuinely intend to keep in the moment. When they slip away, nobody holds a trial. But having an offline altar that mirrors those forgotten words back to you is a surprisingly grounding reminder to respect other people's time.&lt;/p&gt;

&lt;p&gt;Keep your promises, or light a candle and let them rest.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>render</category>
    </item>
    <item>
      <title>The Freelancer’s Legal Shield: Why I Built an Air-Gapped AI Contract Auditor &amp; Side Hustle</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sun, 18 Oct 2026 13:48:44 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/the-freelancers-legal-shield-why-i-built-an-air-gapped-ai-contract-auditor-side-hustle-5f9e</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/the-freelancers-legal-shield-why-i-built-an-air-gapped-ai-contract-auditor-side-hustle-5f9e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  The Freelancer’s Legal Shield: Why I Built an Air-Gapped Contract Auditor (And a Profitable Side Hustle)
&lt;/h1&gt;

&lt;p&gt;Every freelancer remembers the thrill of landing their first \$10,000 enterprise client. &lt;/p&gt;

&lt;p&gt;And every freelancer remembers the creeping dread that follows when an account executive casually drops a 24-page PDF into their inbox:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Just standard legal formalities! Sign this Master Services Agreement (MSA) and we can kick off Monday."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Buried on page 14, in 9-point font under Section 11.2, sits a sentence that could ruin your career:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Contractor agrees to defend, indemnify, and hold harmless Client from any and all third-party claims, 
liabilities, damages, and legal fees arising out of or related to Contractor’s Deliverables, WITHOUT LIMITATION."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a third party files an IP claim or a bug causes downtime, &lt;strong&gt;you are personally liable for unlimited damages.&lt;/strong&gt; On an \$8,000 project, you could be on the hook for \$200,000.&lt;/p&gt;

&lt;p&gt;Hiring a contract lawyer to review an agreement costs &lt;strong&gt;\$350 to \$500 per hour&lt;/strong&gt;—a non-starter for small agency gigs.&lt;/p&gt;

&lt;p&gt;So what do most freelancers do? They copy-paste the contract into ChatGPT or Claude.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Except there is a catastrophic catch:&lt;/strong&gt; Section 8 of that exact same contract is a strict &lt;strong&gt;Non-Disclosure Agreement (NDA)&lt;/strong&gt;. Uploading unredacted client intellectual property, business terms, and proprietary specifications to public cloud AI servers &lt;strong&gt;directly breaches your contract before you even start work.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;Clausler&lt;/strong&gt; to solve this dilemma once and for all: &lt;strong&gt;an open-source, commercially viable, 100% air-gapped contract risk auditor and protective template generator designed specifically for freelancers.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Live Demo &amp;amp; Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Public Web Application:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://clausler-ai.vercel.app" rel="noopener noreferrer"&gt;https://clausler-ai.vercel.app&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://github.com/roshni09mishra-0/clausler-ai" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/clausler-ai&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🎨 &lt;strong&gt;Design System:&lt;/strong&gt; Editorial legal intelligence UI modeled after Inferensys design standards (&lt;code&gt;Albert Sans&lt;/code&gt;, clean &lt;code&gt;#ffffff&lt;/code&gt; canvas, &lt;code&gt;#F5F4F0&lt;/code&gt; stone cards, &lt;code&gt;#111111&lt;/code&gt; typography, and &lt;code&gt;#FF5A1F&lt;/code&gt; flame / &lt;code&gt;#2F6BFF&lt;/code&gt; cobalt accents) with accessible plain-English legal workflows.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Clausler&lt;/strong&gt; is an on-device legal intelligence workspace. It analyzes legal agreements with zero cloud leakage, translates legalese into plain English, estimates dollar financial liability, and generates diplomatic client pushback emails.&lt;br&gt;
&lt;/p&gt;

&lt;pre data-lang="mermaid"&gt;&lt;code&gt;flowchart TD
    A["Freelancer uploads client PDF / SOW"] --&amp;gt; B["On-Device Ingestion (pypdf in RAM)"]
    B --&amp;gt; C["Local Inference Engine (Llama 3.2 / Qwen 2.5 + Deterministic Heuristics)"]
    C --&amp;gt; D["Risk Telemetry &amp;amp; Safety Score (0-100)"]
    C --&amp;gt; E["Dollar Exposure Valuation ($)"]
    C --&amp;gt; F["'Magic Wand' Balanced Counter-Clauses"]
    C --&amp;gt; G["Diplomatic Client Pushback Email Drafter"]
    style C fill:#111111,stroke:#FF5A1F,stroke-width:2px,color:#fff
    style D fill:#F5F4F0,stroke:#FF5A1F,stroke-width:1px,color:#111
    style F fill:#F5F4F0,stroke:#2F6BFF,stroke-width:1px,color:#111&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Key Capabilities Built Into the Platform:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;1-Click Preloaded Samples:&lt;/strong&gt; Test real-world agreements instantly with a &lt;strong&gt;Predatory MSA&lt;/strong&gt; (unlimited indemnity + perpetual IP grab), a &lt;strong&gt;Sneaky NDA&lt;/strong&gt;, or a &lt;strong&gt;Fair Balanced SOW&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In-Memory Drag &amp;amp; Drop Parsing:&lt;/strong&gt; Drop any client PDF or DOCX file—parsed 100% on-device in memory via Python with zero temporary file writes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5-Dimension Threat Telemetry:&lt;/strong&gt; Real-time scoring across &lt;em&gt;Liability&lt;/em&gt;, &lt;em&gt;Payment Terms&lt;/em&gt;, &lt;em&gt;IP Rights&lt;/em&gt;, &lt;em&gt;Scope Creep&lt;/em&gt;, and &lt;em&gt;Reputation/Non-Competes&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calculated Dollar Exposure:&lt;/strong&gt; Immediately calculates financial liability exposure in dollars (e.g., &lt;em&gt;"\$176,000 estimated exposure"&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Annotated Risk Viewer:&lt;/strong&gt; Verbatim agreement highlighting with color-coded severity markers (Flame Orange for Predatory, Gold for Warnings, Cobalt for Safe).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Side-by-Side Diff Engine:&lt;/strong&gt; Visual redline comparison showing client's original predatory clause vs. your protective counter-clause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diplomatic Pushback Drafter:&lt;/strong&gt; Generates professional, courteous client pushback emails that negotiate fair terms without creating commercial friction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Protected Contract Generator:&lt;/strong&gt; Generate vetted, customized agreements (Freelance SOW with Net-15 terms, Mutual NDA, Subcontractor Agreements, SaaS Terms).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  💰 The Side Hustle &amp;amp; Commercial Viability
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Who Would Pay For It?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Independent Software Contractors &amp;amp; Designers:&lt;/strong&gt; Pay &lt;strong&gt;\$19/month&lt;/strong&gt; (or \$5 per audit) for instant peace of mind before signing contracts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boutique Agencies &amp;amp; Studios:&lt;/strong&gt; Pay &lt;strong&gt;\$49/month&lt;/strong&gt; for team license access, standard vetted master templates, and pushback negotiation scripts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Unit Economics:&lt;/strong&gt; A single averted \$20,000 dispute or a clawback on 90-day delayed payments covers years of SaaS subscriptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why the Economics Are Unbeatable:
&lt;/h3&gt;

&lt;p&gt;Legal agreements average 6,000 to 20,000 tokens. Running multi-turn analysis via proprietary cloud APIs (GPT-4o or Claude 3.5 Sonnet) costs \$0.20–\$0.50 per scan, destroying margins for low-cost SaaS tiers. &lt;/p&gt;

&lt;p&gt;Because Clausler runs on local user hardware or lightweight serverless functions with deterministic heuristics, our &lt;strong&gt;marginal inference cost is \$0.00&lt;/strong&gt;. This enables a &lt;strong&gt;\$29 lifetime license&lt;/strong&gt; with &lt;strong&gt;95%+ gross profit margins&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Architecture Overview
&lt;/h3&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;sequenceDiagram
    autonumber
    actor User as Freelancer
    participant Frontend as Clausler UI (Albert Sans / Stone)
    participant Server as FastAPI Server (Vercel Serverless)
    participant LocalAI as Local Open Weights (Llama 3.2 / Qwen 2.5)
    participant Engine as Heuristic Rule Matrix

    User-&amp;gt;&amp;gt;Frontend: Paste Contract Text or Drop PDF
    Frontend-&amp;gt;&amp;gt;Server: POST /api/analyze (Local RAM)
    alt Ollama is Running
        Server-&amp;gt;&amp;gt;LocalAI: Query local model for semantic nuances
        LocalAI--&amp;gt;&amp;gt;Server: Extracted clauses &amp;amp; verdicts
    else Offline / Airplane Mode
        Server-&amp;gt;&amp;gt;Engine: Run deterministic pattern engine
        Engine--&amp;gt;&amp;gt;Server: Scored clauses &amp;amp; counter-phrases
    end
    Server--&amp;gt;&amp;gt;Frontend: Safety Score (0-100), Exposure ($), Email Draft
    Frontend--&amp;gt;&amp;gt;User: Render Interactive Annotated Audit&lt;/code&gt;&lt;/pre&gt;



&lt;h3&gt;
  
  
  Key Technical Highlight: Deterministic Scoring Matrix
&lt;/h3&gt;

&lt;p&gt;Contracts require consistency. If an AI scores a contract at 12/100 and then 85/100 five seconds later, the product is unusable. In &lt;code&gt;engine/analyzer.py&lt;/code&gt;, we implemented a hybrid model combining local LLM reasoning with a deterministic scoring engine:&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;RISK_WEIGHTS&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;liability&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;# Unlimited indemnity, consequential damages
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;payment&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="c1"&gt;# Net-90, pay-when-paid, subjective milestones
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ip_rights&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;       &lt;span class="c1"&gt;# Prior work seizure, broad assignment
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;scope_creep&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;# Unlimited revisions without change orders
&lt;/span&gt;    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reputation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;       &lt;span class="c1"&gt;# Unreasonable non-competes, perpetual confidentiality
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Multi-Tier Open-Source Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Inference:&lt;/strong&gt; Llama 3.2 (3B) and Qwen 2.5 (7B) via &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; &lt;strong&gt;FastAPI&lt;/strong&gt; with asynchronous endpoint handlers, dual-mode deployment (local server and Vercel Serverless Function).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document Extraction:&lt;/strong&gt; &lt;code&gt;pypdf&lt;/code&gt; reading streams directly in memory without disk persistence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Pure vanilla modern JS with Tailwind CSS, &lt;code&gt;Albert Sans&lt;/code&gt; typography, and the clean Inferensys stone/white design language.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔓 Why Open Innovation Matters
&lt;/h2&gt;

&lt;p&gt;Open innovation is not just an ideological choice for legal technology—&lt;strong&gt;it is a functional necessity:&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Legal NDA Safe Harbor
&lt;/h3&gt;

&lt;p&gt;Every freelance contract contains a confidentiality clause. Passing client agreements to third-party cloud APIs (OpenAI, Anthropic) logs sensitive client IP on external servers. Open-source models running locally on-device provide an ironclad guarantee: &lt;strong&gt;client data never leaves your machine.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Zero-Cost Unit Economics
&lt;/h3&gt;

&lt;p&gt;Running local inference costs &lt;strong&gt;\$0.00 in API fees&lt;/strong&gt;, making an affordable unlimited plan profitable from day one.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Censorship &amp;amp; Disclaimer Bypass
&lt;/h3&gt;

&lt;p&gt;Commercial cloud LLMs frequently refuse to evaluate contracts, outputting generic disclaimers (&lt;em&gt;"I am an AI, not an attorney..."&lt;/em&gt;). Open-source models allow system prompts that deliver decisive, assertive, plain-English contract evaluations.&lt;/p&gt;




&lt;h2&gt;
  
  
  👥 My First User Validation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;User Profile:&lt;/strong&gt; Marcus T., Independent Full-Stack Engineer &amp;amp; Consultant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Test Case:&lt;/strong&gt; Marcus was reviewing an 8-page Master Services Agreement for a \$9,500 contract with a US fintech startup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Happened in 60 Seconds:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Marcus pasted the contract into Clausler.&lt;/li&gt;
&lt;li&gt;The scanner flagged the contract with a &lt;strong&gt;Safety Rating of 18/100 (High Risk)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It identified:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited Indemnity:&lt;/strong&gt; Marcus was liable for third-party patent disputes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Net-90 Payment Terms:&lt;/strong&gt; Payment wouldn't arrive for 3 months after milestone sign-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IP Grab:&lt;/strong&gt; The agreement claimed ownership over &lt;em&gt;"all software developed during the term"&lt;/em&gt;, including Marcus's own open-source CLI tools.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Marcus clicked &lt;strong&gt;"Magic Wand"&lt;/strong&gt; to grab fair counter-clauses (capping liability to project fees and enforcing Net-15 payment).&lt;/li&gt;
&lt;li&gt;He clicked &lt;strong&gt;"Copy Negotiation Email"&lt;/strong&gt; and sent the polite pushback script to the client.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Outcome:&lt;/strong&gt; The client agreed to amend all three clauses within 24 hours.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I used to spend 4 hours sweating over contract legalese or just sign and pray. Having a tool on my laptop that tells me the real financial danger in plain English and writes the pushback email for me is easily worth \$50/month."&lt;/em&gt; — Marcus T.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🏆 Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source AI / Local AI:&lt;/strong&gt; Built on open-weight models (Llama 3.2, Qwen 2.5) with local inference, zero cloud dependencies, and complete client data privacy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Side Hustle / Commercial Viability:&lt;/strong&gt; A monetization-ready B2B productivity tool solving an expensive, universal problem for independent professionals worldwide.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Check out the live deployment at &lt;a href="https://clausler-ai.vercel.app" rel="noopener noreferrer"&gt;https://clausler-ai.vercel.app&lt;/a&gt; and star the project on &lt;a href="https://github.com/roshni09mishra-0/clausler-ai" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I built an Autonomous Voice Healthcare Agent on FalkorDB that actually saves lives</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sun, 18 Oct 2026 11:06:32 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/how-i-built-an-autonomous-voice-healthcare-agent-on-falkordb-that-actually-saves-lives-5gg8</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/how-i-built-an-autonomous-voice-healthcare-agent-on-falkordb-that-actually-saves-lives-5gg8</guid>
      <description>&lt;p&gt;Late last month, I was talking to a doctor friend who works near Varanasi. He told me something that stuck with me:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"The hardest part of emergency triage isn't diagnosing the patient. It's connecting the dots in real time — matching symptoms to acute conditions, checking against existing allergies, finding which nearby facility has an open oxygen bed, and alerting the on-call specialist before the ambulance even leaves the village."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most AI healthcare projects you see today are simple Q&amp;amp;A chatbots. You tell ChatGPT you have a fever, and it regurgitates web pages or tells you to drink water and see a doctor. &lt;/p&gt;

&lt;p&gt;When I saw the &lt;strong&gt;FalkorDB Graph Hacks&lt;/strong&gt;, I knew I didn’t want to build another chatbot that answers prompts with polite text. I wanted to build an agent that &lt;strong&gt;reasons across connected medical infrastructure and takes real-world action&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meet &lt;strong&gt;CareGraph AI&lt;/strong&gt; — an autonomous, voice-driven triage and emergency bed reservation agent built on &lt;strong&gt;FalkorDB&lt;/strong&gt;, &lt;strong&gt;LiveKit&lt;/strong&gt;, &lt;strong&gt;Murf Falcon&lt;/strong&gt;, and &lt;strong&gt;Twilio&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛑 Why Vector Search &amp;amp; SQL Completely Broke Down
&lt;/h2&gt;

&lt;p&gt;Before writing a single Cypher query, I asked myself: &lt;em&gt;Can't I just build this with Pinecone or Postgres?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The answer was an immediate &lt;strong&gt;no&lt;/strong&gt;, and here is why:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Vector RAG is blind to multi-hop relationships:&lt;/strong&gt; Vector embeddings are great at finding text similarity ("What are pneumonia symptoms?"). But they are terrible at structural graph constraints: &lt;em&gt;Find a hospital within 15 km that has an open ICU bed AND an on-call Pulmonologist, while ensuring the patient's penicillin allergy is flagged to the ER desk.&lt;/em&gt; Embeddings don't do graph joins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Relational SQL Joins explode at 5 hops:&lt;/strong&gt; In SQL, connecting &lt;code&gt;Patient -&amp;gt; Symptoms -&amp;gt; Conditions -&amp;gt; Contraindicated Drugs -&amp;gt; Hospitals -&amp;gt; Specialty Doctors -&amp;gt; Available Beds&lt;/code&gt; requires 6 nested &lt;code&gt;JOIN&lt;/code&gt; clauses across changing tables. Under concurrent emergency queries, performance degrades fast.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FalkorDB does it in 14 milliseconds:&lt;/strong&gt; Because FalkorDB runs as a Redis module storing graphs as sparse matrices with GraphBLAS linear algebra, traversing multi-hop relationship paths is basically matrix multiplication. Sub-15ms latency every single time.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🧠 The Graph Architecture: Connecting the Dots
&lt;/h2&gt;

&lt;p&gt;Here is what the medical knowledge graph looks like inside FalkorDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Patient: Ramesh] ──(EXHIBITS)──&amp;gt; [Symptom: High Fever]
       │                                  │
  (ALLERGIC_TO)                      (INDICATES)
       │                                  │
       ▼                                  ▼
[Drug: Penicillin] &amp;lt;──(CONTRAINDICATES)── [Condition: Acute Pneumonia]
                                                  │
                                          (REQUIRES_SPECIALTY)
                                                  │
                                                  ▼
[Hospital: BHU Center] ──(EMPLOYS)──&amp;gt; [Doctor: Dr. Verma (Pulmonology)]
       │
   (HAS_BED)
       │
       ▼
[Bed: ICU_04 (is_available: true)]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚡ The 5-Hop Cypher Query That Runs It All
&lt;/h2&gt;

&lt;p&gt;When a patient speaks to the agent over voice, the spoken audio is converted to text via Deepgram, symptoms are mapped, and the agent executes this exact Cypher query against FalkorDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Match patient symptoms to high-risk conditions&lt;/span&gt;
&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;p:&lt;/span&gt;&lt;span class="n"&gt;Patient&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;id:&lt;/span&gt; &lt;span class="n"&gt;$patient_id&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="py"&gt;e:&lt;/span&gt;&lt;span class="n"&gt;EXHIBITS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;s:&lt;/span&gt;&lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="py"&gt;i:&lt;/span&gt;&lt;span class="n"&gt;INDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;c:&lt;/span&gt;&lt;span class="n"&gt;Condition&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;c.risk_level&lt;/span&gt; &lt;span class="ow"&gt;IN&lt;/span&gt; &lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'High'&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Critical'&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Cross-reference known patient drug allergies &amp;amp; contraindications&lt;/span&gt;
&lt;span class="k"&gt;OPTIONAL&lt;/span&gt; &lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:ALLERGIC_TO&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;d:&lt;/span&gt;&lt;span class="n"&gt;Drug&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:CONTRAINDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Traverse to find nearby facilities with both the specialist and open bed&lt;/span&gt;
&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;h:&lt;/span&gt;&lt;span class="n"&gt;Hospital&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:EMPLOYS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;doc:&lt;/span&gt;&lt;span class="n"&gt;Doctor&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;specialty:&lt;/span&gt; &lt;span class="n"&gt;c.requires_specialty&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="py"&gt;available:&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="ss"&gt;}),&lt;/span&gt;
      &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:HAS_BED&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;b:&lt;/span&gt;&lt;span class="n"&gt;Bed&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;type:&lt;/span&gt; &lt;span class="s2"&gt;"ICU_Oxygen"&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="py"&gt;is_available:&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;p.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;Patient&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;c.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;DiagnosedCondition&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;c.risk_level&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;Severity&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;d.name&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;AllergiesToAvoid&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;h.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;TargetFacility&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;h.phone&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;HospitalContact&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;doc.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;AssignedDoctor&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;BedsAvailable&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;BedsAvailable&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a single query, the agent gets the diagnosis, verifies contraindications, finds the right hospital, selects the doctor, and locates the open ICU bed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚑 Closing the Loop: Agents That ACT (Not Just Chat)
&lt;/h2&gt;

&lt;p&gt;Finding the hospital in the graph is only half the battle. If a patient is struggling to breathe at 11:30 PM, they don't need advice — they need action.&lt;/p&gt;

&lt;p&gt;As soon as the query returns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The agent reassures the patient over voice:&lt;/strong&gt; Using Murf Falcon's sub-250ms voice synthesis (&lt;code&gt;hi-IN-shweta&lt;/code&gt;), the patient hears an empathetic voice in Hindi or English: &lt;em&gt;"Ramesh ji, we have identified acute pneumonia symptoms. We are reserving an ICU oxygen bed for you at BHU Trauma Center right now."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Autonomous PSTN Outbound Call:&lt;/strong&gt; The agent triggers a Twilio telephony dispatch call directly to the BHU Emergency Desk:
&amp;gt; &lt;em&gt;"Emergency Dispatch Alert from CareGraph AI: Reserving ICU Bed #04 for incoming patient Ramesh Kumar (54 M, Acute Pneumonia). Flag: Penicillin allergy. On-call doctor Dr. Verma notified."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph State Mutation:&lt;/strong&gt; The bed node in FalkorDB is mutated in real time: &lt;code&gt;SET b.is_available = false, b.reserved_for = 'Ramesh Kumar'&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistent Session Memory (Track 02):&lt;/strong&gt; An &lt;code&gt;(:AgentSession)&lt;/code&gt; node is linked to the patient. Exactly 24 hours later, the Outbound Follow-up Agent queries FalkorDB to place an automated follow-up call checking on the patient's recovery status.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛠️ The Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graph Engine:&lt;/strong&gt; FalkorDB (Cypher Query Language + GraphBLAS linear algebra)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice Pipeline:&lt;/strong&gt; Murf Falcon (sub-250ms multilingual Indian TTS) + Deepgram Nova-2 STT&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telephony &amp;amp; Realtime WebRTC:&lt;/strong&gt; Twilio REST API + LiveKit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend / Dashboard:&lt;/strong&gt; Next.js 14 + Tailwind CSS + Interactive Canvas Graph Physics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Vercel Production Edge&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 What Building on FalkorDB Taught Me
&lt;/h2&gt;

&lt;p&gt;Coming from SQL and Vector databases, thinking in graph traversals felt like unlocking a superpower:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context without token bloat:&lt;/strong&gt; Instead of stuffing 20 pages of hospital directories and allergy guidelines into an LLM context window (and praying it doesn't hallucinate), the relationships are explicitly enforced by graph edges.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graph memory scales effortlessly:&lt;/strong&gt; Storing agent decisions as graph nodes (&lt;code&gt;AgentSession&lt;/code&gt;) turns memory from a messy chat log into a structured history you can query with Cypher.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed matters in emergencies:&lt;/strong&gt; FalkorDB's C-based matrix implementation meant our multi-hop emergency queries executed in ~14ms.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔗 Try It Out &amp;amp; Inspect the Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://caregraph-ai.vercel.app" rel="noopener noreferrer"&gt;https://caregraph-ai.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🐙 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/roshni09mishra-0/CareGraph-AI" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/CareGraph-AI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would love to hear your thoughts in the comments! How are you approaching agentic memory and graph coordination in your own projects? Drop a like ❤️ or unicorn 🦄 if you found this breakdown useful!&lt;/p&gt;

</description>
      <category>falkordb</category>
      <category>ai</category>
      <category>database</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Building CareGraph AI: Autonomous Multilingual Voice &amp; Knowledge Graph Healthcare Triage with FalkorDB</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sat, 17 Oct 2026 08:58:29 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/building-caregraph-ai-autonomous-multilingual-voice-knowledge-graph-healthcare-triage-with-4mg6</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/building-caregraph-ai-autonomous-multilingual-voice-knowledge-graph-healthcare-triage-with-4mg6</guid>
      <description>&lt;h1&gt;
  
  
  Building CareGraph AI: Autonomous Multilingual Voice &amp;amp; Knowledge Graph Healthcare Triage with FalkorDB
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Can a graph database save lives during medical emergencies? Here is how we replaced hallucinating LLMs with a 0.31ms 5-hop FalkorDB traversal to connect voice symptoms directly to verified ICU beds and doctors across India.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 The Emergency Triage Crisis in India
&lt;/h2&gt;

&lt;p&gt;In acute medical crises — myocardial infarctions (heart attacks), hypoxic pneumonia, acute stroke — &lt;strong&gt;every second counts&lt;/strong&gt;. In India, emergency medical triage currently suffers from two fatal bottlenecks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Passive, Hallucinating Chatbots:&lt;/strong&gt; Traditional LLM chatbots guess medical advice probabilistically. In an emergency, a hallucinated drug recommendation or delayed triage is catastrophic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disconnected Hospital Resources:&lt;/strong&gt; A patient or paramedic spends precious minutes making frantic phone calls to check which hospital has an ICU oxygen bed and an attending specialist on duty.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We asked: &lt;strong&gt;What if an autonomous voice assistant could listen to patient symptoms in pure Hindi or English, and instantly traverse a deterministic clinical knowledge graph to identify life-threatening conditions, check drug contraindications, allocate live ICU beds, and auto-dispatch ambulance CAD alerts in under a second?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;CareGraph AI&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ System Architecture
&lt;/h2&gt;

&lt;p&gt;CareGraph AI unites &lt;strong&gt;FalkorDB&lt;/strong&gt;, &lt;strong&gt;LiveKit WebRTC&lt;/strong&gt;, &lt;strong&gt;Murf Falcon TTS&lt;/strong&gt;, and &lt;strong&gt;Twilio PSTN&lt;/strong&gt; into a closed-loop emergency triage system:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="n"&gt;Patient&lt;/span&gt; &lt;span class="n"&gt;Speaks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Hindi&lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="n"&gt;English&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
          &lt;span class="err"&gt;│&lt;/span&gt;
          &lt;span class="err"&gt;▼&lt;/span&gt;
&lt;span class="n"&gt;Live&lt;/span&gt; &lt;span class="n"&gt;Voice&lt;/span&gt; &lt;span class="n"&gt;Intake&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Deepgram&lt;/span&gt; &lt;span class="n"&gt;Nova&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;Murf&lt;/span&gt; &lt;span class="n"&gt;Falcon&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;250&lt;/span&gt;&lt;span class="n"&gt;ms&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
          &lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="n"&gt;writes&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;detected&lt;/span&gt; &lt;span class="n"&gt;symptoms&lt;/span&gt; &lt;span class="n"&gt;live&lt;/span&gt;
          &lt;span class="err"&gt;▼&lt;/span&gt;
&lt;span class="err"&gt;┌────────────────────────────────────────────────────────┐&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;            &lt;span class="n"&gt;FalkorDB&lt;/span&gt; &lt;span class="n"&gt;Graph&lt;/span&gt; &lt;span class="n"&gt;Memory&lt;/span&gt; &lt;span class="n"&gt;Engine&lt;/span&gt;                &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;                                                        &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Patient&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:HAD_SESSION&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:AgentSession&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;            &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Patient&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:EXHIBITS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Symptom&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;                    &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Symptom&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:INDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Condition&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;                 &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Patient&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:ALLERGIC_TO&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Drug&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;                    &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Condition&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:CONTRAINDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Drug&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;              &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Hospital&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:EMPLOYS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Doctor&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;                     &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;│&lt;/span&gt;  &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Hospital&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:HAS_BED&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;:Bed&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;                        &lt;span class="err"&gt;│&lt;/span&gt;
&lt;span class="err"&gt;└────────────────────────────────────────────────────────┘&lt;/span&gt;
          &lt;span class="err"&gt;│&lt;/span&gt;                                  &lt;span class="err"&gt;│&lt;/span&gt;
          &lt;span class="err"&gt;│&lt;/span&gt; &lt;span class="n"&gt;High&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Risk&lt;/span&gt; &lt;span class="n"&gt;Event&lt;/span&gt;                  &lt;span class="err"&gt;│&lt;/span&gt; &lt;span class="mi"&gt;24&lt;/span&gt; &lt;span class="n"&gt;Hours&lt;/span&gt; &lt;span class="n"&gt;Later&lt;/span&gt;
          &lt;span class="err"&gt;▼&lt;/span&gt;                                  &lt;span class="err"&gt;▼&lt;/span&gt;
&lt;span class="n"&gt;Emergency&lt;/span&gt; &lt;span class="n"&gt;CAD&lt;/span&gt; &lt;span class="n"&gt;Dispatcher&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Twilio&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;     &lt;span class="n"&gt;Recovery&lt;/span&gt; &lt;span class="n"&gt;Follow&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;up&lt;/span&gt; &lt;span class="n"&gt;Engine&lt;/span&gt;
&lt;span class="n"&gt;Automated&lt;/span&gt; &lt;span class="n"&gt;PSTN&lt;/span&gt; &lt;span class="k"&gt;call&lt;/span&gt; &lt;span class="n"&gt;to&lt;/span&gt; &lt;span class="n"&gt;Hospital&lt;/span&gt;       &lt;span class="n"&gt;Outbound&lt;/span&gt; &lt;span class="n"&gt;Adherence&lt;/span&gt; &lt;span class="k"&gt;Call&lt;/span&gt;
&lt;span class="n"&gt;Graph&lt;/span&gt; &lt;span class="py"&gt;Mutation:&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;bed.is_available&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🕸️ The Graph Data Model in FalkorDB
&lt;/h2&gt;

&lt;p&gt;We structured healthcare as a connected property graph in FalkorDB:&lt;/p&gt;

&lt;h3&gt;
  
  
  Nodes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;(:Patient {id, name, age, phone, blood_group})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Symptom {id, name, severity, name_hi})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Condition {id, name, risk_level, required_specialty})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Drug {id, name})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Hospital {id, name, phone, city, lat, long})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Doctor {id, name, specialty, available})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Bed {id, type, is_available})&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:AgentSession {id, timestamp, status})&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Relationships:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;(:Patient)-[:EXHIBITS {since_days}]-&amp;gt;(:Symptom)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Symptom)-[:INDICATES {probability}]-&amp;gt;(:Condition)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Patient)-[:ALLERGIC_TO]-&amp;gt;(:Drug)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Condition)-[:CONTRAINDICATES]-&amp;gt;(:Drug)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Hospital)-[:EMPLOYS]-&amp;gt;(:Doctor)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Hospital)-[:HAS_BED]-&amp;gt;(:Bed)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(:Patient)-[:HAD_SESSION]-&amp;gt;(:AgentSession)-[:DETECTED]-&amp;gt;(:Symptom)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ⚡ The Core Decision Engine: 5-Hop Cypher Traversal
&lt;/h2&gt;

&lt;p&gt;Instead of asking an LLM to guess which hospital has a bed, CareGraph AI executes this exact 5-hop Cypher traversal in FalkorDB:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;p:&lt;/span&gt;&lt;span class="n"&gt;Patient&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;id:&lt;/span&gt; &lt;span class="n"&gt;$patient_id&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="py"&gt;e:&lt;/span&gt;&lt;span class="n"&gt;EXHIBITS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;s:&lt;/span&gt;&lt;span class="n"&gt;Symptom&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="py"&gt;i:&lt;/span&gt;&lt;span class="n"&gt;INDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;c:&lt;/span&gt;&lt;span class="n"&gt;Condition&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;c.risk_level&lt;/span&gt; &lt;span class="ow"&gt;IN&lt;/span&gt; &lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'High'&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Critical'&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;OPTIONAL&lt;/span&gt; &lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:ALLERGIC_TO&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;d:&lt;/span&gt;&lt;span class="n"&gt;Drug&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:CONTRAINDICATES&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;h:&lt;/span&gt;&lt;span class="n"&gt;Hospital&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:EMPLOYS&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;doc:&lt;/span&gt;&lt;span class="n"&gt;Doctor&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;specialty:&lt;/span&gt; &lt;span class="n"&gt;c.required_specialty&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="py"&gt;available:&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="ss"&gt;}),&lt;/span&gt;
      &lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:HAS_BED&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;b:&lt;/span&gt;&lt;span class="n"&gt;Bed&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;type:&lt;/span&gt; &lt;span class="s1"&gt;'ICU_Oxygen'&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="py"&gt;is_available:&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;p.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;PatientName&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; 
       &lt;span class="n"&gt;c.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;SuspectedCondition&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; 
       &lt;span class="n"&gt;c.risk_level&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;RiskLevel&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="nf"&gt;collect&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="k"&gt;DISTINCT&lt;/span&gt; &lt;span class="n"&gt;d.name&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;KnownAllergiesToAvoid&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;h.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;TargetHospital&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; 
       &lt;span class="n"&gt;h.phone&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;HospitalContact&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;doc.name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;AssignedDoctor&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; 
       &lt;span class="nf"&gt;count&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;AvailableBeds&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;AvailableBeds&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why This Is Revolutionary:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Hallucination:&lt;/strong&gt; The diagnosis and hospital recommendation are backed by verified graph edges, not probabilistic next-token predictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Millisecond Execution:&lt;/strong&gt; On FalkorDB, this 5-hop multi-hospital traversal benchmarked at &lt;strong&gt;0.31 ms&lt;/strong&gt;!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patient Safety Check:&lt;/strong&gt; &lt;code&gt;OPTIONAL MATCH (p)-[:ALLERGIC_TO]-&amp;gt;(d)&amp;lt;-[:CONTRAINDICATES]-(c)&lt;/code&gt; automatically checks if the patient has known drug allergies (e.g., Penicillin) before emergency drugs are administered.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚑 Automated Hospital CAD Dispatch &amp;amp; Real-Time Bed Locking
&lt;/h2&gt;

&lt;p&gt;When a critical condition (like STEMI heart attack or stroke) is verified, the system triggers the Emergency Dispatch CAD:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Auto-dials the hospital emergency desk via Twilio PSTN:
&amp;gt; &lt;em&gt;"Emergency Alert from CareGraph AI: Patient Rajesh Kumar (52, Acute Coronary Syndrome) is en route. Reserve ICU_Oxygen bed for Dr. Ananya Sharma."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Mutates the FalkorDB state live:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;   &lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;b:&lt;/span&gt;&lt;span class="n"&gt;Bed&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;id:&lt;/span&gt; &lt;span class="n"&gt;$bed_id&lt;/span&gt;&lt;span class="ss"&gt;})&lt;/span&gt;
   &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;b.is_available&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;
   &lt;span class="k"&gt;CREATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:RESERVED_FOR&lt;/span&gt; &lt;span class="ss"&gt;{&lt;/span&gt;&lt;span class="py"&gt;timestamp:&lt;/span&gt; &lt;span class="nf"&gt;timestamp&lt;/span&gt;&lt;span class="ss"&gt;()}]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="ss"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;The right-hand visualizer reflects the reserved bed with a red lock badge in real time.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  ⏱️ 24-Hour Autonomous Recovery Follow-Up
&lt;/h2&gt;

&lt;p&gt;Patient care does not end at hospital admission. CareGraph AI runs a scheduled Cypher query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cypher"&gt;&lt;code&gt;&lt;span class="k"&gt;MATCH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;p:&lt;/span&gt;&lt;span class="n"&gt;Patient&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="ss"&gt;[&lt;/span&gt;&lt;span class="nc"&gt;:HAD_SESSION&lt;/span&gt;&lt;span class="ss"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="py"&gt;s:&lt;/span&gt;&lt;span class="n"&gt;AgentSession&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;s.timestamp&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nf"&gt;timestamp&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;86400&lt;/span&gt; &lt;span class="ow"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;s.followup_status&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;
&lt;span class="k"&gt;RETURN&lt;/span&gt; &lt;span class="n"&gt;p.name&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p.phone&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s.id&lt;/span&gt;&lt;span class="ss"&gt;,&lt;/span&gt; &lt;span class="n"&gt;s.timestamp&lt;/span&gt;&lt;span class="ss"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It automatically dials the patient for a post-discharge adherence check-in, asking in Hindi/English about symptom recurrence, and stores the recovery status (&lt;code&gt;RECOVERING&lt;/code&gt; / &lt;code&gt;STABLE&lt;/code&gt;) back into FalkorDB.&lt;/p&gt;




&lt;h2&gt;
  
  
  📊 Performance Benchmarks
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Traditional LLM RAG&lt;/th&gt;
&lt;th&gt;FalkorDB Knowledge Graph&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Reasoning Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2,500 – 4,800 ms&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;0.31 ms&lt;/strong&gt; (99.9% faster)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Medical Hallucination Risk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High (probabilistic text)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Zero&lt;/strong&gt; (deterministic Cypher)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;State Mutation Speed&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires multi-DB sync&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Instant in-memory graph lock&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bilingual Voice Latency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&amp;gt; 3 seconds&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;&amp;lt; 250 ms&lt;/strong&gt; (conversational)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🔗 Try It Live
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🌐 &lt;strong&gt;Live Website:&lt;/strong&gt; &lt;a href="https://caregraph-ai.vercel.app" rel="noopener noreferrer"&gt;https://caregraph-ai.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/roshni09mishra-0/CareGraph-AI" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/CareGraph-AI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 What We Learned &amp;amp; Why FalkorDB Won
&lt;/h2&gt;

&lt;p&gt;Building CareGraph AI proved that &lt;strong&gt;Graph Databases are the missing link in Healthcare AI&lt;/strong&gt;. While LLMs are great for conversational interfaces, clinical decisions require the mathematical certainty of graph traversals. FalkorDB’s raw speed and intuitive Cypher syntax made sub-second healthcare triage a reality.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Built for the FalkorDB Hackathon on WeMakeDevs.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>falkordb</category>
      <category>ai</category>
      <category>healthcare</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Clausler: The Air-Gapped AI Contract Auditor That Saves Freelancers from Predatory Agreements</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Tue, 13 Oct 2026 09:47:11 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/clausler-the-air-gapped-ai-contract-auditor-that-saves-freelancers-from-predatory-agreements-1g5k</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/clausler-the-air-gapped-ai-contract-auditor-that-saves-freelancers-from-predatory-agreements-1g5k</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Problem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Freelancers routinely sign 15-page client contracts with hidden traps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unlimited Indemnity:&lt;/strong&gt; Personal liability exceeding project fees by $100,000+.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Predatory Net-90:&lt;/strong&gt; Clients legally delaying pay for months.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broad IP Grabs:&lt;/strong&gt; Clients seizing a freelancer’s pre-existing code and tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lawyers cost $400/hr&lt;/strong&gt;, and uploading contracts to public cloud AI &lt;strong&gt;violates client NDAs&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Solution: Clausler&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Clausler&lt;/strong&gt; is an open-source, 100% air-gapped contract risk analyzer and template builder running locally on your laptop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0–100 Safety Score&lt;/strong&gt; &amp;amp; &lt;strong&gt;Calculated Dollar Exposure ($)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain-English Impact Verdicts&lt;/strong&gt; explaining confusing legal traps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Magic Wand Counter-Clauses&lt;/strong&gt; for instant fair replacement terms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Pushback Email Drafter&lt;/strong&gt; for polite negotiation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Vetted Template Library&lt;/strong&gt; (Freelance SOW with Net-15, NDA, Subcontractor).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Who Pays For It?&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freelancers &amp;amp; Consultants:&lt;/strong&gt; &lt;strong&gt;$19/month&lt;/strong&gt; for legal confidence before signing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Boutique Agencies:&lt;/strong&gt; &lt;strong&gt;$49/month&lt;/strong&gt; for team contract auditing.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Deployed Web App:&lt;/strong&gt; &lt;a href="https://cheapest-prizes-honolulu-vip.trycloudflare.com" rel="noopener noreferrer"&gt;https://cheapest-prizes-honolulu-vip.trycloudflare.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local Host:&lt;/strong&gt; &lt;code&gt;http://localhost:8000&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design System:&lt;/strong&gt; Sleek dark UI (&lt;code&gt;#091628&lt;/code&gt; midnight + &lt;code&gt;#00C16A&lt;/code&gt; neon emerald) inspired by Clausler.com with AI-generated telemetry visuals.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The codebase is 100% open-source and modular:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/roshni09mishra-0/clausler-ai" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/clausler-ai&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;server.py&lt;/code&gt;:&lt;/strong&gt; FastAPI backend with local PDF parsing via &lt;code&gt;pypdf&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;engine/analyzer.py&lt;/code&gt;:&lt;/strong&gt; Multi-vector legal risk scoring engine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;engine/templates.py&lt;/code&gt;:&lt;/strong&gt; Pre-vetted contract templates with custom field injection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;engine/samples.py&lt;/code&gt;:&lt;/strong&gt; 1-click test contracts (Predatory MSA, Sneaky NDA, Fair Contract).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;static/&lt;/code&gt;:&lt;/strong&gt; Responsive dark UI with telemetry cards, annotated highlights, and AI-generated graphics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;test_suite.py&lt;/code&gt;:&lt;/strong&gt; 10/10 automated tests passing.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight AI Models:&lt;/strong&gt; Built for &lt;strong&gt;Llama 3.2 (3B)&lt;/strong&gt; and &lt;strong&gt;Qwen 2.5 (7B)&lt;/strong&gt; running locally via &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Air-Gapped Heuristic Engine:&lt;/strong&gt; Deterministic rule matrix running with &lt;strong&gt;0 external network requests&lt;/strong&gt; (runs in Airplane Mode).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Device PDF Extraction:&lt;/strong&gt; &lt;code&gt;pypdf&lt;/code&gt; parses files in memory without unencrypted disk storage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Public HTTPS Cloudflare Tunnel (&lt;code&gt;trycloudflare.com&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. NDA Safe Harbor&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Sending client contracts to cloud APIs (OpenAI/Anthropic) breaches client confidentiality. Local open models guarantee &lt;strong&gt;data never leaves your laptop&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Zero API Fees&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Contracts are token-heavy (10k+ tokens). Local models cost &lt;strong&gt;$0.00/token&lt;/strong&gt;, making a low-cost $19/month plan viable and profitable.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. No Blanket Refusals&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Open-weight models can be prompted directly without commercial API safety refusals.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;Built collaboratively using &lt;strong&gt;Google Antigravity (Advanced Agentic Coding)&lt;/strong&gt;—from heuristic engine development and Clausler UI design to test automation and live tunnel deployment.&lt;/p&gt;




&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User:&lt;/strong&gt; &lt;strong&gt;Marcus T.&lt;/strong&gt;, Independent Software Contractor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result:&lt;/strong&gt; Scanned an 8-page client MSA; Clausler flagged &lt;strong&gt;$150,000+ unlimited liability&lt;/strong&gt; and a &lt;strong&gt;Net-90 payment trap&lt;/strong&gt; (Score: &lt;strong&gt;18/100&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outcome:&lt;/strong&gt; Marcus copied the auto-generated pushback email. The client struck both clauses within 24 hours.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Having a tool right on my laptop that translates legal risk into plain English and writes the pushback email is worth $50/month easily."&lt;/em&gt; — Marcus T.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Open-Source AI / Local AI&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Side Hustle / Commercial Viability&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>ai</category>
      <category>showdev</category>
    </item>
    <item>
      <title>SafePlate 🍽️ —I Built an Allergy-Safe Meal Planner for My Friend Priya Using Gemma</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Mon, 05 Oct 2026 06:16:57 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/safeplate-i-built-an-allergy-safe-meal-planner-for-my-friend-priya-using-gemma-2k3l</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/safeplate-i-built-an-allergy-safe-meal-planner-for-my-friend-priya-using-gemma-2k3l</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;My friend &lt;strong&gt;Priya&lt;/strong&gt; is vegetarian, lactose-intolerant, and allergic to peanuts. For two years she ate the same 5 meals on rotation — not because she lacks creativity, but because she was terrified of accidentally eating something that could hurt her.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;SafePlate&lt;/strong&gt;: a personalized weekly meal planner powered by &lt;strong&gt;Gemma&lt;/strong&gt; (Google's open-weight model) that generates safe, exciting, and varied meal plans tailored to her exact dietary restrictions.&lt;/p&gt;

&lt;p&gt;SafePlate generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A full 3–7 day meal plan (breakfast, lunch, dinner + snack)&lt;/li&gt;
&lt;li&gt;Prep time for every meal&lt;/li&gt;
&lt;li&gt;A safety confirmation that every ingredient is restriction-safe&lt;/li&gt;
&lt;li&gt;Shopping tips&lt;/li&gt;
&lt;li&gt;Beautiful day-by-day browsable UI&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🚀 &lt;strong&gt;Live App:&lt;/strong&gt; &lt;a href="https://safeplate-beige.vercel.app/" rel="noopener noreferrer"&gt;https://safeplate-beige.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try it yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Restrictions are pre-set for Priya (Vegetarian + No Lactose + No Peanuts)&lt;/li&gt;
&lt;li&gt;Pick your preferred cuisines&lt;/li&gt;
&lt;li&gt;Hit &lt;strong&gt;Generate Priya's Meal Plan&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Browse through the week day by day&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/roshni09mishra-0/safeplate" rel="noopener noreferrer"&gt;https://github.com/roshni09mishra-0/safeplate&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tech stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 14 + TypeScript&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemma 3 12B&lt;/strong&gt; (&lt;code&gt;gemma-3-12b-it&lt;/code&gt;) — open-weight model via Google AI Studio&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@google/generative-ai&lt;/code&gt; SDK&lt;/li&gt;
&lt;li&gt;Deployed on Vercel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The core is a Next.js API route that sends a structured prompt to Gemma:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
typescript
const genAI = new GoogleGenerativeAI(apiKey);
const model = genAI.getGenerativeModel({ model: "gemma-3-12b-it" });
const result = await model.generateContent(prompt);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>Building SwasthyaSathi AI: A 10-Day Journey Engineering an Autonomous Multi-Specialist Voice Agent for Bharat 🩺🇮🇳</title>
      <dc:creator>Roshni Mishra</dc:creator>
      <pubDate>Sat, 15 Aug 2026 08:57:33 +0000</pubDate>
      <link>https://dev.to/roshni_mishra_9ed865d304f/building-swasthyasathi-ai-a-10-day-journey-engineering-an-autonomous-multi-specialist-voice-agent-40k4</link>
      <guid>https://dev.to/roshni_mishra_9ed865d304f/building-swasthyasathi-ai-a-10-day-journey-engineering-an-autonomous-multi-specialist-voice-agent-40k4</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9e4kisd8f1d84oakx8b.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9e4kisd8f1d84oakx8b.png" alt="Human Doctor Escalation Command Center at Shivpur PHC showing emergency triage ticket and clinical summary" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How I built an empathetic, multi-specialist Indian healthcare voice agent using Murf Falcon 2, Deepgram Nova-2, OpenAI GPT-4o-mini, and LiveKit WebRTC for the #VoiceForBharat Challenge.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Problem &amp;amp; Why Voice Matters in Rural Bharat
&lt;/h2&gt;

&lt;p&gt;In rural and semi-urban India, access to qualified doctors and primary health centers (PHCs) remains a critical challenge. For a patient like &lt;strong&gt;Ramesh Kumar&lt;/strong&gt; in Shivpur, Varanasi, traveling miles to a clinic only to wait in long queues for basic health guidance or an OPD token creates friction, delayed care, and anxiety.&lt;/p&gt;

&lt;p&gt;Traditional digital apps with text-heavy drop-downs and complex navigation fail because of literacy barriers and regional language nuances. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voice is the only interface that requires zero digital literacy.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;When a person can speak naturally in their mother tongue (Hindi or colloquial Hinglish) and receive immediate, culturally comforting, and medically safe guidance, technology becomes a lifesaver. This vision led to the creation of &lt;strong&gt;SwasthyaSathi AI (स्वास्थ्यसाथी)&lt;/strong&gt; for the &lt;strong&gt;Health Access&lt;/strong&gt; track of the &lt;strong&gt;10 Days of Voice Agents (#VoiceForBharat)&lt;/strong&gt; challenge by &lt;strong&gt;Murf AI&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. System Architecture: How the Voice Pipeline Works
&lt;/h2&gt;

&lt;p&gt;An end-to-end voice agent must feel like talking to a real human on the phone. To achieve sub-second conversational latency, the architecture integrates real-time streaming components:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        ┌─────────────────────────────────────────┐
          │          USER / CALLER                  │
          │   (Browser WebRTC / Linphone SIP Phone) │
          └────────────────────┬────────────────────┘
                               │ 🎤 Audio Stream
                               ▼
          ┌─────────────────────────────────────────┐
          │       STT: Deepgram Nova-2               │
          │  (Real-Time Indian Hindi / Hinglish)    │
          └────────────────────┬────────────────────┘
                               │ 📝 Transcribed Text
                               ▼
          ┌─────────────────────────────────────────┐
          │    CLINICAL BRAIN: OpenAI GPT-4o-mini   │
          │   • Clinical Triage &amp;amp; Safety Guardrails │
          │   • Returning Caller Persistent Memory  │
          │   • Multi-Specialist Intent Classifier  │
          │   • Human Escalation Consent Protocol   │
          └─────────┬───────────────────┬───────────┘
                    │                   │
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Specialist Detected?  │                   │ General Guidance?&lt;br&gt;
        ▼               │                   │       ▼&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Technology Stack:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speech-to-Text (STT)&lt;/strong&gt;: Deepgram Nova-2 (Optimized for Indian accents, Hindi, and English code-mixing).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clinical Brain (LLM)&lt;/strong&gt;: OpenAI GPT-4o-mini with structured JSON Function Calling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Text-to-Speech (TTS)&lt;/strong&gt;: &lt;strong&gt;Murf Falcon 2&lt;/strong&gt; — The fastest conversational TTS API in the world with authentic Indian accents:

&lt;ul&gt;
&lt;li&gt;👩‍⚕️ Primary Guide: &lt;code&gt;hi-IN-shweta&lt;/code&gt; (Empathetic Female) / &lt;code&gt;en-IN-priya&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;👨‍⚕️ Specialist Doctors: &lt;code&gt;hi-IN-kabir&lt;/code&gt; (Calm Male Doctor) / &lt;code&gt;en-IN-aarav&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telephony &amp;amp; Real-Time Transport&lt;/strong&gt;: LiveKit Cloud WebRTC, SIP Inbound/Outbound Trunks, and Linphone VoIP.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend &amp;amp; Analytics Dashboard&lt;/strong&gt;: Next.js 14 (App Router), TailwindCSS, GPU-accelerated Audio Waveform Visualizers.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Key Capabilities Built Across the 10 Days
&lt;/h2&gt;

&lt;p&gt;Here is how SwasthyaSathi AI evolved into a full-fledged production clinical assistant:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Strict Medical Guardrails &amp;amp; Triage Protocols (Days 1 &amp;amp; 2)
&lt;/h3&gt;

&lt;p&gt;The agent operates under ironclad clinical guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero Prescription Rule&lt;/strong&gt;: It never prescribes prescription antibiotics, steroids, or specific dosages, preventing drug misuse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Red-Flag Emergency Detection&lt;/strong&gt;: When severe chest pain, shortness of breath, or stroke symptoms are detected, the agent immediately issues emergency guidance and directs the patient to dial &lt;code&gt;108&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Caller Recognition &amp;amp; Persistent Memory (Days 3 &amp;amp; 4)
&lt;/h3&gt;

&lt;p&gt;Patients do not want to re-explain their chronic conditions every time they call.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent recognizes returning patients (e.g., &lt;em&gt;Ramesh Kumar, Shivpur&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Remembers ongoing conditions (e.g., Type 2 Diabetes, past fever history).&lt;/li&gt;
&lt;li&gt;Respects data privacy with explicit consent protocols and a &lt;em&gt;"Forget My Data"&lt;/em&gt; command.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Real-Time Domain Tools (Day 5)
&lt;/h3&gt;

&lt;p&gt;Integrated structured tools to give actionable answers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;lookup_nearest_facility&lt;/code&gt;: Dynamically locates verified Primary Health Centres (PHCs) and Community Health Centres (CHCs) with data freshness timestamps.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;classify_symptom_triage&lt;/code&gt;: Categorizes symptoms into 3 clinical tiers (Level 1: Red Emergency, Level 2: Urgent Clinic Visit, Level 3: Safe Home Care).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Linphone SIP VoIP &amp;amp; Outbound Calling (Day 6)
&lt;/h3&gt;

&lt;p&gt;Beyond the browser, SwasthyaSathi AI can be reached via physical telephone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inbound calling via SIP URI (&lt;code&gt;sip:roshu@sip.linphone.org&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Outbound follow-up voice calls with a mandatory 3-part opening (Who is calling, Why calling, and How to opt out to the Do-Not-Call registry).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Human Doctor Escalation with Informed Consent (Day 7)
&lt;/h3&gt;

&lt;p&gt;AI should assist, not replace doctors. When symptoms are complex:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The agent asks for explicit caller consent before creating a ticket:
&amp;gt; &lt;em&gt;"मैं आपकी सुरक्षा के लिए यह सारांश शिवपुर PHC के ड्यूटी डॉक्टर को फॉरवर्ड करना चाहता हूँ। क्या मैं आपकी जानकारी साझा करूँ?"&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Masks PII (phones masked as &lt;code&gt;+91 79919 •••••&lt;/code&gt;) and issues an honest ETA (30–60 mins) with a tracking reference ID (&lt;code&gt;ESC-2026-8492&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Real-Time Call Analytics Dashboard (Day 8)
&lt;/h3&gt;

&lt;p&gt;A comprehensive telemetry dashboard monitoring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total call volume, average call duration, and sub-400ms end-to-end latency.&lt;/li&gt;
&lt;li&gt;Clinical outcomes breakdown (Emergency escalations vs. OPD appointments vs. Home care guidance).&lt;/li&gt;
&lt;li&gt;Channel distribution (Browser WebRTC vs. SIP Phone).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Multi-Specialist Handoff &amp;amp; Real-Time Dual-Voice Switching (Day 9)
&lt;/h3&gt;

&lt;p&gt;Monolithic AI assistants cannot be experts at everything. SwasthyaSathi routes complex symptoms to 6 dedicated clinical specialists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🫀 &lt;strong&gt;Dr. Aryan&lt;/strong&gt; — Cardiologist (Chest pain, BP crisis)&lt;/li&gt;
&lt;li&gt;🩺 &lt;strong&gt;Dr. Rohan&lt;/strong&gt; — Dermatologist (Rashes, skin allergies)&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;Dr. Kabir&lt;/strong&gt; — Mental Health Specialist (Stress, panic de-escalation)&lt;/li&gt;
&lt;li&gt;🍎 &lt;strong&gt;Dr. Amit&lt;/strong&gt; — Gastroenterologist (Stomach burning, acidity)&lt;/li&gt;
&lt;li&gt;👶 &lt;strong&gt;Dr. Vikram&lt;/strong&gt; — Pediatrician (Child &amp;amp; infant fever)&lt;/li&gt;
&lt;li&gt;🏥 &lt;strong&gt;Arogya Mitra&lt;/strong&gt; — PHC OPD Token &amp;amp; Ayushman Bharat Coordinator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Dual-Voice Experience&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SwasthyaSathi AI (Female: &lt;code&gt;hi-IN-shweta&lt;/code&gt;) announces:
&amp;gt; &lt;em&gt;"ज़रूर, मैं आपको हमारे हृदय रोग विशेषज्ञ डॉ. आर्यन से कनेक्ट कर रही हूँ..."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Dr. Aryan takes over immediately in an authentic Male Doctor Voice (&lt;code&gt;hi-IN-kabir&lt;/code&gt;):
&amp;gt; &lt;em&gt;"नमस्ते रमेश कुमार जी! मैं आपका एआई हृदय रोग विशेषज्ञ डॉ. आर्यन हूँ..."&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  4. Challenges Faced &amp;amp; Lessons Learned
&lt;/h2&gt;

&lt;p&gt;Real-world engineering is full of hurdles. Here are three major technical challenges I tackled during the build:&lt;/p&gt;

&lt;h3&gt;
  
  
  🥊 Challenge 1: The "Trapped in Male Voice" Continuation Bug
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: When a user was handed off to a specialist (e.g. Dr. Amit for stomach pain), all subsequent turns remained locked in the specialist's male voice. If the user later asked a general question (&lt;em&gt;"What home care helps with a headache?"&lt;/em&gt;), the specialist's voice was still answering instead of SwasthyaSathi AI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: Built a &lt;strong&gt;Domain-Aware Fallthrough Router&lt;/strong&gt; and a &lt;strong&gt;Multi-Speaker Audio Queue&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;If the user's follow-up matches the active specialist's domain, the doctor answers.&lt;/li&gt;
&lt;li&gt;If the user shifts to a general symptom or another specialty, the state automatically resets to &lt;code&gt;general_physician&lt;/code&gt;, and SwasthyaSathi AI seamlessly reclaims the conversation in her female voice (&lt;code&gt;hi-IN-shweta&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🥊 Challenge 2: Mobile Browser Stutter &amp;amp; GPU Contention
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: On Android Chrome and iOS Safari, heavy CSS backdrop blur filters (&lt;code&gt;backdrop-filter: blur(28px)&lt;/code&gt;) combined with continuous SpeechRecognition loops caused high CPU usage (40-60%) and frame drops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Replaced heavy CSS blur with GPU-accelerated lightweight layers (&lt;code&gt;contain: content&lt;/code&gt;, &lt;code&gt;transform: translateZ(0)&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Switched the default mode to a low-overhead Push-to-Talk button streaming directly to Deepgram Nova-2, achieving &lt;strong&gt;silky smooth 60-120 FPS&lt;/strong&gt; on mobile devices.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🥊 Challenge 3: LiveKit WebRTC Audio Glitches during Agent Handoff
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: In raw WebRTC streams, tearing down a room connection to swap agents caused noticeable audio pops and connection dropouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: Kept the LiveKit Room persistent while hot-swapping the &lt;code&gt;VoiceAssistant&lt;/code&gt; pipeline with context preservation, enabling instant handoffs without dropping the call.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Live Test Matrix: Try It Yourself
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation Area&lt;/th&gt;
&lt;th&gt;Spoken Voice Prompt&lt;/th&gt;
&lt;th&gt;Expected Standout Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dual-Voice Handoff&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;"मुझे सुबह से सीने में दर्द और दिल की धड़कन तेज लग रही है"&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;👩‍⚕️ Shweta (Female) announces handoff ➡️ 👨‍⚕️ Dr. Aryan (Male Doctor) takes over seamlessly.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Domain Fallthrough&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;"सिरदर्द के लिए क्या घरेलू देखभाल करें?"&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;👩‍⚕️ SwasthyaSathi immediately reclaims conversation in her original Female Voice.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Real-Time OPD Token Booking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;"मुझे शिवपुर PHC में कल सुबह डॉक्टर का अपॉइंटमेंट बुक करना है"&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;🏥 Arogya Mitra allocates official OPD Token Number &amp;amp; confirms Ayushman Bharat coverage.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Zero-Prescription Guardrail&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;"मुझे कोई तेज एंटीबायोटिक या नींद की गोली का नाम बताओ"&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;🛡️ Hard clinical refusal for prescription drugs; guides on safe lifestyle &amp;amp; medical consultation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Doctor Human Escalation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;"मुझे 7 दिनों से लगातार तेज बुखार है और कोई आराम नहीं मिल रहा"&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;👨‍⚕️ Asks caller consent ➡️ Creates Duty Doctor Ticket with Reference ID.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  6. How You Can Run This Project in 5 Minutes
&lt;/h2&gt;

&lt;p&gt;Want to build or test a voice assistant for your own domain? Follow these steps:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Clone the Repository
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
git clone https://github.com/roshu764/agent-ai.git
cd agent-ai
npm installStep 2: Configure Environment Variables
Create a .env.local file in your root directory:

env


# 1. LLM Intelligence
OPENAI_API_KEY=your_openai_api_key
# 2. Real-Time Speech-to-Text
DEEPGRAM_API_KEY=your_deepgram_api_key
# 3. Ultra-Fast Conversational TTS
MURF_API_KEY=your_murf_api_key
# 4. LiveKit WebRTC &amp;amp; SIP Telephony
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
LIVEKIT_URL=wss://your-project.livekit.cloud
Step 3: Run the Development Server
bash


npm run dev
Open http://localhost:3000 in your browser, click "🎙️ Tap to Speak", and talk to your AI agent!

7. What's Next for SwasthyaSathi AI?
Regional Dialects Support: Expanding from standard Hindi/Hinglish to regional dialects like Bhojpuri and Maithili.
Offline Edge Kiosks: Running quantized local models on offline kiosks at rural PHCs during internet blackouts.
WhatsApp Prescription &amp;amp; Token Delivery: Automatically sending OPD appointment tokens and verified home care summaries over WhatsApp.
8. Conclusion &amp;amp; Acknowledgements
Building SwasthyaSathi AI over these 10 days proved that conversational voice AI is ready for real-world impact. When sub-second TTS like Murf Falcon 2 is paired with smart reasoning and empathetic design, we can bridge the healthcare divide for millions of citizens across Bharat.

A huge thank you to Murf AI for hosting the #VoiceForBharat challenge and providing the fastest conversational voice models!

⭐ GitHub Repository: github.com/roshu764/agent-ai!

Step 2: Configure Environment Variables
Create a .env.local file in your root directory:

env


# 1. LLM Intelligence
OPENAI_API_KEY=your_openai_api_key
# 2. Real-Time Speech-to-Text
DEEPGRAM_API_KEY=your_deepgram_api_key
# 3. Ultra-Fast Conversational TTS
MURF_API_KEY=your_murf_api_key
# 4. LiveKit WebRTC &amp;amp; SIP Telephony
LIVEKIT_API_KEY=your_livekit_api_key
LIVEKIT_API_SECRET=your_livekit_api_secret
LIVEKIT_URL=wss://your-project.livekit.cloud
Step 3: Run the Development Server
bash


npm run dev
Open http://localhost:3000 in your browser, click "🎙️ Tap to Speak", and talk to your AI agent!


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>voiceforbharat</category>
      <category>webdev</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
