Public Documentation

Lawie Docs

guideDifficulty: intermediateTime: 30mVersion: v1Services: contracts-api, llm-runtimeSDK: @lawie/sdkReviewed: 2025-01-05Reviewer: Docs PlatformTags: contracts, runtime, automation

Automate NDA Review with Lawie

Build an automated NDA triage workflow leveraging Lawie Contracts API plus the prompts service.

Overview

Learn how to ingest NDAs, classify deal metadata, and generate risk summaries programmatically.

Prerequisites

  • API key created inside Lawie Admin with contracts.read and contracts.write scopes
  • Access to the sandbox tenant
  • Node.js 18+

Architecture Diagram

The workflow uses Contracts ingestion + LLM runtime. Add your own diagram in MDX as needed.

Steps

  1. Upload the NDA using /contracts/v1/upload.
  2. Classify with /contracts/v1/classify to obtain counterparty, jurisdiction, and effective dates.
  3. Run Risk Radar with /contracts/v1/risk to get structured alerts.
  4. Generate Summary via POST /llm-runtime/v1/prompts/risk-nda customizing the system prompt.
import { LawieContracts } from '@lawie/sdk-node';

const client = new LawieContracts({ apiKey: process.env.LAWIE_KEY! });
const { contractId } = await client.contracts.upload({ filePath: './nda.pdf' });

API Calls Referenced

  • POST /contracts/v1
  • POST /contracts/v1/classify
  • POST /contracts/v1/risk
  • POST /llm-runtime/v1/prompts/risk-nda

Troubleshooting

  • 403 → API key missing scopes; revisit Lawie Admin.
  • 422 → File type unsupported; ensure PDF or DOCX.