When Forgetting Costs Money: Building HakDaar with AI Memory
A mason in Hyderabad is promised ₹1,000 per day.
Six days later, he receives ₹4,000.
When he asks about the remaining amount, the contractor says:
«“I’ll give you the rest later.”»
There is no contract. No payslip. No written record.
Only a verbal promise—and a worker trying to remember exactly what was agreed.
This is the problem we wanted to solve with HakDaar, a rights companion designed for daily-wage and migrant workers.
HakDaar helps workers record what employers promised, what work they completed, and what payments they received. Instead of relying on memory alone, the worker gets an AI-powered companion that remembers the conversation and maintains an exact wage ledger.
The Problem: When Forgetting Costs Money
Daily-wage workers often operate without formal contracts or detailed payment records.
A worker may remember that they were promised a particular daily wage, but after several days of work, it can become difficult to remember:
- What rate was promised?
- How many days were worked?
- How much was already paid?
- When was the last payment?
- What amount is still pending?
HakDaar approaches this problem from a simple idea:
«If someone's history is evidence, that history should not depend entirely on human memory.»
What Is HakDaar?
HakDaar is a multilingual chat application for daily-wage and migrant workers.
Workers can communicate through Telugu, Hindi, or English, using either text or voice.
For example:
«“Rakesh promised me 1,000 rupees per day for the building work.”»
«“I worked 6 days for him.”»
«“He paid me only 4,000 and said the rest later.”»
HakDaar converts these conversations into structured information and produces:
Earned: ₹6,000
Paid: ₹4,000
Owed: ₹2,000
A week later, the worker can return and ask about the same employer without starting from zero.
The Core Idea: Memory Is Not the Ledger
The most important architectural decision was separating what the AI remembers from what the system calculates.
A language model can understand conversations and recall context, but it should not be the final authority for financial calculations.
HakDaar therefore uses two separate systems.
The Ledger Owns Every Rupee
The structured ledger uses SQLite to store:
- Wage promises
- Work days
- Payments
Calculations are performed using Python's "Decimal".
Only the ledger produces the final financial numbers.
Hindsight Owns the Story
HakDaar uses Hindsight agent memory to remember the worker's evolving story:
- What the worker said
- What an employer promised
- Previous conversations
- Relevant payment context
- What happened previously
Hindsight provides context, but it is never treated as the source of truth for the amount owed.
«AI remembers the story. The ledger calculates the money.»
How the Architecture Works
Every message follows the same pipeline:
Worker message → Fact extraction → Ledger update → Exact calculation → Memory recall → AI response
The ledger produces the numbers first.
The memory system provides relevant context.
Then the language model generates a response using those trusted numbers.
The stack is deliberately simple:
- React — frontend
- Android wrapper — mobile access
- FastAPI — backend
- SQLite — wage ledger
- Groq + gpt-oss-120b — language processing
- Whisper — voice input
- Hindsight — agent memory
- Docker — self-hosted memory infrastructure
Preventing AI From Inventing Money
One of the biggest lessons from building HakDaar was that validating the model's structured output isn't enough.
The final response also needs to be checked.
If the model produces a money-sized number that doesn't exist in:
- The ledger
- The facts extracted from the current message
- The worker's own words
the response is flagged.
The system can then rewrite the response or fall back to a response generated directly from the ledger.
This changes the role of the LLM.
It is no longer the authority.
It becomes the communication layer around an authoritative data source.
Giving Every Worker Their Own Memory
Each worker receives a private memory bank.
There is also a shared employer-reputation memory containing only anonymous, fact-derived reports.
For example:
«“A worker reported a short payment of ₹2,000 from Rakesh Builders.”»
The shared memory does not contain names or phone numbers.
When another worker encounters the same employer, HakDaar can surface relevant anonymous information.
However, a single report is not automatically treated as proof. The system uses multiple independent reports before producing a stronger warning.
Building for Real Conversations
Real users don't communicate like JSON.
They say things like:
«“10000”»
If the system had just asked:
«“What daily rate did Rakesh promise?”»
then that bare number needs to be interpreted in context.
Similarly:
«“I worked 5 days.”»
might appear before the worker even mentions the employer.
HakDaar therefore had to handle messy conversational patterns rather than assuming perfectly structured input.
We also had to handle overpayment.
If a worker earned ₹1,000 but received ₹1,800, the system should not simply say “fully paid.”
It should recognize the additional ₹800 and communicate that clearly.
Designing for Workers, Not Just Developers
HakDaar is designed around the realities of its users.
Workers can use voice input, reducing the need for typing.
The system also focuses on multilingual interaction and presenting amounts naturally in Telugu and Hindi.
Simple interface elements and large buttons make the application easier to use for people who may not be comfortable with traditional digital interfaces.
What We Learned
- Separate memory from computation
An AI agent can be excellent at remembering a complicated story.
That doesn't mean it should perform the financial calculation.
Memory and arithmetic need different sources of truth.
- Recall before retaining
Recalling existing information before storing the current message helps prevent the agent from immediately “remembering” the message it is currently processing.
- Shared memory needs safeguards
The moment one user's information can affect another user, privacy and fairness become architectural requirements.
Anonymous reports, thresholds and controlled summarization become essential.
- Guard the output
Validating JSON from the model isn't enough.
The final response must also be checked for unsupported numbers and claims.
- Build for the least technical user
Voice input, multilingual responses and simple interfaces aren't just accessibility features.
They can make the entire product easier to use.
The Bigger Idea
HakDaar started with a simple problem:
What happens when a worker's most important evidence exists only in their memory?
The solution isn't simply another chatbot.
It is a combination of:
Conversation + Memory + Structured Data + Deterministic Computation
The LLM handles language.
Hindsight handles context.
The ledger handles money.
And the worker remains in control of the information.
This architecture can extend beyond wages.
Any application where a user's history becomes evidence—such as rent, loans, payments, or long-running service interactions—can benefit from the same principle:
«Give the agent a real memory, but keep critical calculations outside the model.»
Final Thoughts
HakDaar isn't trying to replace contracts, legal systems or human support.
It is trying to solve a smaller but important problem:
Don't let forgetting become the reason someone loses money.
When technology is designed around the realities of its users—not just the capabilities of the model—AI can become more than a chatbot.
It can become a tool that helps people remember what they were promised.
And sometimes, remembering is the first step toward getting what you're owed.
Built with: React · FastAPI · SQLite · Groq · Whisper · Hindsight · Docker
HakDaar GitHub: "github.com/riyanshareefshaik/HakDaar"
Hindsight: "hindsight.vectorize.io"
Top comments (0)