Founding engineer on a vertical AI platform covering the whole Indonesian regulatory corpus. Agentic legal research, smart search over regulation, hierarchy visualisation, opinion drafting and court simulation, with the infrastructure chosen so a small team could run all of it.
Role Co-founder and founding engineer, Klaussa AI. Period 2026 to present. Scope Backend, frontend, agent systems, model training, infrastructure, and the content engine.
Klaussa builds AI over the entire body of Indonesian regulation. I am the founding engineer, which in a company this size means the stack from model training through to the marketing site is one person’s responsibility, and every decision gets made with an explicit view of what a small team can afford to maintain.
The product is not one thing. It is an agentic legal research assistant, a smart search over regulation, a visualisation of the regulatory hierarchy, a legal opinion drafting tool, and a court simulation. The common substrate underneath all five is a cleaned, indexed and citation-addressable corpus of Indonesian law, which is the actual asset.
The engineering story worth telling is not any single feature. It is that the architecture was chosen so that a company this small could operate a product this wide, and that the runway stretches to roughly four years because almost every cost in it is fixed rather than proportional to use.
Indonesian regulation is public and effectively unreadable. It runs to tens of thousands of documents in a strict hierarchy, where a ministerial regulation cannot contradict a statute and a statute cannot contradict the constitution, and where a Constitutional Court decision can change what a statute has meant since before it was written. Knowing what currently binds you is a research task, and research tasks are expensive.
The five surfaces are five different shapes of that same question. Search answers “where is this written.” Hierarchy visualisation answers “what sits above this and can override it.” The research assistant answers “what does this mean for my situation.” Drafting turns an answer into a document, and simulation stress-tests a position against how a court has reasoned before.
The research assistant is the piece with the most engineering in it. It is a staged agent pipeline rather than a single prompt.
Retrieval runs over Pinecone with chunking handled by Chonkie, and every claim in the final answer binds back to the source regulation text rather than to a paraphrase of it. The agent and tool layer runs on Agno with a FastMCP server exposing the tools.
The design decision I would defend hardest is the supervisor stage. It costs an extra model call on every query and it exists purely to be able to say that the retrieved evidence is not sufficient yet. A system without one will always produce an answer, because generation is what generators do, and in a legal setting an answer produced from thin evidence is worse than a refusal.
| Layer | Choice | Why, in one line |
|---|---|---|
| Backend | FastAPI, Gunicorn and Uvicorn on Docker | Boring, fast enough, and easy to reason about at 3am |
| Agent layer | Agno, FastMCP | Tools defined once and reachable by every surface |
| Frontend | Next.js 16, React 19, TypeScript, Tailwind | One framework the whole team can hold in their head |
| Edge and hosting | Cloudflare Pages, Workers, D1, Vectorize | Fixed cost, global, no servers to babysit |
| Object storage | Cloudflare R2 | No egress fees, which matters when serving documents |
| Serverless GPU | Modal | Pay for the seconds a model actually runs |
| Managed data | Supabase | Auth and Postgres without operating either |
| Long running services | Railway | The few things that genuinely need to stay up |
| Observability | Sentry | The minimum that lets one person run production |
Each row was picked on an explicit trade between time cost, money cost and quality cost rather than on defaults. The pattern across the table is that anything with a usage-proportional price got scrutinised hard, and anything with a fixed price got adopted quickly. That bias is the entire reason the runway is measured in years.
A regulation scraper runs on a cron to keep the corpus current, which is the unglamorous process that determines whether any of the five surfaces are telling the truth this week.
Two pieces of this are not conventional engineering work and I think they matter more than they look.
The first is an omnichannel layer: a Node and TypeScript backend connecting WhatsApp and web into one conversation store, so a user is the same user regardless of where they started. WhatsApp is where Indonesian users actually are, and a legal tool that requires them to come to a web app first is a legal tool with a smaller audience.
The second is the content engine. Klaussa runs a programmatically generated, editor-reviewed corpus of regulatory explainers on Next.js with structured data, built to rank in classical search and to be cited by answer engines like ChatGPT, Perplexity and Gemini. Building for the second audience is a different discipline from building for the first, because the thing being optimised is whether a model will quote you, not whether a person will click you.
Alongside those sit the internal tools that no one sees: a Google Docs add-on, a PDF to CSV pipeline for business documents, an autofill benchmark harness, and a content distribution bot for X.
The specific lesson is about cost shape rather than cost size, and I only learned it properly by having to sign off on the bills.
A fixed cost and a usage-proportional cost of the same magnitude are not comparable objects. One can be forecast and the other cannot; one improves as the engineering improves and the other does not. Almost every architectural decision on this list is downstream of preferring the first, and the largest single piece of engineering the company has done, training our own model to replace four API calls, is the same decision applied to the biggest remaining variable line.
In production and under active development. The corpus, the five surfaces, the omnichannel layer and the content engine are live. The in-house model is in training and covered separately.