← All ivy-agents
IVYXSTUDIO · IVY AGENT
C

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.

  1. 01
    Read the PDF
    ivy.node.pdf-text

    Extracts the text of a PDF file, page by page and as one text, with the page count.

    takes
    path from the agent's input
    returns
    page_count
    Ivy Node
  2. 02
    Rate the risk
    ivy.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
    state from step 1, text
    set
    instructions Choose between low, medium, or high risk for this contract.
    options ["low","medium","high"]
    secret
    jev_api_key the stored secret jev-api-key
    returns
    risk
    Ivy Node
  3. 03
    Does 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
    state from step 1, text
    set
    instructions Answer yes or no whether this contract renews automatically.
    secret
    jev_api_key the stored secret jev-api-key
    returns
    auto_renewal
    Ivy Node
  4. 04
    Compose the note

    Compose a Markdown note with the file name, risk level and auto-renewal answer.

    takes
    context.choice from step 2, choice
    context.answer from step 3, answer
    context.file from the agent's input, path
    returns
    summary
    Model turn
  5. 05
    Write the note
    ivy.node.file-write

    Writes text to a file, creating its folder, and returns the absolute path and the number of bytes written.

    takes
    text from step 4, output.summary
    set
    path reports/contract-risk.md
    overwrite true
    returns
    path
    Ivy Node

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.

Writes filesCalls a modelNetwork

What it needs

  • A stored secret named jev-api-key. The agent's file carries the name, never the value.

Inputs

FieldTypeDescription
pathrequiredstringThe contract PDF.

Outputs

FieldTypeDescription
riskstringlow, medium or high.
auto_renewalbooleanTrue when Jev says the contract renews automatically.
summarystringThe note that was written.
pathstringThe Markdown note written.
page_countintegerHow 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
    path data/contract.pdf
    expects
    page_count equals 2
    risk matches ^(low|medium|high)$
    summary matches contract\.pdf
    path matches reports/contract-risk\.md$
  • maintenance-agreement

    The maintenance agreement's note names contract-b.pdf.

    given
    path data/contract-b.pdf
    expects
    page_count equals 2
    risk matches ^(low|medium|high)$
    summary matches contract-b\.pdf