Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · ContractPodAi API

Worlds / Legal

ContractPodAi API

A local ContractPodAi with a contract repository, extracted obligations, renewal dates and legal review queues. Test the agent that tracks renewals, assigns reviews and records obligations.

Base path
/api/v1
Auth
OAuth bearer token, the world key
Endpoints
14
Status
Active today

This reference previews the surface the ContractPodAi world serves in the closed beta. Paths mirror the public ContractPodAi API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_CONTRACTPODAI_URLThis world's origin followed by /api/v1
WORLDS_API_KEYThe world key, accepted wherever ContractPodAi expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_CONTRACTPODAI_URL;

const res = await fetch(base + "/api/v1/contracts?status=in_review&limit=20", {
  headers: {
    Authorization: "Bearer " + process.env.WORLDS_API_KEY,
  },
});

const { data } = await res.json();

API reference

Contracts

Agreements with counterparty, value, dates and status.

  • GET/api/v1/contractsList contracts
  • POST/api/v1/contractsCreate a contract
  • GET/api/v1/contracts/{id}Get a contract
  • PATCH/api/v1/contracts/{id}Update a contract
  • GET/api/v1/contracts/{id}/versionsList contract versions
Fields · 6
idstringContract id
titlestringTitle
typestringContract type
statusstringdraft, in_review, active or expired
counterpartyobjectOther party
end_datedateExpiry date

Counterparties

Companies and people you contract with.

  • GET/api/v1/counterpartiesList counterparties
  • POST/api/v1/counterpartiesCreate a counterparty
  • GET/api/v1/counterparties/{id}Get a counterparty
Fields · 4
idstringCounterparty id
namestringName
addressobjectAddress
contactsarrayContacts

Approvals

Review and approval steps on a contract.

  • GET/api/v1/contracts/{id}/approvalsList contract approvals
  • POST/api/v1/approvals/{id}/approveApprove
  • POST/api/v1/approvals/{id}/rejectReject
Fields · 5
idstringApproval id
contract_idstringContract
approverobjectAssigned approver
statusstringpending, approved or rejected
decided_atdatetimeDecision time

Obligations

Tracked commitments and renewal dates from a contract.

  • GET/api/v1/obligationsList obligations
  • POST/api/v1/obligationsCreate an obligation
  • PATCH/api/v1/obligations/{id}Update an obligation
Fields · 5
idstringObligation id
contract_idstringContract
descriptionstringWhat is owed
due_datedateDue date
statusstringopen, done or overdue

Test workflow

  1. Prepare. Select the ContractPodAi setup for your workflow and review its starting records, including contracts, counterparties, approvals.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Globex subscription flagged for renewal
  • Initech Realty lease still Active
  • Northwind audit obligation marked met
  • Umbrella quarterly report still open
  • No contract status changed

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · ContractPodAi
version: 2
connector: contractpodai
seed: contractpodai-starter
mode: isolated
policy: >
  Scan for renewals in the next 60 days and flag anything inside its notice
  window for the owner. Close obligations only where evidence is attached. Do
  not change contract status.
tasks:
  - id: flag-contracts-approaching-their-renewal-notice-date
    prompt: Flag contracts approaching their renewal notice date
  - id: assign-incoming-review-requests-to-the-right-counsel
    prompt: Assign incoming review requests to the right counsel
  - id: record-and-close-completed-obligations
    prompt: Record and close completed obligations
expected:
  - Globex subscription flagged for renewal
  - Initech Realty lease still Active
  - Northwind audit obligation marked met
  - Umbrella quarterly report still open
  - No contract status changed
scenarios:
  - rate-limited
  - token-expired
  - permission-denied

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
rate-limitedThe API returns 429 during a bulk renewal scan
token-expiredThe access token expires mid run
permission-deniedA contract outside the user's business unit returns 403
webhook-twiceThe contract updated event arrives two times

Starting data

Start each run from the same records and relationships. The overview below describes the ContractPodAi starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
contracts400 in the repository with type, counterparty and term
renewalsAuto-renew and fixed-term dates with notice periods
obligationsPayment, reporting and audit obligations with owners
review queue18 requests waiting for legal review
counsel5 reviewers with practice areas

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Contracts records

Contracts

Agreements with counterparty, value, dates and status.

FieldTypeMeaning / relationship
idstringContract id
titlestringTitle
typestringContract type
statusstringdraft, in_review, active or expired
counterpartyobjectOther party
end_datedateExpiry date
json · illustrative record shape
{
  "id": "<Contract id>",
  "title": "<Title>",
  "type": "<Contract type>",
  "status": "<draft, in_review, active or expired>",
  "counterparty": {},
  "end_date": "<Expiry date>"
}

See contracts operations

Counterparties records

Counterparties

Companies and people you contract with.

FieldTypeMeaning / relationship
idstringCounterparty id
namestringName
addressobjectAddress
contactsarrayContacts
json · illustrative record shape
{
  "id": "<Counterparty id>",
  "name": "<Name>",
  "address": {},
  "contacts": []
}

See counterparties operations

Approvals records

Approvals

Review and approval steps on a contract.

FieldTypeMeaning / relationship
idstringApproval id
contract_idstringContract
approverobjectAssigned approver
statusstringpending, approved or rejected
decided_atdatetimeDecision time
json · illustrative record shape
{
  "id": "<Approval id>",
  "contract_id": "<Contract>",
  "approver": {},
  "status": "<pending, approved or rejected>",
  "decided_at": "<Decision time>"
}

See approvals operations

Obligations records

Obligations

Tracked commitments and renewal dates from a contract.

FieldTypeMeaning / relationship
idstringObligation id
contract_idstringContract
descriptionstringWhat is owed
due_datedateDue date
statusstringopen, done or overdue
json · illustrative record shape
{
  "id": "<Obligation id>",
  "contract_id": "<Contract>",
  "description": "<What is owed>",
  "due_date": "<Due date>",
  "status": "<open, done or overdue>"
}

See obligations operations

See the ContractPodAi world in the catalog