<?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: J-Joshua-Hebron</title>
    <description>The latest articles on DEV Community by J-Joshua-Hebron (@j_joshua_hebron).</description>
    <link>https://dev.to/j_joshua_hebron</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%2F4230403%2F493e4d48-2002-4c56-9d7f-acde4e489417.png</url>
      <title>DEV Community: J-Joshua-Hebron</title>
      <link>https://dev.to/j_joshua_hebron</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/j_joshua_hebron"/>
    <language>en</language>
    <item>
      <title>Building PAKKA: An AI-Powered Debt Accountability App That Remembers Promises</title>
      <dc:creator>J-Joshua-Hebron</dc:creator>
      <pubDate>Fri, 06 Nov 2026 12:20:50 +0000</pubDate>
      <link>https://dev.to/j_joshua_hebron/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises-2dfk</link>
      <guid>https://dev.to/j_joshua_hebron/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises-2dfk</guid>
      <description>&lt;p&gt;How I combined a verified financial ledger with Hindsight persistent memory to build an AI assistant that understands repayment history without inventing financial facts.&lt;br&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%2Frk4tf5nc1izktspv6b2t.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%2Frk4tf5nc1izktspv6b2t.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Problem: Money Is Easy to Transfer, but Promises Are Easy to Forget&lt;/p&gt;

&lt;p&gt;Imagine lending ₹10,000 to a friend.&lt;/p&gt;

&lt;p&gt;You agree that the money will be returned next month. A few weeks later, your friend repays ₹2,500 and promises to send another ₹3,000 after receiving their salary.&lt;/p&gt;

&lt;p&gt;Eventually, both of you may remember the arrangement differently.&lt;/p&gt;

&lt;p&gt;Who promised what? How much has actually been repaid? Was a payment confirmed? Did the repayment deadline change?&lt;/p&gt;

&lt;p&gt;A spreadsheet can track amounts, but it doesn't naturally capture the context behind financial commitments.&lt;/p&gt;

&lt;p&gt;That observation inspired PAKKA — Every Rupee. Every Promise. Remembered.&lt;/p&gt;

&lt;p&gt;PAKKA is a prototype for personal debt accountability, combining structured financial records, bilateral confirmations, and persistent AI memory.&lt;/p&gt;

&lt;p&gt;The goal isn't to lend money or process payments. It's to help two people maintain a shared, understandable record of their agreements.&lt;/p&gt;

&lt;p&gt;What PAKKA Does&lt;/p&gt;

&lt;p&gt;PAKKA provides a shared environment for borrowers and lenders to manage personal financial commitments.&lt;/p&gt;

&lt;p&gt;Its core features include:&lt;/p&gt;

&lt;p&gt;Two-party agreements: Both participants must accept the terms before an agreement becomes active.&lt;/p&gt;

&lt;p&gt;Verified repayments: Reported repayments affect the confirmed balance only after counterparty confirmation.&lt;/p&gt;

&lt;p&gt;Protected agreement terms: Changes require bilateral approval.&lt;/p&gt;

&lt;p&gt;Promise tracker: Borrowers can record repayment intentions that both participants can view.&lt;/p&gt;

&lt;p&gt;Smart repayment suggestions: Advisory suggestions use verified financial information and optional affordability input.&lt;/p&gt;

&lt;p&gt;AI memory timeline: Displays historical events, intentions, and retrieved memories with distinct labels.&lt;/p&gt;

&lt;p&gt;Polite reminders: Generates messages users can copy and send manually.&lt;/p&gt;

&lt;p&gt;Memory ON/OFF comparison: Demonstrates what persistent AI memory adds beyond the current ledger.&lt;/p&gt;

&lt;p&gt;These features were designed around a simple principle:&lt;/p&gt;

&lt;p&gt;An AI assistant should remember financial history, but it should never become the authority over financial truth.&lt;/p&gt;

&lt;p&gt;The Technical Architecture&lt;/p&gt;

&lt;p&gt;PAKKA is built using a lightweight full-stack architecture.&lt;/p&gt;

&lt;p&gt;Component&lt;/p&gt;

&lt;p&gt;Technology&lt;/p&gt;

&lt;p&gt;Frontend&lt;/p&gt;

&lt;p&gt;Next.js, React, TypeScript&lt;/p&gt;

