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:
- The Inngest function in
document-pipeline.tsis triggered as expected. - The OCR and AI processing step is skipped — the stub returns without performing any analysis.
- No call is made to the Anthropic API.
- 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_KEYfrom your environment configuration.
Roadmap
To activate these features, the following work is required:
- Implement the Anthropic API call inside the OCR stub in
src/inngest/functions/document-pipeline.ts. - Validate
ANTHROPIC_API_KEYis present at application startup when the feature is enabled. - Wire risk assessment output to the contract management UI.
- 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
| File | Purpose |
|---|---|
src/inngest/functions/document-pipeline.ts | Inngest function containing the OCR/AI stub |
.env.example | Documents the ANTHROPIC_API_KEY placeholder |