<?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: Karan Raj</title>
    <description>The latest articles on DEV Community by Karan Raj (@karan_raj_1899d579c759c1f).</description>
    <link>https://dev.to/karan_raj_1899d579c759c1f</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%2F1660667%2F2278e384-c7b6-4c5d-9c44-3268627dfb9a.png</url>
      <title>DEV Community: Karan Raj</title>
      <link>https://dev.to/karan_raj_1899d579c759c1f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karan_raj_1899d579c759c1f"/>
    <language>en</language>
    <item>
      <title>Building a "Split-Brain" AI Trip Manager for the Backcountry 🏔️</title>
      <dc:creator>Karan Raj</dc:creator>
      <pubDate>Mon, 12 Oct 2026 05:10:52 +0000</pubDate>
      <link>https://dev.to/karan_raj_1899d579c759c1f/building-a-split-brain-ai-trip-manager-for-the-backcountry-3bk9</link>
      <guid>https://dev.to/karan_raj_1899d579c759c1f/building-a-split-brain-ai-trip-manager-for-the-backcountry-3bk9</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week1-2026-10-05"&gt;Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT I BUILT
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Trip-polama&lt;/strong&gt;, is a colloquial term used in TamilNadu, a mix Tamil and English which means shall we go for a trip. From the header itself we can get to understand that this application can make people get off their seats and go offline for few days to explore the nature and experience the thrill.&lt;/p&gt;

&lt;h2&gt;
  
  
  DEMO
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;🚀 Live Demo:&lt;/strong&gt; &lt;a href="https://trip-polama.onrender.com/" rel="noopener noreferrer"&gt;trip-polama.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CODE
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;💻 GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/karan-2004/trip-polama" rel="noopener noreferrer"&gt;karan-2004/trip-polama&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🌟 What is trip-polama?
&lt;/h2&gt;

&lt;p&gt;Most trip planning apps are great until you actually start your trip. The moment you hit a remote trail or a hill station with zero signal, your app becomes a glorified brick. Maps stop loading, expense tracking requires a server, and coordinating with your group becomes a game of "who has the last bit of LTE?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;trip-polama&lt;/strong&gt; is an offline-first, "split-brain" trip manager designed specifically for hikers, trekkers, and outdoor groups. The goal is simple: get people off the screen and into the world, with open-source AI at the core.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 The "Split-Brain" Architecture
&lt;/h2&gt;

&lt;p&gt;I realized that the tools you need &lt;em&gt;before&lt;/em&gt; a trip are fundamentally different from what you need &lt;em&gt;during&lt;/em&gt; one. Instead of a monolithic app, I built two specialized "brains":&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Online Brain (The Planner)
&lt;/h3&gt;

&lt;p&gt;When you have a connection, you need a powerhouse. The Online Brain uses larger open-weight models (like &lt;strong&gt;Gemma 4&lt;/strong&gt; or &lt;strong&gt;Llama 3&lt;/strong&gt;) equipped with online research tools. It performs source-backed research using Wikipedia and other resources to suggest waypoints, check permits, and build a realistic itinerary.&lt;br&gt;
Still need to work on the model to identify a better one which could infer budget and planning based on the current data available. It also needs to be fine tuned specifically for trip planning.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. The Local Brain (The Manager)
&lt;/h3&gt;

&lt;p&gt;Once you're offline, the brain shifts. The Local Brain is a lightweight system that lives entirely on your device. It handles the essentials with zero signal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Offline Waypoints:&lt;/strong&gt; Mark your path and track visited stops.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expense Tracking:&lt;/strong&gt; A local ledger to track spending and calculate "who owes whom" without a database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Photo Log:&lt;/strong&gt; Capture memories locally without worrying about cloud uploads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Buddy Check-ins:&lt;/strong&gt; Tracking last-known locations of group members.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Next Up" Suggestions:&lt;/strong&gt; Context-aware tips based on your device location, weather, and pace.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s still not a working model in deployment where I need to figure out an even more smaller model to accommodate in mobile and needs more fine tuning in order provide accurate and quick responses offline.&lt;/p&gt;
&lt;h2&gt;
  
  
  🛠️ How I Built It
