Agent Juridic
An AI legal assistant for Romanian law that lawyers can check: it answers from the legislation in force and cites the exact article behind every claim.
The problem
General-purpose chatbots answer Romanian legal questions with confidence, and often cite articles that don't exist or were amended years ago. For a lawyer, an answer you can't verify is worse than no answer.
Romanian law also changes constantly: acts are amended, republished and renumbered. The question is rarely "what does the law say" but "what did it say on the date of the facts".
The approach
- Answer only from the law in force. The agent searches the legislation, reads the actual articles and writes from them, not from memory.
- Every claim cites its article. The citation opens the exact text next to the answer, with its version history.
- Check before showing. After the answer is written, a second pass verifies the citations against the texts it read.
What I built
Legal base
Rebuilt daily from the official portal (legislatie.just.ro), with every article's versions. Tens of thousands of acts, readable as of any date, plus public article pages for search engines.
The agent
A tool-using agent that searches the legislation, reads articles and looks up case law, including the European Court of Human Rights. Long documents continue automatically past the model's output limit.
Drafting & editor
Court filings and contracts drafted from the conversation or from templates, then edited in a Word-like editor on A4 pages, with AI on the selected text and the firm's letterhead.
Contract review
The client's own .docx comes back with tracked changes and comments on the clauses, exactly as a colleague would return it in Word.
Case files
Cases synced from the courts' portal (parties, stage, hearings), deadlines in one calendar with .ics export, and drafting straight from a case file.
The business side
Subscriptions with free trials (Stripe), Romanian e-invoicing to the tax authority, and an API that a partner law firm uses in its own tools.
Architecture
- FrontendNext.js and React, hosted on AWS Amplify
- BackendPython and FastAPI in Docker, blue/green deployments behind Caddy
- DataPostgreSQL on AWS RDS
- Legislation jobsNightly ingestion and versioning on AWS ECS Fargate
- AIClaude for reasoning and writing, embeddings for search
- Accounts & billingAWS Cognito, Stripe, e-invoicing
Measuring quality and cost
Changes to prompts, models or retrieval run first against an evaluation set of 43 realistic legal questions, scored blind by an independent model acting as judge. Model and reasoning-effort choices are decided by A/B tests on that set, not by feel.
Every step of an answer logs its cost, so I know what a question costs before deciding what to charge for it.
What I learned
- Lawyers trust what they can verify. The citation next to the claim matters more than a more eloquent answer.
- Dates are the hard part. Republications renumber articles; getting "the text on that date" right took more work than the AI.
- The boring parts are half the product. Deadlines, billing and invoices decide whether a firm can actually use it.
Want something like this for your office?
Tell me how your firm works today. I'll tell you what can be automated, and what it would cost.