Skip to main content

rpaframework-decision

Typed, calibrated decisions for RPA Framework robots, made by a decision model (a System One model) such as Jev or the open-weight Laya, instead of a generative LLM.

A decision model does not write text. You give it a state (the thing to look at) and a question with a closed set of answers, and it returns one of those answers plus a probability. That makes it fast (tens to hundreds of milliseconds), cheap, and easy to branch on from Robot Framework or Python.

Why in an RPA stack

Most of the branch points in a bot are closed questions:

  • routing work items (invoice / credit note / reminder / junk)

  • classifying failures (business exception vs. application exception)

  • guardrails before a side effect (is it safe to auto-reply to this email?)

  • deciding when to hand off to a human, with the confidence as the gate

RPA.Decision turns each of these into one keyword, records every call in an audit log, and keeps the backend swappable: hosted Jev today, local Laya when data must not leave the machine, a replayed log in CI.

Install

pip install rpaframework-decision          # hosted backends (Jev)
pip install rpaframework-decision[laya]    # + local open-weight Laya

Robot Framework

*** Settings ***
Library    RPA.Robocorp.Vault
Library    RPA.Decision    threshold=0.85    audit_log=output/decisions.jsonl

*** Tasks ***
Route a document
    ${secrets}=    Get Secret    TypeSafe
    Authorize To Jev    api_key=${secrets}[api_key]

    ${result}=    Decide    ${document_text}
    ...    question=What kind of document is this?
    ...    options=invoice=A request for payment,credit_note=A credit against an invoice,other
    Log    ${result.choice} with confidence ${result.confidence}

    ${safe}=    Check    ${email_body}
    ...    question=Is this a routine request that a template answers fully?
    ...    threshold=0.9
    IF    ${safe}    Send Template Reply

    TRY
        ${team}=    Decide Or Escalate    ${ticket}
        ...    question=Which team owns this ticket?
        ...    options=billing,technical,sales
    EXCEPT    LowConfidenceError*    type=glob
        Escalate To Human    ${ticket}
    END

Python

from RPA.Decision import Decision, LowConfidenceError

decide = Decision(backend="jev", api_key="...", threshold=0.85)
result = decide.decide(text, "What kind of document is this?", ["invoice", "other"])
print(result.choice, result.confidence, result.probabilities)

local = Decision(backend="laya", device="cpu")   # nothing leaves the machine
if local.check(email, "Does the sender ask for a refund?"):
    ...

Keywords

Decide

Pick one option; returns choice, confidence, probabilities

Decide Or Escalate

Same, but fails with LowConfidenceError below threshold

Check

Yes/no with a calibrated probability

Score

Position on an ordered rubric (2 - 10 levels)

Rank Options

All options ordered by probability

Ask Questions

Several questions about one state in a single call

Classify Items

Decide over a list of states

Require Confidence

Fail unless a result meets a threshold

Authorize To Jev

Use TypeSafe’s hosted model

Use Laya

Use the open-weight model locally

Set Decision Backend

Any backend, incl. replay and Python callables

Get/Save/Clear Decision Audit Log

Inspect or persist what was decided and why

What a decision model is not good at

Decision models are strong on recognition and weak on arithmetic and multi-step reasoning. Compute totals in Python; ask the model whether a document is an invoice, not whether its total is correct. Measure accuracy on your own data from the audit log before trusting a threshold.

Metadata

Release files for rpaframework-decision 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpaframework-decision 1.0.0
File Size Uploaded Provenance Actions
rpaframework_decision-1.0.0.tar.gz 171.0 kB With provenance Details for rpaframework_decision-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rpaframework-decision 1.0.0
File Interpreter ABI Platform Actions
rpaframework_decision-1.0.0-py3-none-any.whl Python 3 none any Details for rpaframework_decision-1.0.0-py3-none-any.whl

Total release size: 195.1 kB

Release files / rpaframework_decision-1.0.0.tar.gz

Download URL rpaframework_decision-1.0.0.tar.gz
Size 171.0 kB
Tags Source
SHA-256 checksum
How to use checksums
98ca3ba57faae0a40ce35372a82480082f089536ecc8b96f796adf3967e3809d
BLAKE2b-256 checksum
How to use checksums
64499f97d4cc6153deed9f38d7fda58e85efc59cfc345e16039e4a96dfee0331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / rpaframework_decision-1.0.0-py3-none-any.whl

Download URL rpaframework_decision-1.0.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f9491cdfe468fb4d348c3f281d9b4859ed8c5500e10013707c1ca6ed8def2cf
BLAKE2b-256 checksum
How to use checksums
bdd07768d9c6007aca8c8a8a46f2db0c7ec2548c2486a0678231dad8e1e8ed88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for rpaframework-decision 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rpaframework_decision-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page