Intermediate

Document Analysis

Master OpenClaw's document analysis capabilities — from parsing and clause identification to obligation tracking, deadline detection, and generating export reports.

Document Parsing and Understanding

When you upload a document, OpenClaw performs multi-stage parsing to understand its structure and content:

  1. Format Extraction

    The document is converted to a structured text format. PDFs are processed with OCR if needed, DOCX files have their formatting parsed, and HTML documents are cleaned of markup.

  2. Structure Recognition

    OpenClaw identifies the document's structure: sections, subsections, numbered clauses, definitions, schedules, and appendices. This creates a navigable document map.

  3. Entity Extraction

    Parties, dates, monetary amounts, percentages, and other key entities are identified and tagged throughout the document.

  4. Semantic Analysis

    The AI model reads the full document and understands the relationships between clauses, the intent of provisions, and the overall nature of the agreement.

Clause Identification and Categorization

OpenClaw automatically identifies and categorizes clauses into standard legal categories:

Category Common Clauses Why It Matters
Financial Payment terms, pricing, penalties, late fees Direct impact on costs and cash flow
Liability Indemnification, limitation of liability, warranties Defines exposure to risk and damages
Termination Termination for cause, convenience, notice period Exit strategy and transition planning
IP Rights Ownership, licensing, work-for-hire, assignment Who owns the output of the relationship
Confidentiality NDA provisions, data protection, return of materials Protection of sensitive information
Governance Governing law, dispute resolution, jurisdiction Legal framework for resolving issues
CLI - Clause Extraction
# Extract all clauses with categories
openclaw clauses contract.pdf

# Extract specific clause types
openclaw clauses contract.pdf --type liability,termination

# Export clauses to structured JSON
openclaw clauses contract.pdf --output clauses.json

# Example output:
{
  "clauses": [
    {
      "id": "7.2",
      "category": "liability",
      "title": "Limitation of Liability",
      "text": "Neither party shall be liable...",
      "risk_score": 6,
      "notes": "Caps liability at contract value"
    }
  ]
}

Key Terms Extraction

OpenClaw extracts key terms and presents them in a structured format that makes it easy to understand the agreement at a glance:

Financial Terms

  • Total contract value
  • Payment schedule
  • Late payment penalties
  • Price adjustment mechanisms

Time-Based Terms

  • Effective and expiration dates
  • Renewal conditions
  • Notice periods
  • Performance deadlines

Relationship Terms

  • Parties and their roles
  • Exclusivity provisions
  • Assignment restrictions
  • Subcontracting rights

Protection Terms

  • Insurance requirements
  • Warranty provisions
  • Indemnification scope
  • Liability caps

Obligation Tracking

OpenClaw identifies obligations for each party and tracks them in a structured format. An obligation is any action a party must take, deliver, or refrain from doing:

Example - Extracted Obligations
Party A (Service Provider) Obligations:
1. Deliver monthly performance reports by the 5th
2. Maintain 99.9% uptime SLA
3. Provide 24/7 support for critical issues
4. Carry $2M professional liability insurance
5. Complete SOC 2 audit annually

Party B (Client) Obligations:
1. Pay invoices within 30 days of receipt
2. Provide access to required systems
3. Designate a project manager within 5 days
4. Review deliverables within 10 business days
5. Maintain confidentiality of provider's methods

Deadline Detection

OpenClaw scans for all time-sensitive provisions and creates a timeline of important dates:

  • Contract milestones: Start date, phase deadlines, delivery dates
  • Renewal dates: Auto-renewal triggers, opt-out windows
  • Notice requirements: Termination notice periods, change request deadlines
  • Compliance deadlines: Audit dates, certification renewals, reporting deadlines
Pro tip: Export the deadline timeline to your calendar system. OpenClaw can generate ICS (iCal) files for all detected deadlines, so you never miss a renewal window or notice period.

Cross-Reference Analysis

Legal documents often reference other clauses, external documents, or legal standards. OpenClaw maps these cross-references to help you understand dependencies between provisions:

  • Internal references: When clause 5.2 says "subject to the limitations in Section 7," OpenClaw links them together.
  • External references: References to laws, regulations, or industry standards are identified and noted.
  • Circular references: OpenClaw flags potentially confusing circular references between clauses.
  • Missing references: If a clause references a section or exhibit that does not exist, OpenClaw flags it as an error.

Comparison Between Documents

OpenClaw can compare two documents side-by-side, highlighting:

  • Added clauses: Provisions present in the new version but not the old
  • Removed clauses: Provisions that were deleted or omitted
  • Modified language: Changes in wording, even subtle ones
  • Changed terms: Differences in amounts, dates, percentages
  • Structural changes: Reorganized sections, renumbered clauses

Export Reports

Analysis results can be exported in multiple formats for sharing with teams and stakeholders:

Format Best For Includes
PDF Report Sharing with stakeholders, archiving Summary, risk scores, clause analysis, recommendations
JSON Integration with other tools, automation Structured data for all extracted information
CSV Spreadsheet analysis, bulk tracking Key terms, obligations, deadlines in tabular format
ICS (Calendar) Deadline tracking, calendar integration All detected dates and deadlines as calendar events
💡
Up next: The next lesson focuses specifically on contract review workflows — risk assessment, non-standard clause detection, negotiation suggestions, and batch processing.