&lt;/h2&gt;

&lt;p&gt;I chose a stack that prioritizes user control and offline reliability:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PWA (Vite + React + TS):&lt;/strong&gt; Built as a Progressive Web App so it installs on the home screen and works offline via service workers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dexie.js &amp;amp; IndexedDB:&lt;/strong&gt; All trip data, photos, and expenses are stored in the browser's IndexedDB. Your data stays on your device, not on a corporate server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MapLibre GL:&lt;/strong&gt; Used for high-performance map rendering.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Weight AI:&lt;/strong&gt; Integrated via an Ollama/Groq adapter, ensuring the AI is inspectable and swap-able.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Node.js &amp;amp; Render:&lt;/strong&gt; A lightweight gateway serves the frontend and manages the transition to larger online models.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🚧 Challenges I Faced
&lt;/h2&gt;

&lt;p&gt;The biggest challenge was managing the "split" effectively. Ensuring that the chat history and trip context transitioned seamlessly between a massive online model (for planning) and a lightweight local logic (for managing) required a custom routing layer and a strict schema for AI actions. &lt;/p&gt;

&lt;p&gt;Another hurdle was the PWA's background GPS behavior—modern mobile browsers are aggressive about killing background processes, which I had to account for in the "buddy tracking" design.&lt;/p&gt;
&lt;h2&gt;
  
  
  📚 What I Learned
&lt;/h2&gt;

&lt;p&gt;This project taught me the power of &lt;strong&gt;local-first software&lt;/strong&gt;. In an era of "everything-as-a-service," building something that &lt;em&gt;intentionally&lt;/em&gt; doesn't need a server to be useful is a refreshing challenge. I also learned how to leverage open-weight models to create specialized roles (Planner vs. Manager) rather than relying on a single generic prompt.&lt;/p&gt;
&lt;h2&gt;
  
  
  🗺️ The Road Ahead
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;On-Device Intelligence:&lt;/strong&gt; Integrating &lt;strong&gt;WebLLM&lt;/strong&gt; to bring the "Manager" brain fully on-device.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline Maps:&lt;/strong&gt; Implementing &lt;strong&gt;PMTiles&lt;/strong&gt; for true offline map downloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;P2P Coordination:&lt;/strong&gt; Using &lt;strong&gt;WebRTC&lt;/strong&gt; for live buddy tracking without a central server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy First:&lt;/strong&gt; Automatic metadata stripping for photos.&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;
  
  
  🤖 AI Agent Session
&lt;/h3&gt;

&lt;p&gt;Here is the transcript of the session where I deployed the app and drafted this post:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="OpenCode"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building trip-polama: split-brain trip planning and protected Render deployment&lt;/span&gt;
      &lt;span class="agent-session-model-badge"&gt;openai/gpt-6.1-sol&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets plan the archietecture and how to proceed forward&lt;br&gt;
dont blindly urge to only submit a scrap&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: We chose a no-rush PWA build with persistent trip conversations, local-first IndexedDB storage, manual trip tools, open-model integration, and versioned architecture plans. Supabase authentication/sync, on-device inference and peer-to-peer coordination were planned rather than represented as implemented.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets have a plan copy within the repo with all versions of plan available, lets install specific skills within the repo to keep things smooth and lets maintain a memory bank to keep track of the project&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Added versioned plans, repository agent rules, AGENTS.md, a maintained README and a memory bank. Built an npm-workspaces foundation with a React/TypeScript/Vite PWA, deterministic geographic and expense logic, Dexie repositories, tests and CI.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets go with the light theeme with natural skyblue, green colours to blend with nature&lt;/p&gt;

