How to produce and consume Condicio contract data.
If you're building a contract extraction tool, CLM integration, or AI pipeline, Condicio defines what your output should look like.
Only the condicio identifier, specVersion, and contract.title are required:
{
"condicio": "https://raw.githubusercontent.com/docfide/condicio/main/schema/condicio.schema.json",
"specVersion": "0.1.0",
"id": "urn:uuid:a1b2c3d4-...",
"contract": {
"title": "My Contract"
}
}
{
"parties": [
{
"id": "party-abc",
"name": "ABC Corp",
"role": "client",
"type": "corporation"
}
]
}
Each obligation links back to its source clause:
{
"obligations": [
{
"description": "Deliver source code by March 1st.",
"obligor": "DevStudio LLC",
"deadlineType": "fixed date",
"fixedDate": "2026-03-01",
"status": "pending",
"clauseRef": "3"
}
]
}
Deadline types:
fixed date — use with fixedDatedays from event — use with daysFromEventrecurring — ongoing periodic obligationconditional — triggered by a future eventongoing — continuous, no fixed endpoint{
"financials": {
"currency": "USD",
"totalContractValue": 150000,
"terms": [
{ "label": "license fee", "amount": 150000, "period": "one-time" }
],
"paymentSchedule": [
{ "amount": 75000, "dueDate": "2026-01-01", "status": "paid" },
{ "amount": 75000, "dueDate": "2026-06-01", "status": "pending" }
]
}
}
{
"risks": [
{
"description": "No limitation of liability clause.",
"severity": "high",
"category": "legal",
"impact": "Uncapped liability exposure.",
"affectedParty": "ABC Corp",
"confidence": 0.92
}
]
}
Severity levels: low, medium, high, critical
Any extracted field can carry a confidence between 0.0 and 1.0. This is critical for AI-generated output — consumers can filter by confidence threshold.
import Ajv from 'ajv/dist/2020.js'
import addFormats from 'ajv-formats'
import condicio from 'condicio-schema'
const ajv = new Ajv()
addFormats(ajv)
const validate = ajv.compile(condicio)
if (validate(doc)) {
console.log('Valid')
} else {
console.error(validate.errors)
}
npm install -g ajv-cli ajv validate -s node_modules/condicio-schema/schema/condicio.schema.json -d contract.json
const myObligations = doc.obligations.filter(o => o.obligor === 'ABC Corp') const overdue = doc.obligations.filter(o => o.status === 'overdue')
const critical = doc.risks.filter(r => r.severity === 'critical')
Condicio supports both JSON and YAML. Valid YAML documents are structurally identical to their JSON equivalents:
condicio: https://raw.githubusercontent.com/docfide/condicio/main/schema/condicio.schema.json
specVersion: "0.1.0"
contract:
title: My Contract
type: Service Agreement
parties:
- name: ABC Corp
role: client
All examples are available in both formats under schema/examples/.
Condicio supports extension profiles that add domain-specific fields on top of the base schema. Profiles inherit all base fields via allOf and use unevaluatedProperties: false to reject unknown fields.
financial-profile.schema.json) — ISDA Master Agreements, credit facilities, subscription agreements. Adds tranches, covenants, credit support, events of default, derivative transactions, capital commitments, distribution waterfalls, and side letters.life-sciences-profile.schema.json) — Clinical trial agreements, research collaborations, licensing. Adds clinical study data, regulatory obligations, enrollment targets, publication and data rights, milestone payments, royalties, fields of use, patent prosecution, background IP, and clinical budgets.real-estate-profile.schema.json) — Commercial leases, subleases, property management agreements. Adds premises details, lease term, rent schedules and abatements, security deposits, operating expenses (CAM, taxes, insurance), tenant improvements, use clauses, assignment/subletting, repair and maintenance obligations, insurance requirements, broker commissions, options (renewal, expansion, ROFR), estoppel certificates, SNDA provisions, environmental terms, and regulatory tags.technology-profile.schema.json) — SaaS, software license, cloud service, and support agreements. Adds license metrics, service levels, support tiers, maintenance windows, usage limits, data processing provisions, professional services, and restrictive practices (audit rights, non-solicit, MFN pricing).energy-profile.schema.json) — Joint operating agreements, farmout agreements, production sharing contracts, and offtake arrangements. Adds operatorship, working/net revenue interests, participants, phases, work commitments, abandonment/decommissioning, offtake, transportation, and production royalties.government-contracts-profile.schema.json) — Federal and state procurements, grants, and cooperative agreements. Adds solicitation and contract numbers, agency details, NAICS/PSC codes, set-asides, FAR/DFARS clauses, security clearances, data rights, audit access, export controls, reporting requirements, funding, and option periods.insurance-profile.schema.json) — Insurance policies and reinsurance agreements. Adds coverage details (limits, retentions, defense costs), premiums, policy periods, exclusions, conditions, reinsurance, brokers, and claims reporting.employment-profile.schema.json) — Employment agreements, offer letters, and independent contractor agreements. Adds employee information, compensation (salary, bonus, equity), benefits, termination provisions, restrictive covenants, and intellectual property assignment.supply-chain-profile.schema.json) — Procurement, distribution, logistics, and warehousing agreements. Adds product/service catalogs, pricing terms, delivery terms (Incoterms), warehousing, quality standards, inventory management, performance metrics, and compliance (conflict minerals, RoHS, REACH).ma-profile.schema.json) — Stock purchase, asset purchase, merger, and joint venture agreements. Adds transaction structure, earn-outs, representations and warranties, indemnification, conditions to closing, interim covenants, and post-closing adjustments.ip-licensing-profile.schema.json) — Patent, trademark, copyright, know-how, and technology license agreements. Adds licensed IP details, scope of grant, royalties, upfront payments, development diligence, prosecution/maintenance, enforcement, and grant-backs.Set the document's condicio field to the profile's schema URL, then validate against the profile schema:
condicio validate --schema schema/financial-profile.schema.json document.json
The Python package auto-detects the correct profile if the condicio field matches a known profile URL:
from condicio.validator import validate_document errors = validate_document(my_doc) # auto-selects profile
Any JSON Schema 2020-12 document can become a profile. The pattern is:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/my-profile.schema.json",
"type": "object",
"properties": {
"condicio": { "const": "https://example.com/my-profile.schema.json" },
"myField": { "type": "string" }
},
"allOf": [
{ "$ref": "https://raw.githubusercontent.com/docfide/condicio/main/schema/condicio.schema.json" }
],
"unevaluatedProperties": false
}
Ensure the profile $ref points to the base schema and unevaluatedProperties is set to false (not additionalProperties) for proper JSON Schema 2020-12 annotation collection.