Skip to main content

Compliance

What it does

Compliance turns a regulatory or contractual framework into rules that can be checked, then judges your documents against them, rule by rule: pass, fail, not_applicable or unclear, each with a reason and a quote. Documents that belong together, such as a contract, its order and its declaration, can be judged as one set. It is for compliance, procurement and quality teams.

Add the app first. Compliance is a standard app (slug compliance). A workspace owner adds it in Apps: choose Create an App, then Add a standard app, then Add on its tile (or POST /v1/apps with slug compliance). Until it is added, its /v1 routes answer 404 and its agent tools do not appear. A switched-off app still answers reads and settings, but calls that start work answer 409; switch it on from the card menu in Apps or with POST /v1/apps/{id}/enable.

What you give it

  • Framework documents (a code of conduct, a regulation, a policy) already in your workspace.
  • The documents to check, alone or as document sets, and optionally rule sets that pick the rules that matter.

What you get

  • Rules per framework with an obligation (must, should, may), editable, and in force only while the framework is ON.
  • Verdicts per document or set, a worklist of failed checks, and an export as CSV or XLSX.
  • Discrepancy runs that find where a batch of documents states the same fact differently.

Run it in the app

  1. Open Apps → Compliance and add framework documents. Wait until the rules are ready, review them and turn the framework ON.
  2. Add documents to the Evaluations list, or create document sets, and evaluate.
  3. Work the failed checks, then export the verdicts.

Run it with the API

Main routes: POST /v1/compliance/frameworks/from-documents, GET /v1/compliance/frameworks, POST /v1/compliance/frameworks/{documentId}/active, POST /v1/compliance/evaluations, GET /v1/compliance/evaluations/documents/{documentId}, POST /v1/compliance/sets/evaluate, GET /v1/compliance/issues and GET /v1/compliance/export. Work runs in the background: POST routes answer with status: "processing"; poll the matching list.

Framework, ON, evaluate, worklist
curl -X POST "https://api.talonic.com/v1/compliance/frameworks/from-documents" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"document_ids": ["'$FRAMEWORK_DOCUMENT_ID'"]}'

curl -X POST "https://api.talonic.com/v1/compliance/frameworks/$FRAMEWORK_DOCUMENT_ID/active" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active": true}'

curl -X POST "https://api.talonic.com/v1/compliance/evaluations" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"document_ids": ["'$DOCUMENT_ID'"]}'
Node: the failed checks
const res = await fetch('https://api.talonic.com/v1/compliance/issues?unclear=true', {
  headers: { Authorization: `Bearer ${process.env.TALONIC_API_KEY}` },
});
const { data } = await res.json();
for (const doc of data) for (const r of doc.results) console.log(doc.filename, r.rule_code, r.verdict, r.reason);
Response: a failed check (abridged)
{
  "data": [{
    "filename": "supplier-contract.pdf",
    "set_id": null,
    "results": [{
      "framework_name": "Supplier Code of Conduct",
      "rule_code": "R-07",
      "verdict": "fail",
      "reason": "The contract allows 14 days for incident reports.",
      "quote": "Incidents are reported within 14 days of discovery."
    }]
  }]
}

Full reference: Compliance API.

Run it with an agent

Tools include talonic_compliance_list_frameworks, talonic_compliance_add_frameworks, talonic_compliance_framework_rules, talonic_compliance_generate_rules, talonic_compliance_set_framework_active, talonic_compliance_add_documents, talonic_compliance_evaluate, talonic_compliance_evaluate_all, talonic_compliance_evaluation_status, talonic_compliance_get_document_evaluation, talonic_compliance_create_set, talonic_compliance_evaluate_sets, talonic_compliance_issues, talonic_compliance_export and talonic_compliance_compare_documents. To let your own agent make the decisions, switch the decider with talonic_compliance_set_decider and work tasks with talonic_compliance_list_tasks, talonic_compliance_claim_task, talonic_compliance_heartbeat_task, talonic_compliance_submit_task and talonic_compliance_release_task. Example ask: "Which supplier contracts fail rule R-07, and what do they say instead?"

Limits and costs

Only a framework whose reading is complete can be turned ON. Regenerating a framework's rules replaces them, including rules a person edited. With your own agent as decider, Talonic checks every submitted answer: each rule answered once, with a reason and a quote that is in the text. Work an app does for you draws on the same credit balance as the rest of the platform; no separate per-app price is published. See Billing, credits and usage and rate limits.

Errors

Status codes

ParameterTypeDescription
401authMissing or invalid API key. Send `Authorization: Bearer $TALONIC_API_KEY`.
403authThe key lacks the scope (`read` for reads, `write` for writes), or the person behind it is below member for a write.
404not foundThe workspace has not added the app (the message names slug `compliance`), or the id does not exist in this workspace. Add the app, then retry.
409conflictThe app is switched off, so it starts no work. Switch it on in Apps or with `POST /v1/apps/{id}/enable`.
409conflictAlso returned when a task is held by another agent, already submitted, or its document is still being read. Claim it again later.
422validationNo framework is ON, the framework is not read yet, a set has no documents, or the document is itself a framework.

Next

Frequently asked questions

Why is a verdict unclear rather than failed?+
The document does not state enough to decide, often because the rule needs another document. Judge it on a document set that includes that document.
What happens to old verdicts when I edit a rule?+
Each evaluation keeps a copy of the rules it judged, so it still reads correctly. It is marked outdated so you know to evaluate again.
Can my own agent decide instead of Talonic?+
Yes. Switch the decider to external; each step is then offered as a task your agent claims, works and submits, and Talonic checks every answer before storing it.