Docs

How InsightContracts is put together

Configuration, the data it reads and the API behind every screen.

Getting started

How a deployment fits together

A Python (FastAPI) API, a React app and PostgreSQL. InsightContracts reads the company’s contract systems from a source schema and keeps its matters, clauses, findings, requests, decisions and agent runs in its own schema.

1

Connect the sources

Point CONTRACTS_SOURCE_SCHEMA at your intake requests, contract register and documents, or at views over them.

2

Write the playbook

Your positions per clause and contract type, as rows in playbook_positions, and the approval controls in Rules Studio.

3

Add people

Counsel, the General Counsel and administrators, through the identity service or your SSO.

Configuration

The settings that matter

Set in the environment of the API.

VariableWhat it sets
INSIGHT_DATABASE_URL, INSIGHT_DATABASE_SCHEMAPostgreSQL connection and the schema InsightContracts keeps its own work in (default contracts)
CONTRACTS_SOURCE_SCHEMAThe schema holding the company’s contract systems: intake requests, contracts, documents, amendments, counterparties, the playbook and the obligation log. Read only (default contracts_data)
AWS_REGIONThe region for the language model on Amazon Bedrock; with no model configured, the agents and the copilot run on their rules
CONTRACTS_AGENTS_LLM, CONTRACTS_AGENT_MODELWhether the agents use a language model (0 switches it off), and which
CONTRACTS_COPILOT_LLM, CONTRACTS_CLAUDE_MODELThe same for the copilot
CONTRACTS_AGENTS_MAX_LEVELThe autonomy ceiling for every agent in the tenant (L2 by default; sending, signing and approving stay a person’s whatever it says)
CONTRACTS_COMMS_LIVE, CONTRACTS_APP_URLWhether sending a request emails the counterparty (otherwise a dry run: the sender sends the message), and the address the counterparty’s link points to
CONTRACTS_CORS_ORIGINSThe web origins allowed to call the API
Data

What InsightContracts reads

The demo builds these tables for a fictional company; a deployment maps them to the company’s own systems.

Source tableWhat it holds
company_profile, peopleThe company, its contracting entity and its people
counterpartiesWho the company contracts with
intake_requestsWhat the business asked for: type, counterparty, paper, personal data, value, needed-by date
contracts, amendmentsThe contract register: every contract’s status, family (parent and children) and amendments
documentsDrafts, executed copies, exhibits and DPAs, as PDF or Word with their text
playbook_positionsThe playbook: preferred, fallback and walk-away rules and language, severity and approver per clause and contract type
obligation_logWhat the business has already recorded as done
API

Every screen is an API call

Authenticated with the session’s bearer token; the counterparty request page is the only public route.

AreaEndpoints (under /api/contracts)
Reference and intakeGET /reference, GET /intake, POST /matters, POST /matters/upload
MattersGET /matters, GET /matters/{id}, PUT /matters/{id}/owner, GET /matters/{id}/timeline, POST /matters/{id}/steps/{read|review}
Documents and versionsGET|POST /matters/{id}/documents, GET /documents/{id}, GET /documents/{id}/file, GET /matters/{id}/diff
Clauses and reviewGET /matters/{id}/clauses, GET /matters/{id}/findings, POST /findings/{id}, POST /matters/{id}/memo, GET /playbook
RequestsGET|POST /matters/{id}/requests, PUT /requests/{id}, POST /requests/{id}/send, POST /requests/{id}/cancel; the counterparty’s page uses GET|POST /api/public/request/{token}
Approval and signaturePOST /matters/{id}/submit, POST /matters/{id}/decide, GET /matters/{id}/decision, POST /matters/{id}/signed
Repository, renewals and obligationsGET /repository, POST /repository/sync, GET /repository/{contract}, POST /repository/{contract}/renewal, POST /repository/{contract}/renewal-review, POST /repository/{contract}/requests, GET /renewals, GET /obligations, POST /obligations/{id}, POST /obligations/{id}/owner
Agents (under /api/contracts_agents)POST /matters/{id}/run, POST /portfolio/run, GET /prepared, POST /prepared/{id}/answer, GET /autonomy, PUT /autonomy/{agent}/level, GET /activity, GET /metrics
Rules Studio and healthApproval controls under /api/contracts_rules; readiness at GET /api/ready

Questions about a deployment?

Tell us about your contract systems and we’ll map them to InsightContracts’ sources with you.

Request a demo