Suryasathi
Millions of Indian households can get a subsidy for rooftop solar under PM Surya Ghar. But most families don’t know what size to install, what it costs, how much subsidy they get, or which documents to prepare. SuryaSathi answers that in minutes.
SuryaSathi: what we built, and what fought back
Team TerraTech, WeMakeDevs x AWS Bharat Build, Waste and Energy track
The problem
Under PM Surya Ghar, an Indian household can get a subsidy for rooftop solar. Most families still stall, because the questions pile up: what size should I install, what will it cost, how much subsidy do I really get, and which documents do I need? We built SuryaSathi to answer those in a few minutes, starting from something every home already has: an electricity bill.
What it does
- The user uploads a bill. Amazon Textract reads the text, and Gemini turns that text into units, amount, DISCOM and sanctioned load. The user reviews the result. If the units cannot be read, the app asks for manual entry and does not generate a plan. We removed every silent default on purpose.
- The user uploads a rooftop photo. An AI model estimates the usable area, but one photo cannot prove an area, so the confidence is capped and the user confirms or edits the number.
- A plain calculation engine, with no AI in it, produces system size, yearly generation, savings, subsidy, payback and CO2 reduction.
- An advisor agent answers eligibility and document questions. It is built on the Strands Agents SDK and has a tool that searches our scheme knowledge. Plan numbers are given to it from the calculation engine, and if its answer contains a rupee amount that is not in the plan or the scheme data, the answer is flagged.
- Plans are saved in Amazon DynamoDB, one partition per anonymous browser id, with an expiry time on every record.
The AWS parts
- Amazon Textract (
DetectDocumentText) for the bill text. If Textract fails, the app falls back to reading the image with Gemini and the result notes say which engine actually ran, so we never claim a service we did not use.
- Amazon DynamoDB for saved plans.
- Strands Agents SDK for the advisor agent.
- IAM with a least-privilege policy: one Textract action and four DynamoDB actions on one table.
The language model is Google Gemini.
What fought back
Bedrock would not open. On our new account, both Claude and Amazon Nova returned
ValidationException: Operation not allowed in the playground, even after upgrading from the free plan. We could not find out why, so we stopped spending time on it. The advisor has a Bedrock option, but we never tested it, so we do not claim it. Because the agent sits on Strands, swapping the model is a configuration change.A region mismatch. Our first DynamoDB call failed with
AccessDeniedException . The keys were fine. Our IAM policy named the table in one region and the table lived in another. Reading the policy line by line fixed it in two minutes. We had wasted ten before that guessing.Our advisor was not an agent at all. The chat window was importing the old local mock advisor, so it never reached the backend. The tell was that its answers were identical every time and full of markdown asterisks. We only caught it by calling the backend directly and comparing. Since then we test the real path, not the screen.
Textract and Hindi script. Many bills mix Hindi and English, and Textract does not read Hindi script well. That is why the Gemini fallback exists, and why we make no accuracy claim: we tested on a synthetic sample bill only.
What we would do next
Test on dozens of real bills from different DISCOMs and publish the actual accuracy. Add satellite roof estimates. Deploy on AWS with proper sign-in. Re-try Bedrock once account access allows it.
All figures are estimates. Please confirm subsidy and cost on pmsuryaghar.gov.in and with an installer.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article