Use caseContract & legal ops

Agents that can answer as of the date of the dispute

A contract question is almost never about today. It is about what the agreement said, and who was authorised to sign it, on a date that has already passed.

01 What breaks

The current version cannot answer a historical question

Legal work is bi-temporal by nature and almost every document system is not. That mismatch is the whole failure.

01

An amendment is a new file, not a change

The executed agreement and its three amendments sit in the repository as four separate documents. Nothing records that clause 7.2 in one replaced clause 7.2 in another, so retrieval returns both and ranks them by wording.

02

Reconstruction is done by hand, every time

Asked what governed in November, someone opens four files and a signature page and works it out. The answer is correct, takes an hour, and is not written back anywhere — so the next person does it again.

03

Authority moves and the record does not

The signatory matrix is a spreadsheet with a last-modified date and no history. Who was empowered to sign in March is not recoverable from it, only from memory.

02 What it’s made of

Mostly valid time. Then three others.

Every application built on CortexDB is a different mixture of the same five memory jobs. That mixture is what makes this a different piece of software from the one next to it, even though the infrastructure underneath is identical.

Dominant · Valid time

Every memory carries when it was true and when you learned it

Two clocks. An amendment does not overwrite the clause it amends — it records that the earlier text stopped governing, and from when. That is what turns “as of 18 April” from a research task into a query.

  • Ask what governed on a date, not just what governs.
  • Revisions keep their provenance instead of replacing it.
  • Superseded text stops being returned as current.
Decision context

A lookalike clause is not this clause

Standard language appears in every contract you have. Selection weighs which agreement it belongs to, not how closely it matches.

Episodic memory

What was argued last time this came up

The position taken, the counterparty's response, and how it settled stay attached to the clause that caused it.

Shared memory

One record, both desks

The contracting agent and the litigation agent read the same history instead of maintaining two.

That is four of the five. The fifth — persistent memory, where an individual's preferences and corrections survive — leads for assistant and commerce agents instead. Same engine, different mixture.

03 What feeds it

Where the agreement actually lives

Rarely in one repository. The executed PDF, the amendment that changed it, the email where the extension was agreed, and the ticket where the exception was approved.

01 Wire the sources

Vendor connectors ship as extras on the connector package.

Install
pip install 'cortexdb-connectors[slack,notion]'

02 Write the amendment against what it supersedes

observed_at is the date the change took effect, not the date you indexed the file. That distinction is the entire product here.

Store an experience
curl -X POST http://localhost:3141/v1/experience \
  -H 'Content-Type: application/json' \
  -d '{
    "scope": "ws:legal/contracts",
    "modality": "observation",
    "content": {
      "kind": "text",
      "text": "Amendment 3 raised the clause 7.2 liability cap from 1x to 2x annual fees, effective on execution. Supersedes the cap in the executed MSA."
    },
    "context": { "observed_at": "2026-08-27T09:14:00Z" },
    "idempotency_key": "drive:msa-acme:amendment-3"
  }'

03 Recall what governed, with its provenance

Facts come back carrying the validity recorded alongside them, so the answer can name which instrument it relied on.

Recall it
from cortexdb.v1 import V1Client

client = V1Client(api_url="http://localhost:3141", actor="agent:contract-desk")

pack = client.recall(
    scope="ws:legal/contracts",
    query=counsel_question,
    view="holistic",
    include=["facts", "beliefs", "events"],
    budgets={"max_tokens": 1100},
)

reply = llm.respond(counsel_question, context=pack["context_block"])

pip install cortexdbai or npm i cortexdbai — both ship the same client. Full endpoint reference in the docs.

04 Where it runs

Privileged material does not belong in someone else's index

Contracts, positions, settlement history and the reasoning behind them. Much of it is privileged, and privilege is not a property that survives being embedded by a third-party API.

CortexDB is a single container. It runs on your own hardware, inside your VPC, or air-gapped — with the embedding and generation calls pointed at a local model if nothing may leave at all.

Run it
docker run -d --name cortexdb -p 3141:3141 -v cortexdb-data:/data cortexdb/cortexdb:latest

Deployment options, model routing and the enterprise notes are on the download page.

05 The rest
Try it

Bring the workflow that gets it wrong.

One command starts a local instance with its own volume. The changelog carries every release behind it.