&lt;p&gt;Backend&lt;/p&gt;

&lt;p&gt;Next.js server routes&lt;/p&gt;

&lt;p&gt;Database&lt;/p&gt;

&lt;p&gt;SQLite using Node.js native SQLite support&lt;/p&gt;

&lt;p&gt;Validation&lt;/p&gt;

&lt;p&gt;Zod&lt;/p&gt;

&lt;p&gt;Persistent AI memory&lt;/p&gt;

&lt;p&gt;Hindsight by Vectorize&lt;/p&gt;

&lt;p&gt;Styling&lt;/p&gt;

&lt;p&gt;Responsive custom CSS&lt;/p&gt;

&lt;p&gt;Testing&lt;/p&gt;

&lt;p&gt;Automated application tests and live integration verification&lt;/p&gt;

&lt;p&gt;The application uses server-managed sessions and validates agreement membership before allowing participants to access financial records.&lt;/p&gt;

&lt;p&gt;Financial values are stored in integer paise rather than floating-point rupees. This helps avoid common rounding errors in money calculations.&lt;/p&gt;

&lt;p&gt;For example, a confirmed ₹2,500 repayment against ₹10,000 leaves a verified outstanding balance of ₹7,500.&lt;/p&gt;

&lt;p&gt;The calculation comes from the ledger, not from an AI-generated response.&lt;/p&gt;

&lt;p&gt;PAKKA's current architecture is intended for a local, single-process demonstration. It is not a production banking platform.&lt;/p&gt;

&lt;p&gt;Why Persistent Memory Matters&lt;/p&gt;

&lt;p&gt;Traditional AI conversations often rely heavily on the context provided in the current request.&lt;/p&gt;

&lt;p&gt;That creates a problem for applications where historical actions matter.&lt;/p&gt;

&lt;p&gt;A borrower might ask:&lt;/p&gt;

&lt;p&gt;"What have I promised so far, and what should I repay next?"&lt;/p&gt;

&lt;p&gt;A system without historical memory may only know the outstanding balance and final due date.&lt;/p&gt;

&lt;p&gt;But a useful accountability assistant should also understand previous commitments, confirmed repayments, and relevant agreement changes.&lt;/p&gt;

&lt;p&gt;This is where Hindsight, a persistent memory system by Vectorize, becomes valuable.&lt;/p&gt;

&lt;p&gt;PAKKA integrates Hindsight through its REST API and uses three important operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retain: Remembering Events&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When relevant financial events occur, PAKKA prepares structured records that can be retained in Hindsight.&lt;/p&gt;

&lt;p&gt;Examples include agreement acceptance, approved amendments, confirmed repayments, and borrower promises.&lt;/p&gt;

&lt;p&gt;These events are labeled carefully.&lt;/p&gt;

&lt;p&gt;A borrower's promise to pay ₹3,000 is an intention. It is not evidence that ₹3,000 has already been repaid.&lt;/p&gt;

&lt;p&gt;Similarly, a repayment report awaiting confirmation cannot reduce the verified balance.&lt;/p&gt;

&lt;p&gt;This distinction helps prevent AI memory from turning unverified claims into financial facts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Recall: Retrieving Relevant History&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When users request memory-powered insights, PAKKA recalls relevant information from the agreement's Hindsight memory bank.&lt;/p&gt;

&lt;p&gt;The application uses agreement-specific memory banks and validates the current user's membership before accessing them.&lt;/p&gt;

&lt;p&gt;This keeps the memory retrieval process tied to the correct agreement.&lt;/p&gt;

&lt;p&gt;For example, the assistant may retrieve historical information about confirmed repayments and earlier commitments.&lt;/p&gt;

&lt;p&gt;Instead of depending only on the current conversation, it can reference stored context.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reflect: Generating Contextual Insights&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;PAKKA uses Hindsight's reflect capability to generate insights based on relevant remembered information.&lt;/p&gt;

&lt;p&gt;The application also supplies current, verified ledger information.&lt;/p&gt;

&lt;p&gt;The important design decision is that AI-generated suggestions remain advisory.&lt;/p&gt;

&lt;p&gt;They cannot independently confirm repayments, change agreement terms, or modify outstanding balances.&lt;/p&gt;

&lt;p&gt;Any contractual amendment still requires approval from both participants.&lt;/p&gt;