&lt;p&gt;add it to any design rules so that I dont need to reiterate&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Implemented a light nature palette and persistent design rules. Added trip creation, expenses and settlement, waypoints, next-stop suggestions, and group check-ins. Replaced coordinate entry/display with device or map selection and human-readable location labels. Photos gained an image picker and actual getUserMedia camera capture, with previews and local Blob persistence.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets remove the locations options in photos and add stripping location metadata from the photo to plan whhich we can implement later&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Removed photo geolocation requests, tags and location display. Existing image files were not rewritten. Embedded GPS/location-metadata stripping was explicitly added as deferred work; no claim was made that original uploads were already location-free.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;In the home page along with the trips section lets mainly focus on to a chat session per trip which needs to be the heart of the application where the model acts as the manager if the trip is already created or a planner if the trip is newly being added or being explored. Let the chat handle all the actions of the application along with the manual application usage.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Made chat the primary home workspace. Exploratory chats persist before creation and become manager conversations after confirmed trip creation. Chat and manual tools share local records. Model actions use strict runtime schemas, scoped transactions, confirmation/dismissal, audit statuses and duplicate-execution protection.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets be clear that the planner needs to opt a big llm to access online resources and provide efficient planner and the local agents role is to manage the trip read/write all the data via chat and provide summary and quick responses.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Implemented separate routes: a server-configured online planner with a bounded resource-tool loop, and a local Ollama manager. Existing conversations can explicitly switch to Research/Replan and back. Local failures never silently escalate to cloud inference. Online research uses Wikipedia, with optional Brave Search; credentials remain server-side.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;now we can test the model&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated testing summary: Live llama3.2:3b checks revealed malformed or unrelated action proposals, so response schemas and a one-action manager policy were tightened. The configured deepseek-v4.1-flash cloud model was denied with HTTP 402; after the user switched to gemma4:31b, live Wikipedia-backed research and gateway requests succeeded. Name-only creation also exposed incomplete action envelopes and fenced JSON. Added clarification examples, one bounded output correction and strict validation after removing only an outer JSON fence.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Before creation of trip lets suggest the spot in the destination and use that data to create waypoints for the trip.for any creation or updation confirmation dont use json structure rather just confirm the data. read only actions to local model should not ask any confirmations. lets test more on the local model on data retrieval including summary, quick responses and other actions. lets also add an icon to add photos via chat(multi select).&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;Curated milestone summary: Added sourced nearby-place suggestions and selectable stop reviews, with selected waypoints saved atomically during trip creation. Confirmation cards show readable values rather than JSON. Read-only tools execute without approval; known short commands use deterministic local reads, while natural retrieval requests select a compact read tool and facts come from complete saved records. Added multi-photo chat previews and local album/history linkage without sending images to models. Expanded live local tests found hallucinated retrieval answers and later intermittent 90-second timeouts; the final expanded live run was interrupted and must not be described as all-green. Deterministic reads were accurate and fast.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;lets change the app name to trip-polama&lt;br&gt;
from code base level to UI and every where&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Curated milestone summary: Renamed UI, page title, PWA, workspace packages/imports, source symbols, prompts and documentation to trip-polama. Preserved legacy database/preference IDs for saved-data compatibility. Rebrand verification passed 93 regression tests, typecheck, lint and production build. Created and pushed the public repository &lt;a href="https://github.com/karan-2004/trip-polama" rel="noopener noreferrer"&gt;https://github.com/karan-2004/trip-polama&lt;/a&gt;; master contains commit b8598b1. Actual environment credentials were excluded.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;create a new branch deployment and add those changes and commit&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div&gt;
                  &lt;div class="agent-session-text agent-session-text-collapse"&gt;
                    &lt;p&gt;Curated deployment summary: Created deployment from master and committed 9fdbc54, feat: prepare protected Render deployment. Added one Node production server for the built frontend/API, Render PORT binding on &lt;span class="agent-session-redacted"&gt;[REDACTED]&lt;/span&gt;, /healthz, production startup, shared demo sign-in with expiring Secure/HttpOnly/SameSite cookies, request budgets, safe static serving, render.yaml and deployment instructions. Verified 105 regression tests, typecheck, lint and PWA build; actual production-start smoke checks passed with synthetic secrets and no paid inference. At this checkpoint, deployment was committed locally but not pushed or provisioned on Render.&lt;/p&gt;

                  &lt;/div&gt;
                  Show more
                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;submit_agent_session&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Session preservation summary: This is a curated milestone record, not a complete verbatim transcript. Secrets, session cookies and private machine paths have been omitted. Remaining work includes actual Render deployment and browser/device verification, faster and consistently reliable local inference, Supabase identities/sync, WebLLM, peer-to-peer coordination, offline map downloads, photo metadata sanitization and measured test coverage. Shared demo access and in-memory request limits are not a full production account or durable spending-control system.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        22 of 24 messages
          · some content was hidden by the author
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Check out the repo and join me in building the future of private, autonomous outdoor exploration!&lt;/em&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I have used render for deployment which made my work much easier to take my project to the world. I would like to enter in render category.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have used Gemma model through illama for the online brain for trip planner. I would also like to enter in this category.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
    <item>
      <title>TriageAgent: a fully local AI that triages support tickets for my dev team(HALF BAKED)</title>
      <dc:creator>Karan Raj</dc:creator>
      <pubDate>Sun, 04 Oct 2026 19:10:57 +0000</pubDate>
      <link>https://dev.to/karan_raj_1899d579c759c1f/triageagent-a-fully-local-ai-that-triages-support-tickets-for-my-dev-teamhalf-baked-159k</link>
      <guid>https://dev.to/karan_raj_1899d579c759c1f/triageagent-a-fully-local-ai-that-triages-support-tickets-for-my-dev-teamhalf-baked-159k</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 dev team's biggest time-sink isn't writing code — it's triaging support tickets. Every morning someone reads a wall of messages, figures out which tickets we've already solved and which need a real engineer, and routes them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TriageAgent&lt;/strong&gt; does that automatically. You paste in our support chat log — no strict format, just messages that mention a ticket ID like &lt;code&gt;#123&lt;/code&gt; — and it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;groups&lt;/strong&gt; messages into ticket threads by their ticket ID,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;builds a local index&lt;/strong&gt; of every past thread and of each developer's past work,&lt;/li&gt;
