All Docs
FeaturesAgentOS WorkUpdated March 11, 2026

AI Document OCR & Contract Risk Assessment — Current Status

AI Document OCR & Contract Risk Assessment — Current Status

Status as of v1.0.24: These features are not yet active. The processing pipeline exists as a stub and does not perform any AI-powered operations.

Overview

The platform includes a document processing pipeline (src/inngest/functions/document-pipeline.ts) designed to support:

  • Document OCR — Optical character recognition for uploaded contracts and HR documents.
  • AI-powered contract risk assessment — Automated analysis and risk scoring of contract documents using a large language model.

Both features are intended to be powered by Anthropic (Claude API). As of this release, the integration has not been implemented.

Current Behaviour

When a document is submitted to the pipeline:

  1. The Inngest function in document-pipeline.ts is triggered as expected.
  2. The OCR and AI processing step is skipped — the stub returns without performing any analysis.
  3. No call is made to the Anthropic API.
  4. No risk assessment output is produced.

This means documents are ingested but not analysed. Downstream features that depend on extracted text or risk scores will not receive data until the stub is replaced with a real implementation.

Environment Variable

The ANTHROPIC_API_KEY variable is listed in .env.example but is not required for the platform to operate in its current state. You do not need to provide a value for this key until the AI features are implemented.

# .env.example
# Required once AI document processing is implemented.
# Obtain your key from https://console.anthropic.com/
ANTHROPIC_API_KEY=

Note for operators: If you are setting up a production environment and AI document features are not part of your current rollout, you may safely omit ANTHROPIC_API_KEY from your environment configuration.

Roadmap

To activate these features, the following work is required:

  1. Implement the Anthropic API call inside the OCR stub in src/inngest/functions/document-pipeline.ts.
  2. Validate ANTHROPIC_API_KEY is present at application startup when the feature is enabled.
  3. Wire risk assessment output to the contract management UI.
  4. Test end-to-end document upload → OCR → risk score flow.

Until this work is completed, the features described in this page are inactive and will not appear in the product interface.

Related Files

FilePurpose
src/inngest/functions/document-pipeline.tsInngest function containing the OCR/AI stub
.env.exampleDocuments the ANTHROPIC_API_KEY placeholder