&lt;p&gt;Memory ON vs. Memory OFF&lt;/p&gt;

&lt;p&gt;One of my favorite parts of PAKKA is its memory comparison feature.&lt;/p&gt;

&lt;p&gt;I wanted users to see the difference persistent memory actually makes.&lt;/p&gt;

&lt;p&gt;Consider a fictional agreement:&lt;/p&gt;

&lt;p&gt;Original amount: ₹25,000&lt;/p&gt;

&lt;p&gt;Confirmed repayment: ₹5,000&lt;/p&gt;

&lt;p&gt;Remaining balance: ₹20,000&lt;/p&gt;

&lt;p&gt;Final due date: November 10, 2026&lt;/p&gt;

&lt;p&gt;With Memory OFF, the application can explain the current balance, confirmed payment count, and due date using its structured ledger.&lt;/p&gt;

&lt;p&gt;With Memory ON, the application can additionally retrieve relevant historical context through Hindsight and show evidence references.&lt;/p&gt;

&lt;p&gt;The interface separates the concise summary from expandable supporting evidence.&lt;/p&gt;

&lt;p&gt;This creates a more understandable experience while keeping the ledger authoritative.&lt;/p&gt;

&lt;p&gt;It also makes the role of persistent memory visible instead of treating AI as an unexplained black box.&lt;/p&gt;

&lt;p&gt;Building a Promise Tracker&lt;/p&gt;

&lt;p&gt;Another important feature is the promise tracker.&lt;/p&gt;

&lt;p&gt;Suppose a borrower records:&lt;/p&gt;

&lt;p&gt;"I'll repay ₹2,000 by Friday."&lt;/p&gt;

&lt;p&gt;PAKKA stores the promised amount, date, and optional note.&lt;/p&gt;

&lt;p&gt;Both participants can see the promise.&lt;/p&gt;

&lt;p&gt;However, recording a promise doesn't reduce the debt.&lt;/p&gt;

&lt;p&gt;The application determines fulfillment using qualifying, counterparty-confirmed repayments reported after the promise was created.&lt;/p&gt;

&lt;p&gt;Pending or disputed payments cannot fulfill it.&lt;/p&gt;

&lt;p&gt;The tracker can distinguish pending, fulfilled, and overdue promises, including partial repayments.&lt;/p&gt;

&lt;p&gt;This makes promises useful accountability records without confusing intentions with completed financial actions.&lt;/p&gt;

&lt;p&gt;Smart Repayment Suggestions&lt;/p&gt;

&lt;p&gt;PAKKA also provides affordability-based repayment suggestions.&lt;/p&gt;

&lt;p&gt;The borrower can optionally specify an amount they can afford and a date when that money will be available.&lt;/p&gt;

&lt;p&gt;The application considers the verified outstanding balance and pending payment reservations.&lt;/p&gt;

&lt;p&gt;With Memory ON, relevant Hindsight repayment context can enrich the recommendation.&lt;/p&gt;

&lt;p&gt;For example, the assistant might suggest a smaller repayment rather than recommending an amount the borrower has not said they can afford.&lt;/p&gt;

&lt;p&gt;But it never assumes a user's salary, income, or financial capacity.&lt;/p&gt;

&lt;p&gt;The suggestions do not automatically create promises or execute repayments.&lt;/p&gt;

&lt;p&gt;If a proposed date goes beyond the agreed deadline, PAKKA identifies that an amendment would require both parties' approval.&lt;/p&gt;

&lt;p&gt;Making AI Outputs Explainable&lt;/p&gt;

&lt;p&gt;Persistent memory is useful only when users can understand what the system remembers.&lt;/p&gt;

&lt;p&gt;PAKKA's timeline distinguishes between:&lt;/p&gt;

&lt;p&gt;Verified events: Accepted agreements, approved changes, and confirmed repayments.&lt;/p&gt;

&lt;p&gt;Intentions: Promises recorded by borrowers.&lt;/p&gt;

&lt;p&gt;Unconfirmed activity: Claims that have not become verified repayments.&lt;/p&gt;

&lt;p&gt;AI memories: Historical information retrieved from Hindsight, including supporting evidence references where available.&lt;/p&gt;

&lt;p&gt;The application also avoids presenting retrieved memories as additional ledger transactions.&lt;/p&gt;

