Hoag Law.ai LogoHoag Law.ai
KJedi: a local, open-source contract review tool for California AI-focused SaaS attorneys
Back to Blog

KJedi: a local, open-source contract review tool for California AI-focused SaaS attorneys

May 15, 2026
Marc Hoag
KJedi: a local, open-source contract review tool for California AI-focused SaaS attorneys

Questions this article answers

KJedi is Marc Hoag's open-source, localhost-only contract review tool for solo and small-firm California attorneys doing AI / SaaS tech-transactions work. BYO Anthropic API key; nothing persists. Personal project, not a product.

What is KJedi?

KJedi is a small open-source Next.js web app, built by Marc Hoag, that runs only on your laptop (localhost). You upload a contract (PDF or DOCX), chat with Claude about the terms, and generate a red/yellow/green review memo at the end. No hosted service, no database, no logs, no analytics. Your Anthropic API key lives in .env.local and never touches the browser. Document text and chat history are held in memory only and clear when you close the tab. The system prompt is a plain TypeScript file at lib/system-prompt.ts that you can read, edit, and fork. Repo: github.com/marchoag/kjedi.

What are the options for a solo California attorney who wants to use AI on privileged client content?

Five practical paths, each trading off privilege, cost, and effort differently: (1) consumer chat tools (ChatGPT free/Pro, Claude.ai Pro) — cheapest, but governed by Consumer Terms that include training opt-outs and weaker retention guarantees, so not privilege-safe; (2) commercial API plus your own wrapper — privilege-safe via Anthropic/OpenAI Commercial Terms (no training, DPA included), highest build effort, typically $100-500/month in API costs; (3) managed legal-AI SaaS platform — privilege-safe, lowest effort, ~$500/month and up; (4) AI-in-a-box appliance where data never leaves the device — medium effort plus hardware, ~$500-700/month equivalent; (5) on-prem frontier model on your own hardware — highest effort, $10K+ in hardware. KJedi is path #2 packaged as open source.

What is KJedi tuned for?

California AI and SaaS tech-transactions practice. The system prompt knows about SaaS subscription agreements, MSAs, SOWs, DPAs, order forms, AI-specific clauses (training data rights, output ownership, IP indemnity for AI outputs, model substitution, accuracy disclaimers, prompt/output confidentiality, upstream-model-provider disclosure), vendor agreements with AI components (OpenAI, Anthropic, AWS Bedrock, Google Vertex), privacy law (CCPA/CPRA, GDPR, DPAs), IP assignments, contractor and employee IP/confidentiality, NDAs, and open-source compliance plus AI training-data provenance.

What is KJedi NOT tuned for?

Real estate, M&A, securities and financing, litigation, and regulated-industry compliance (healthcare, FinReg). KJedi will flag if a contract is outside its lane, but you'll get better results from a tool tuned for those areas. The system prompt at lib/system-prompt.ts is the place to fork if your practice differs.

What does it cost to run KJedi?

A typical contract review session — upload, several follow-up questions, generate memo — should run just a few dollars in Anthropic API costs. Steady client volume could therefore cost a few hundred dollars per month, putting it in the same price band as managed legal-AI platforms but with the wrapper logic and system prompt fully in your control. Frontier intelligence at attorney-workload volume costs real money to deliver under any model; the legitimate options all cluster in roughly the same range.

What should I verify before using KJedi on real client work?

Three things. (1) Your Anthropic account must be on Commercial Terms, not Consumer Terms. API access via the Anthropic console defaults to Commercial Terms once you add a payment method; Claude.ai Pro/Max is governed by Consumer Terms. Confirm in your console. (2) This is open-source experimental software, not a vetted vendor product. Read the code, audit the dependencies, verify the system prompt is adequate for your needs, and verify your own machine's configuration. (3) Treat KJedi's output as a junior associate's first pass, never the final word. Verify every citation before relying on it, including text inside the system prompt itself.

Solo and small-firm attorneys have four real ways to use AI for client work. Each trades off privilege, convenience, and cost differently.

The four options

OptionPrivilege-safe?EffortCost (typical)
Consumer chat (ChatGPT free/Pro, Claude.ai Pro)No — Consumer Terms include training opt-out and weaker retentionLowest$0–$20/month
Commercial API + your own wrapperYes — Commercial Terms, no training, includes DPAHighest (you build it)~$100–500/month depending on volume
Managed legal-AI SaaSYesLowest~$500/month and up
AI-in-a-box applianceYes — data never leaves the deviceMedium (setup + hardware)~$500–700/month equivalent
On-prem frontier model on your own hardwareYesHighest$10K+ hardware, ongoing setup

Consumer plans are cheap because they’re subsidized. The subsidy comes with terms of service that make those tiers inappropriate for privileged content.

Every option that’s honest about privilege costs real money, because frontier intelligence at attorney-workload volume costs real money to deliver. The legitimate options cluster in roughly the same price band.

That leaves two practical paths for solos:

(1) pay for a managed platform;

(2) Build a thin wrapper around the commercial API.

KJedi is the second option.

What KJedi is

KJedi is a small open-source Next.js web app that runs only on your laptop. Upload a contract (PDF or DOCX), chat with Claude (Opus 4.7 as of this writing) about the terms, generate a red/yellow/green review memo.

  • Localhost only. No hosted service. Outbound traffic goes to the Anthropic API only.
  • Your API key, server-side. Lives in .env.local. Never touches the browser.
  • Nothing persists. No database, no logs, no analytics. Document and chat history live in memory only and clear on tab close.
  • System prompt is yours. Plain TypeScript file at lib/system-prompt.ts. Read, edit, fork.

What it’s tuned for

California AI/SaaS tech-transactions:

  • AI-specific clauses (training data rights, output ownership, IP indemnity for AI outputs, model substitution, accuracy disclaimers, prompt/output confidentiality, upstream-model-provider disclosure)
  • Vendor agreements with AI components (OpenAI, Anthropic, AWS Bedrock, Google Vertex)
  • Privacy: CCPA/CPRA, GDPR, DPAs
  • IP assignments, contractor and employee IP/confidentiality, NDAs
  • Open-source compliance and AI training-data provenance

Not tuned for other practice areas or litigation. KJedi flags when a contract is outside its lane. Fork the system prompt for your own practice areas.

What it costs to run

A typical contract review session (upload, several follow-up questions, generate memo) should run just a few dollars in API costs. Steady client volume could therefore cost a few hundred dollars per month. Comparable to the managed platforms, with the wrapper logic and system prompt in your control.

Before using it on client work

  1. Verify your Anthropic account is on Commercial Terms, not Consumer Terms. API access via the console defaults to Commercial Terms once you add a payment method. Claude.ai Pro/Max is governed by Consumer Terms. Confirm in your Anthropic console.
  2. This is open-source experimental software, not a vetted vendor product. Read the code, audit the dependencies, verify the system prompt is adequate for your needs, and verify your own machine’s configuration.
  3. Verify every citation before relying on it. Treat the output as a junior associate’s first pass, never the final word, including in the system prompt.

Setup Instructions

Visit: github.com/marchoag/kjedi

git clone https://github.com/marchoag/kjedi.git
cd kjedi
npm install
cp .env.example .env.local   # add your ANTHROPIC_API_KEY
npm run dev

Open http://localhost:XXXX (default is usually 3000).

Questions? Feel free to reach out.

This site uses cookies for live chat (Crisp). No analytics cookies. Privacy details