Law-firm OA · Data-science agent · Interactive demo

Ask your firm's data anything —
and only see what you're allowed to.

LawX is an office system for small and mid-size law firms: cases, clients, billing, time and a law library, with standard business reports and an AI assistant that analyses the firm's database, builds reports with charts and answers legal questions. Every query runs as the person asking: a lawyer sees their own matters, a partner their team, management the whole firm — enforced in the database itself.

Try the demo → How the assistant works

Explore every page on fictional data as admin, partner or lawyer. The AI assistant asks for an access key — it then runs in your browser against the demo database with the same permission rules; switch roles and watch the answers change.

5
data scopes, own → firm-wide
4
standard reports
4
safety layers on AI-written SQL
2
editions: cloud & on-premise

The problem

Small firms run on spreadsheets and chat groups. Partners can't see the business; generic AI can't be trusted with client data.

📂

Scattered records

Matters, fee agreements, invoices and time live in different files; nobody knows collection rates or which client channels pay off.

🔐

Strict confidentiality

A lawyer may only see their own clients; partners their team; salaries only HR and the person. Any tool must respect that — including AI.

🤖

AI without guardrails

Pasting firm data into a chatbot leaks it and returns unverifiable numbers. Firms need answers grounded in their own database, with an audit trail.


The product

One web app, Chinese and English, for lawyers, partners and administrators.

Office core

Cases with teams and events, clients with acquisition channel, fee agreements (fixed, hourly, contingency, mixed), invoices, payments, time entries, law library.

Standard reports

Client analysis, revenue & receivables aging, case pipeline & outcomes, workload — any period, scoped to the viewer, printable to PDF.

AI assistant

Ask in plain language; it queries the database, builds custom reports with charts, or answers legal questions citing the firm's library.

Client analysis report
Client analysis: revenue and new clients by acquisition channel, monthly intake, top clients.
Assistant building a report
A partner asks for a team revenue report; the assistant runs the queries and returns a saved report with charts.
Legal question
Legal Q&A: cites the firm's law library verbatim and flags general knowledge to verify.
Permission matrix
Administrators define roles as a permission matrix; changes apply immediately.

Access control that the AI can't bypass

A permission is resource + action + scope. Scopes follow the firm's structure; PostgreSQL row-level security filters every query, from the web UI or the assistant.

ScopeMeaningTypical holder
ownrecords linked to me (my cases, my clients, my time)lawyer
teamme + everyone reporting to mepartner
departmentteam + everyone in departments I headdepartment head
allfirm-widemanagement / admin
Roles are data, not code.

Create a “paralegal” or “finance” role in the admin console; per-user overrides raise or revoke single rights.

Sensitive by design.

Salaries visible only to the person and admins; public reference cases hide the client; password hashes unreadable by the app.

Everything audited.

Every change, sign-in, salary view and assistant query is logged with before/after values.


How the assistant works

An LLM with four tools — all executed as the user, all logged.

1
query_database

Writes one SELECT over curated, column-trimmed views. Results are already filtered to the user's scope.

2
run_standard_report

Uses the firm's vetted report definitions when the question matches one.

3
search_law_library

Grounds legal answers in the firm's statutes, interpretations and precedents.

4
create_report

Builds a report with KPIs, charts and tables; incomplete reports are rejected and fixed, never half-saved.

Four layers between the model and the data

  1. SQL validator: a single SELECT, approved views only, function allowlist (no identity switching); the validated tree is what runs.
  2. Restricted database role with read access to the curated views only.
  3. Read-only transaction with a 10-second statement timeout.
  4. The user's own row-level security.

The model only receives what the user's own questions retrieve. Any OpenAI-compatible LLM works — DeepSeek, Qwen, GLM, Kimi, or a local model for on-premise sites. Administrators review every conversation in the agent monitor, with blocked attempts flagged.


Two editions, one codebase

Each firm gets its own database in both — hard isolation and trivial export.

Cloud (SaaS)On-premise
Hostingcentral server, one database per firmthe firm's own server, its own data
Setupsign-upone-command install, then a setup wizard in the browser
Updatescontinuous, by usone click in the admin UI: database backup → build → health check → automatic rollback
AI modelhosted LLM, metered per firmfirm's own API key, or a local model

Status

Working today

  • Permission system with row-level security, roles & overrides
  • Admin console: users, roles, organization, audit log, agent monitor
  • Four standard reports with charts and table views
  • AI assistant: data questions, custom reports, legal Q&A
  • Statistics & forecasts (trend, Holt forecast, correlation, 80/20)
  • Report sharing — re-run with the colleague's own permissions
  • Setup wizard, releases and one-click updates with rollback

Next

  • Case detail and editing pages for lawyers
  • Local LLM for on-premise; WeChat mini-program
  • Multi-firm cloud edition; sales agent
Open the demo →