&lt;p&gt;This prevents the same repayment from appearing as multiple financial events simply because it exists in both the database and memory system.&lt;/p&gt;

&lt;p&gt;When Hindsight is unavailable, PAKKA provides a truthful offline fallback using local financial records rather than inventing remembered history.&lt;/p&gt;

&lt;p&gt;Testing and Verification&lt;/p&gt;

&lt;p&gt;The implementation underwent several rounds of testing.&lt;/p&gt;

&lt;p&gt;The final development verification reported:&lt;/p&gt;

&lt;p&gt;36 passing automated tests.&lt;/p&gt;

&lt;p&gt;Successful linting and TypeScript type checking.&lt;/p&gt;

&lt;p&gt;Successful production build.&lt;/p&gt;

&lt;p&gt;Live Hindsight retain, recall, and reflect operations.&lt;/p&gt;

&lt;p&gt;Browser verification of core user workflows.&lt;/p&gt;

&lt;p&gt;Confirmation that the original demo agreements remained unchanged.&lt;/p&gt;

&lt;p&gt;The tests cover financial state transitions, participant access, promise fulfillment, reminders, and memory-related behavior.&lt;/p&gt;

&lt;p&gt;One important distinction is that automated tests use mocked provider transport, while separate live verification exercises the real Hindsight service.&lt;/p&gt;

&lt;p&gt;The public repository includes the implementation, setup instructions, and verification documentation.&lt;/p&gt;

&lt;p&gt;Challenges and Lessons Learned&lt;/p&gt;

&lt;p&gt;Building PAKKA highlighted several important lessons.&lt;/p&gt;

&lt;p&gt;Financial correctness comes first&lt;/p&gt;

&lt;p&gt;AI should not calculate or overwrite authoritative balances when deterministic ledger calculations are available.&lt;/p&gt;

&lt;p&gt;Memory needs provenance&lt;/p&gt;

&lt;p&gt;Remembering a promise is different from remembering a confirmed payment. Both can be useful, but they must remain distinguishable.&lt;/p&gt;

&lt;p&gt;AI features should fail safely&lt;/p&gt;

&lt;p&gt;A memory provider outage should not prevent users from viewing their verified financial information.&lt;/p&gt;

&lt;p&gt;Simplicity improves trust&lt;/p&gt;

&lt;p&gt;Concise insights, visible evidence, and clear status labels can be more useful than long AI-generated explanations.&lt;/p&gt;

&lt;p&gt;Human approval still matters&lt;/p&gt;

&lt;p&gt;For sensitive actions such as changing financial agreements, AI can provide context, but the participants must remain in control.&lt;/p&gt;

&lt;p&gt;Current Limitations and Future Possibilities&lt;/p&gt;

&lt;p&gt;PAKKA is currently a working local prototype using fictional demo accounts and records.&lt;/p&gt;

&lt;p&gt;It does not transfer money, verify real-world identities, send automatic external notifications, or guarantee repayment.&lt;/p&gt;

&lt;p&gt;A production-ready version would require stronger identity verification, secure hosting, rate limiting, backups, more robust transaction handling, and additional privacy safeguards.&lt;/p&gt;

&lt;p&gt;Future possibilities include better repayment visualizations, richer user-controlled memory management, and improved accessibility.&lt;/p&gt;

&lt;p&gt;However, the central principle would remain unchanged:&lt;/p&gt;

&lt;p&gt;Persistent AI memory should strengthen accountability without replacing verified records or human consent.&lt;/p&gt;

&lt;p&gt;Final Thoughts&lt;/p&gt;

&lt;p&gt;PAKKA started with a simple question:&lt;/p&gt;

&lt;p&gt;What if a financial tracking app could remember not only how much money was owed, but also the commitments people made along the way?&lt;/p&gt;

&lt;p&gt;By combining a structured ledger with Hindsight's retain, recall, and reflect capabilities, I explored how persistent memory can make AI-powered applications more contextual, explainable, and useful.&lt;/p&gt;

&lt;p&gt;The most important takeaway from building PAKKA is that a trustworthy AI agent needs more than memory.&lt;/p&gt;

&lt;p&gt;It needs boundaries around what it remembers, what it can infer, and what it is allowed to change.&lt;/p&gt;

&lt;p&gt;Every Rupee. Every Promise. Remembered.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>software</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