&lt;li&gt;for a new ticket, either &lt;strong&gt;writes a short internal note&lt;/strong&gt; to the support team (when a similar &lt;em&gt;resolved&lt;/em&gt; thread exists) or &lt;strong&gt;routes it to the right dev&lt;/strong&gt; based on whose past responses it most resembles,&lt;/li&gt;
&lt;li&gt;and prints &lt;strong&gt;case-based reports&lt;/strong&gt;: open tickets per dev, critical cases, and a full case list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No cloud, no API keys, nothing leaves the machine.&lt;/p&gt;

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

&lt;p&gt;It runs as a CLI and a small web UI. Two real examples from the sample data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python cli.py triage "#999 the login page crashes on Safari"
action: note
note: "Duplicate of #101. Fix applied: Safari-specific JS bug in login
       handler fixed in v2.3.1. Handled by: alice."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python cli.py triage "#999 our webhook receiver is returning 500s"
action: route
assigned_dev: carol
reason: "A very similar ticket already exists (#108) but is still open,
         so I routed to 'carol' — their past work is closest."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fmlvk7wt63f5a0h4jgxge.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%2Fmlvk7wt63f5a0h4jgxge.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The whole thing is on GitHub:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/karan-2004" rel="noopener noreferrer"&gt;
        karan-2004
      &lt;/a&gt; / &lt;a href="https://github.com/karan-2004/triage-agent" rel="noopener noreferrer"&gt;
        triage-agent
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;TriageAgent&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A local, open-source support-ticket triage agent for a dev team. Point it at a
chat log; it groups messages into ticket threads, builds an index, then for any
new ticket it either &lt;strong&gt;writes a short internal note to the support team&lt;/strong&gt; (when
a similar resolved thread exists) or &lt;strong&gt;routes it to the developer&lt;/strong&gt; whose past
responses it most resembles. It also prints case-based reports (open tickets
per dev, critical cases, and a full case list).&lt;/p&gt;
&lt;p&gt;Built with local AI at its core (Ollama + open models). No data leaves your
machine.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ingest&lt;/strong&gt; — parse a free-form chat log, group messages by ticket ID
embed each thread (&lt;code&gt;nomic-embed-text&lt;/code&gt;), store in a local vector index. It
also builds one "profile" embedding per developer from every message they
wrote.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Triage&lt;/strong&gt; — embed the new ticket and search
&lt;ul&gt;
&lt;li&gt;if a past &lt;strong&gt;resolved&lt;/strong&gt; thread is similar enough (≥ threshold)…&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/karan-2004/triage-agent" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


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

