Etika: Legal Team, Decoded.

A friend spent a whole weekend trying to figure out if her candle business needed to register for PST. Four government sites, a Reddit thread, and a phone call later, the answer was "not yet, but close." Compliance info isn't missing, it's fragmented. BizPaL lists permits that may apply, Ownr just registers a name, and an accountant only knows what you tell them. Nobody says what applies to you, why, and what to do next, and the thresholds move underneath you the whole time.

So we built Etika.

What it does

Etika is a compliance navigator for new Vancouver sole proprietors. You answer a few questions and confirm the facts Etika understood. Three specialist AI agents (Registration, Tax, and Employer, each with its own persona) then check your situation against official government sources. You get a readiness score, plain-English explanations with the official government source behind each one, and a Now/Next/Later plan where every item links to the real form.

Mention a change in chat, like "I'm hiring next month," and Etika proposes a fact update. Confirm it and the assessment re-runs live: the employer obligations (WorkSafeBC, CRA payroll account, minimum wage, pay statements, payroll records) move from Later to Now, and the score updates with them.

How we built it

  • Backend: Python 3.11, FastAPI, Pydantic v2
  • Database: TiDB Cloud, holding vectors and relational data in one store
  • AI: Gemini Flash for intake parsing, agent explanations and chat; gemini-embedding-001 for retrieval
  • Frontend: Next.js, TypeScript, Tailwind

The core rule is code decides, Gemini explains. Every profile fact is stored as a value plus a confirmed flag, and an unknown fact is never treated as "no." Skip a question and the requirement becomes "Needs your input," not a guess. A deterministic engine matches confirmed facts against a reviewed registry of requirements, each tagged now, trigger or recommendation, with dependencies (business number before GST or payroll). Tax calculators run the real tests: PST's rolling 12-month $10,000 small-seller line plus the no-premises condition, GST's $30,000 threshold, and a straight-line projection of when you'll cross each one. The score and the order of next steps come from the same code, never from the model.

The knowledge base is ours. We collected official BC Registries, CRA, WorkSafeBC, BC Laws and City of Vancouver pages by hand, split them by legal section, embedded them, and stored them in TiDB with metadata for authority, jurisdiction, requirement and retrieval date. Every chunk has a review status, and only approved chunks can be retrieved. Retrieval is filtered by requirement and jurisdiction, and returns "insufficient evidence" instead of a weak match.

Each agent owns one area of the registry, receives only the evidence retrieved for its requirements, and returns structured findings with citations. We then validate every citation against what was actually retrieved in that run and drop anything that wasn't. The walk-through screen shows each agent's progress live.

Challenges

The law was harder than the code. PST's exemption depends on a rolling window, not a calendar year, so one good month can flip your status, and it also depends on whether you have established premises, which market sales make ambiguous. We flag those cases as gray areas for a professional instead of resolving them.

Building the knowledge base from scratch was the other big job. The hardest part wasn't collecting pages, it was narrowing each agent enough that it could only answer from its evidence, so Gemini never filled a gap with something that sounded right but wasn't sourced.

Three parallel agents also blew through Gemini's rate limit fast. We rebuilt the pipeline so code prefetches all evidence up front and each agent makes exactly one call, cutting Gemini usage from 8 to 15 requests per assessment down to 3.

What we're proud of

The RAG pipeline: we built the whole source-to-citation process ourselves, from scraping and reviewing official sources to chunking, embedding, and gating retrieval so an agent can only cite evidence it actually pulled in that run. Because status comes from code, the same facts always produce the same score, and the model can't talk its way into a different answer. And the hiring moment, one sentence in chat and several legal obligations switching on live, is the best 10 seconds of the demo.

What's next

Pre-filled government forms generated from the saved profile, auto-generated policy documents (privacy, refund, workplace), a renewal and deadline calendar, and expansion beyond Vancouver sole proprietors to other BC cities and business structures.

Built With

+ 6 more
Share this project:

Updates

Submission history