Contract Risk Triage
ivy.agent.contract-risk-triage · v1.1.0
ivyx
Reads a contract PDF, has Jev rate its risk and say whether it renews automatically, and writes a short Markdown note.
Steps
In the order the agent's file lists them, each with where its inputs come from and the values the file fixes. A branch or a loop is a step too.
- 01Ivy NodeRead the PDFivy.node.pdf-text
Extracts the text of a PDF file, page by page and as one text, with the page count.
- takes
pathfrom the agent's input- returns
page_count
- 02Ivy NodeRate the riskivy.node.jev-choice
Asks TypeSafe Jev which of the given options fits a text or JSON state and returns the chosen option with its confidence and the probability of every option.
- takes
statefrom step 1,text- set
instructionsChoose between low, medium, or high risk for this contract.options["low","medium","high"]- secret
jev_api_keythe stored secret jev-api-key- returns
risk
- 03Ivy NodeDoes it renew automatically?ivy.node.jev-noul
Asks TypeSafe Jev a yes-or-no question about a text or JSON state and returns noul, the probability that the answer is yes, with answer true when it reaches the threshold.
- takes
statefrom step 1,text- set
instructionsAnswer yes or no whether this contract renews automatically.- secret
jev_api_keythe stored secret jev-api-key- returns
auto_renewal
- 04Model turnCompose the note
Compose a Markdown note with the file name, risk level and auto-renewal answer.
- takes
context.choicefrom step 2,choicecontext.answerfrom step 3,answercontext.filefrom the agent's input,path- returns
summary
- 05Ivy NodeWrite the noteivy.node.file-write
Writes text to a file, creating its folder, and returns the absolute path and the number of bytes written.
- takes
textfrom step 4,output.summary- set
pathreports/contract-risk.mdoverwritetrue- returns
path
Nodes it brings
Adding this agent in IVYX Studio adds these nodes with it. A node your workspace already has is kept as it is, even at another version.
What it touches
Collected from what each of its nodes declares and what the agent's own file declares, such as moving a robot, plus the model call when a step is a model turn. A declaration is the author's statement, and it is what policy rules select on.
What it needs
- A stored secret named
jev-api-key. The agent's file carries the name, never the value.
Inputs
| Field | Type | Description |
|---|---|---|
| pathrequired | string | The contract PDF. |
Outputs
| Field | Type | Description |
|---|---|---|
| risk | string | low, medium or high. |
| auto_renewal | boolean | True when Jev says the contract renews automatically. |
| summary | string | The note that was written. |
| path | string | The Markdown note written. |
| page_count | integer | How many pages the PDF has. |
Tests
2 of 2 test cases passed on Oct 7, 2026, in the publisher's own environment, before this version was published. The registry keeps that record; it does not run the cases again.
Requires: python:3.9, the stored secret jev-api-key, a model core
- service-agreement
The service agreement's note names contract.pdf and is written to reports/contract-risk.md.
- given
pathdata/contract.pdf- expects
page_countequals 2riskmatches ^(low|medium|high)$summarymatches contract\.pdfpathmatches reports/contract-risk\.md$
- maintenance-agreement
The maintenance agreement's note names contract-b.pdf.
- given
pathdata/contract-b.pdf- expects
page_countequals 2riskmatches ^(low|medium|high)$summarymatches contract-b\.pdf