&lt;p&gt;The open-source AI is the point, so everything runs locally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ollama&lt;/strong&gt; serving two open-weight models:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;nomic-embed-text&lt;/code&gt; — embeddings for similarity search,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;llama3.2:1b&lt;/code&gt; — writes the internal notes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Python&lt;/strong&gt; glue: a tiny numpy vector store (cosine similarity), a free-form chat-log parser that groups messages by ticket ID, and a simple RAG flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Streamlit&lt;/strong&gt; for the browser UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The flow: parse the chat log → embed each thread and each developer's profile → store locally. For a new ticket, embed it and search. If the best &lt;em&gt;resolved&lt;/em&gt; match clears a similarity threshold, the LLM drafts the note from that thread's resolution; otherwise it routes to the dev whose profile is closest.&lt;/p&gt;

&lt;p&gt;One detail I'm proud of: it only auto-notes from &lt;strong&gt;resolved&lt;/strong&gt; threads. An open duplicate gets routed instead of answered with a hallucinated fix — that alone cut the wrong answers to near zero. The suite of 26 pytest tests covers the parser, reports, store, and triage decisions.&lt;/p&gt;

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

&lt;p&gt;Support tickets are full of things you don't want on someone else's server: customer emails, login problems, billing details. Because Ollama and the models are open-weight, &lt;strong&gt;this all runs on a laptop with the Wi-Fi off&lt;/strong&gt; — the tickets never leave the machine.&lt;/p&gt;

&lt;p&gt;That's what a closed API wouldn't let us do. A hosted model means shipping every ticket thread to a vendor. An open stack let us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;keep the data local&lt;/strong&gt; — no upload, no retention policy to worry about;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;swap models freely&lt;/strong&gt; — if we outgrow &lt;code&gt;llama3.2:1b&lt;/code&gt;, point &lt;code&gt;TRIAGE_CHAT_MODEL&lt;/code&gt; at a bigger model, no code change;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;run it for free&lt;/strong&gt; — no per-token bill for triaging our own backlog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open innovation isn't a nice-to-have here; it's the reason the tool is safe to point at real tickets. Hope we devs really needs to keeps the bugs not to fly onto third party server exposing its source. &lt;/p&gt;

&lt;p&gt;Also Context of tickets need to be shared between the devs so that anyone can respond to it at the earliest. This agent acts as the context manager with autonomous response generator.&lt;/p&gt;

&lt;p&gt;Honestly it is still half baked and untested in the real environment. Need to involve in several iterations to make it helpful for my friends. So let it be outside rewarding category.&lt;/p&gt;

&lt;p&gt;Credits: Opencode with Deepseek 4(helped to convert my idea into code)&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
