{"slug": "building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises", "title": "Building PAKKA: An AI-Powered Debt Accountability App That Remembers Promises", "summary": "A developer built PAKKA, a prototype personal debt-accountability app that pairs a verified financial ledger with Hindsight, Vectorize's persistent memory system, so an AI assistant can recall repayment history without inventing financial facts. The app uses two-party agreement confirmations, integer-paise storage to avoid rounding errors, and a memory ON/OFF comparison to show what persistent memory adds beyond the current ledger. The developer notes the architecture is intended for a local, single-process demonstration and is not a production banking platform.", "body_md": "How I combined a verified financial ledger with Hindsight persistent memory to build an AI assistant that understands repayment history without inventing financial facts.\n\nThe Problem: Money Is Easy to Transfer, but Promises Are Easy to Forget\n\nImagine lending ₹10,000 to a friend.\n\nYou 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.\n\nEventually, both of you may remember the arrangement differently.\n\nWho promised what? How much has actually been repaid? Was a payment confirmed? Did the repayment deadline change?\n\nA spreadsheet can track amounts, but it doesn't naturally capture the context behind financial commitments.\n\nThat observation inspired PAKKA — Every Rupee. Every Promise. Remembered.\n\nPAKKA is a prototype for personal debt accountability, combining structured financial records, bilateral confirmations, and persistent AI memory.\n\nThe goal isn't to lend money or process payments. It's to help two people maintain a shared, understandable record of their agreements.\n\nWhat PAKKA Does\n\nPAKKA provides a shared environment for borrowers and lenders to manage personal financial commitments.\n\nIts core features include:\n\nTwo-party agreements: Both participants must accept the terms before an agreement becomes active.\n\nVerified repayments: Reported repayments affect the confirmed balance only after counterparty confirmation.\n\nProtected agreement terms: Changes require bilateral approval.\n\nPromise tracker: Borrowers can record repayment intentions that both participants can view.\n\nSmart repayment suggestions: Advisory suggestions use verified financial information and optional affordability input.\n\nAI memory timeline: Displays historical events, intentions, and retrieved memories with distinct labels.\n\nPolite reminders: Generates messages users can copy and send manually.\n\nMemory ON/OFF comparison: Demonstrates what persistent AI memory adds beyond the current ledger.\n\nThese features were designed around a simple principle:\n\nAn AI assistant should remember financial history, but it should never become the authority over financial truth.\n\nThe Technical Architecture\n\nPAKKA is built using a lightweight full-stack architecture.\n\nComponent\n\nTechnology\n\nFrontend\n\nNext.js, React, TypeScript\n\nBackend\n\nNext.js server routes\n\nDatabase\n\nSQLite using Node.js native SQLite support\n\nValidation\n\nZod\n\nPersistent AI memory\n\nHindsight by Vectorize\n\nStyling\n\nResponsive custom CSS\n\nTesting\n\nAutomated application tests and live integration verification\n\nThe application uses server-managed sessions and validates agreement membership before allowing participants to access financial records.\n\nFinancial values are stored in integer paise rather than floating-point rupees. This helps avoid common rounding errors in money calculations.\n\nFor example, a confirmed ₹2,500 repayment against ₹10,000 leaves a verified outstanding balance of ₹7,500.\n\nThe calculation comes from the ledger, not from an AI-generated response.\n\nPAKKA's current architecture is intended for a local, single-process demonstration. It is not a production banking platform.\n\nWhy Persistent Memory Matters\n\nTraditional AI conversations often rely heavily on the context provided in the current request.\n\nThat creates a problem for applications where historical actions matter.\n\nA borrower might ask:\n\n\"What have I promised so far, and what should I repay next?\"\n\nA system without historical memory may only know the outstanding balance and final due date.\n\nBut a useful accountability assistant should also understand previous commitments, confirmed repayments, and relevant agreement changes.\n\nThis is where Hindsight, a persistent memory system by Vectorize, becomes valuable.\n\nPAKKA integrates Hindsight through its REST API and uses three important operations:\n\nWhen relevant financial events occur, PAKKA prepares structured records that can be retained in Hindsight.\n\nExamples include agreement acceptance, approved amendments, confirmed repayments, and borrower promises.\n\nThese events are labeled carefully.\n\nA borrower's promise to pay ₹3,000 is an intention. It is not evidence that ₹3,000 has already been repaid.\n\nSimilarly, a repayment report awaiting confirmation cannot reduce the verified balance.\n\nThis distinction helps prevent AI memory from turning unverified claims into financial facts.\n\nWhen users request memory-powered insights, PAKKA recalls relevant information from the agreement's Hindsight memory bank.\n\nThe application uses agreement-specific memory banks and validates the current user's membership before accessing them.\n\nThis keeps the memory retrieval process tied to the correct agreement.\n\nFor example, the assistant may retrieve historical information about confirmed repayments and earlier commitments.\n\nInstead of depending only on the current conversation, it can reference stored context.\n\nPAKKA uses Hindsight's reflect capability to generate insights based on relevant remembered information.\n\nThe application also supplies current, verified ledger information.\n\nThe important design decision is that AI-generated suggestions remain advisory.\n\nThey cannot independently confirm repayments, change agreement terms, or modify outstanding balances.\n\nAny contractual amendment still requires approval from both participants.\n\nMemory ON vs. Memory OFF\n\nOne of my favorite parts of PAKKA is its memory comparison feature.\n\nI wanted users to see the difference persistent memory actually makes.\n\nConsider a fictional agreement:\n\nOriginal amount: ₹25,000\n\nConfirmed repayment: ₹5,000\n\nRemaining balance: ₹20,000\n\nFinal due date: November 10, 2026\n\nWith Memory OFF, the application can explain the current balance, confirmed payment count, and due date using its structured ledger.\n\nWith Memory ON, the application can additionally retrieve relevant historical context through Hindsight and show evidence references.\n\nThe interface separates the concise summary from expandable supporting evidence.\n\nThis creates a more understandable experience while keeping the ledger authoritative.\n\nIt also makes the role of persistent memory visible instead of treating AI as an unexplained black box.\n\nBuilding a Promise Tracker\n\nAnother important feature is the promise tracker.\n\nSuppose a borrower records:\n\n\"I'll repay ₹2,000 by Friday.\"\n\nPAKKA stores the promised amount, date, and optional note.\n\nBoth participants can see the promise.\n\nHowever, recording a promise doesn't reduce the debt.\n\nThe application determines fulfillment using qualifying, counterparty-confirmed repayments reported after the promise was created.\n\nPending or disputed payments cannot fulfill it.\n\nThe tracker can distinguish pending, fulfilled, and overdue promises, including partial repayments.\n\nThis makes promises useful accountability records without confusing intentions with completed financial actions.\n\nSmart Repayment Suggestions\n\nPAKKA also provides affordability-based repayment suggestions.\n\nThe borrower can optionally specify an amount they can afford and a date when that money will be available.\n\nThe application considers the verified outstanding balance and pending payment reservations.\n\nWith Memory ON, relevant Hindsight repayment context can enrich the recommendation.\n\nFor example, the assistant might suggest a smaller repayment rather than recommending an amount the borrower has not said they can afford.\n\nBut it never assumes a user's salary, income, or financial capacity.\n\nThe suggestions do not automatically create promises or execute repayments.\n\nIf a proposed date goes beyond the agreed deadline, PAKKA identifies that an amendment would require both parties' approval.\n\nMaking AI Outputs Explainable\n\nPersistent memory is useful only when users can understand what the system remembers.\n\nPAKKA's timeline distinguishes between:\n\nVerified events: Accepted agreements, approved changes, and confirmed repayments.\n\nIntentions: Promises recorded by borrowers.\n\nUnconfirmed activity: Claims that have not become verified repayments.\n\nAI memories: Historical information retrieved from Hindsight, including supporting evidence references where available.\n\nThe application also avoids presenting retrieved memories as additional ledger transactions.\n\nThis prevents the same repayment from appearing as multiple financial events simply because it exists in both the database and memory system.\n\nWhen Hindsight is unavailable, PAKKA provides a truthful offline fallback using local financial records rather than inventing remembered history.\n\nTesting and Verification\n\nThe implementation underwent several rounds of testing.\n\nThe final development verification reported:\n\n36 passing automated tests.\n\nSuccessful linting and TypeScript type checking.\n\nSuccessful production build.\n\nLive Hindsight retain, recall, and reflect operations.\n\nBrowser verification of core user workflows.\n\nConfirmation that the original demo agreements remained unchanged.\n\nThe tests cover financial state transitions, participant access, promise fulfillment, reminders, and memory-related behavior.\n\nOne important distinction is that automated tests use mocked provider transport, while separate live verification exercises the real Hindsight service.\n\nThe public repository includes the implementation, setup instructions, and verification documentation.\n\nChallenges and Lessons Learned\n\nBuilding PAKKA highlighted several important lessons.\n\nFinancial correctness comes first\n\nAI should not calculate or overwrite authoritative balances when deterministic ledger calculations are available.\n\nMemory needs provenance\n\nRemembering a promise is different from remembering a confirmed payment. Both can be useful, but they must remain distinguishable.\n\nAI features should fail safely\n\nA memory provider outage should not prevent users from viewing their verified financial information.\n\nSimplicity improves trust\n\nConcise insights, visible evidence, and clear status labels can be more useful than long AI-generated explanations.\n\nHuman approval still matters\n\nFor sensitive actions such as changing financial agreements, AI can provide context, but the participants must remain in control.\n\nCurrent Limitations and Future Possibilities\n\nPAKKA is currently a working local prototype using fictional demo accounts and records.\n\nIt does not transfer money, verify real-world identities, send automatic external notifications, or guarantee repayment.\n\nA production-ready version would require stronger identity verification, secure hosting, rate limiting, backups, more robust transaction handling, and additional privacy safeguards.\n\nFuture possibilities include better repayment visualizations, richer user-controlled memory management, and improved accessibility.\n\nHowever, the central principle would remain unchanged:\n\nPersistent AI memory should strengthen accountability without replacing verified records or human consent.\n\nFinal Thoughts\n\nPAKKA started with a simple question:\n\nWhat if a financial tracking app could remember not only how much money was owed, but also the commitments people made along the way?\n\nBy 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.\n\nThe most important takeaway from building PAKKA is that a trustworthy AI agent needs more than memory.\n\nIt needs boundaries around what it remembers, what it can infer, and what it is allowed to change.\n\nEvery Rupee. Every Promise. Remembered.", "url": "https://wpnews.pro/news/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises", "canonical_source": "https://dev.to/j_joshua_hebron/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises-2dfk", "published_at": "2026-11-06 12:20:50+00:00", "updated_at": "2026-11-06 12:24:14.905727+00:00", "lang": "en", "topics": ["ai-agents", "ai-products", "ai-tools", "artificial-intelligence"], "entities": ["PAKKA", "Hindsight", "Vectorize", "Next.js", "React", "TypeScript", "SQLite", "Zod"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises", "markdown": "https://wpnews.pro/news/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises.md", "text": "https://wpnews.pro/news/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises.txt", "jsonld": "https://wpnews.pro/news/building-pakka-an-ai-powered-debt-accountability-app-that-remembers-promises.jsonld"}}