@ibamarief
Since last year, I've arguably been wrongfully accused in a state corruption case. To defend my innocence, I spent past 6 weeks building an agentic AI swarm that: Analyzed 4700+ pages court docs Mapped 8900+ testimonies Found dozens of contradictions This is how I fight 👇🏼 First off, some context may be necessary. Even though I'm accused in a state corruption case, I'm not a government official. I'm a software engineer. I spent over 15 years building large-scale tech systems across Europe and Indonesia. I've led engineering teams of up to 600 people and helped grow a small tech startup into a unicorn. In 2016, I moved back from Europe to Indonesia, because I believe technology at scale could make a real difference to the millions of people in the nation. Six years ago, working as a tech consultant under a nonprofit foundation, I started advising Indonesia's Ministry of Education on building large-scale technology platforms. Public sector work pays significantly less than private sector, and I took close to a 50% pay cut to make the switch. I was fine with that. Using what I knew to help underserved communities in Indonesia felt like the right trade. Our mission was to build a user-centric superapp for public education, specifically for teachers and public schools, the kind of work the private sector ignores because there's no money in it. At some point, officials at the ministry asked for my input on one of their procurement plans. I helped them work through the technical details, shared what I knew, laid out the pros and cons, and recommended a set of tests they should run to determine which options were the most suitable. By the time they made their final decision and executed the procurement, I had already resigned from the consulting work, so I didn't think much of it. Fast forward to May 2025. My house was raided as part of a newly opened corruption investigation tied to that procurement. Two months later, I was named a suspect and placed under city detention due to my health. The trial started in January 2026. We've been through more than a dozen sessions so far, and not a single piece of evidence or testimony has been presented showing I received a single cent from the procurement. What came to light was the opposite: evidence and testimony that my recommendations were neutral and likely were ultimately ignored by the ministry's own team, who went ahead and made the call on their own. So why am I the one on trial? Because the ministry officials who did take money from the procurement vendors needed someone to blame for the decisions they made. Blaming an outside consultant is the easy way out. Witness testimonies in court has shown that the officials actively directed the procurement while claiming it was done on my instructions and even misled their own team within the ministry by saying I held a position of authority. We needed evidence to dispute those accusations, questions to cross-examine the witnesses, and we needed them fast. This is where my AI comes in. A few days before the trial began, we received a 4400-page printed document containing all the witness statements collected during the investigation, plus several hundred pages of other related documents. The information asymmetry is staggering. Those with deep enough pockets to hire large law firms can throw dozens of paralegals and associates at a document like that and mount a proper defense on short notice. I didn't have that kind of money. By then, I had been out of work for more than six months. The AI startup I founded had to shut down. Our investors asked us to return their funding. I had to lay off the entire team. Most of my lawyers are friends of my wife from her college days, who stepped up and waived most of their fees because they could see I was being railroaded. The whole situation felt hopeless. But somewhere in the middle of the despair, a spark lit up. Combing through and analyzing thousands of pages of documents is exactly the kind of problem AI was built for. I've built AI systems before, so I know the key to applying AI to a real-world problem is understanding the strengths and limitations of the available models, and figuring out how to make things not just work, but work efficiently enough to put into production. I was placed under city detention due to health issues with my heart, compounded by a tumor that has been growing rapidly over the past few months. But it also means I still have access to my dev PC. So I started with small experiments. My lawyers found a printing service that could scan the thousands of pages in a couple of days. At first, I tried simply uploading the scanned PDF into existing chatbots like ChatGPT, but the file was far too large for anything they could handle. Even when I managed to get it working through external cloud storage, the results were atrocious. Half of the strategies and "facts" the models surfaced were hallucinations. That wouldn't just be useless in court, it's actively dangerous and can jeopardize my defense. My experience building complex AI systems told me that the key to reducing those hallucinations is better data preprocessing. So I spent the first couple of weeks focusing on parsing the uploaded PDFs, running various kinds of text extraction, and eventually settled on building an agentic AI swarm that performs multiple layers of preprocessing and analysis. This multi-step analysis by several AI agents that swarm the PDF and extract different aspects of the case produces a dense knowledge graph where we can even trace the flow of money involved. My lawyers can now easily browse, filter, and search through nearly 9000 witness statements. We even discovered several witnesses with duplicate testimony, raising suspicion of coordinated efforts or tampering among them. But I didn't stop there. The processing chain includes several higher-level intelligence layers that draw from all the signals in the extracted knowledge graph. These layers add semantic understanding that powers a Chat AI feature, where we can ask specific questions about the case and get grounded answers. I even built a self-reflective sub-agent that automatically challenges and inspects the results to make sure there are zero hallucinations. Overall, the AI has helped me and my legal team uncover the big picture of what actually happened, and build questions that span hundreds of separate testimony sessions, giving us an unprecedented ability to cross-examine witnesses in court and significantly improved our defenses. But I have grander vision than just helping my own legal team. Indonesia's legal system is severely overburdened, with a huge number of cases flowing through the courts every year. This kind of AI could be a useful tool not just for lawyers, but also for judges and prosecutors trying to make sense of their caseloads. With the cross-examinations we've conducted and the weight of evidence that has come to light, we are aiming for an acquittal. Should that be the case, my pledge is to keep building this AI platform into something that can meaningfully improve the quality of justice in our legal system: by helping investigators analyze cases more thoroughly and shine a light on any potential crimes, by raising the standard of what prosecutors bring before a judge, and by giving lawyers the ability to uncover the truth in their clients' cases faster than ever before. Because in the end, I want what I've built to help more than just myself. I believe it can ease the burden on our judges and raise the quality of justice across the system in Indonesia.