Case Study
How Sella Delivers Scalable Credit Risk Explanations with Prometheux
Read More
Developers / SDKs

Build Your Product
on Prometheux

Python and TypeScript libraries for the application you are shipping. Your code owns the product. Prometheux runs the rules and returns the result, the same one on every run.

How it works

Call a Rule
from Your App

01

Install

pip install prometheux-chain or npm install @pmtx/chain.

02

Point it at your workspace

Set PMTX_TOKEN and JARVISPY_URL. The client reads them from the environment.

03

Call the rule

Run a concept that already exists, or send a Vadalog program your repository owns. Read the rows back.

04

Ship the product

The same calls run in a notebook, a service, a test suite or a browser app. The rule stays in Prometheux.

In your code

The Calls Your
Product Makes

Run a concept, read its output, stream the agent into your interface, or check a program in the test suite. The HTTP stays inside the library.

  • A rule you already have: run_concept executes it. fetch_results pages the output into your application.
  • A program in your repo: keep a .vada file next to the app and evaluate it on the Prometheux engine without saving it as a concept first.
  • The agent, in your UI: iterate the chat stream and render each event as it arrives.
# Python 3.9+
pip install --upgrade prometheux-chain

# TypeScript, Node.js 22+ or a browser
npm install @pmtx/chain
Calls from the Python and TypeScript SDK docs. `check_program` and `evaluate` run on your compute, so a machine must be up.
What you ship

Prometheux Behind
Your Interface

The library is how your product asks Prometheux a question it already knows how to answer. You do not rebuild the rule in application code.

Services and notebooks

Python functions for a backend, a job or a Jupyter notebook. Generators for runs and agent events that stream.

TypeScript, including the browser

Typed requests, responses and errors. ESM and CommonJS. An internal browser app can call Prometheux directly.

Tests for the rules you depend on

check_program compares a program's output with a CSV or a list. assert_ok() fails the pytest run when it changes.

The agent in your product

Stream tool calls and content into the interface you design. The facts still come from a rule.

What this means for you ⟶

When to use the API

Another language, or a pipeline that only needs HTTP? Use the API. The SDK is for the product you are writing.

Products teams ship

Your App,
Our Rules

Python

A service that returns a ruled answer

Your API receives the question, calls run_concept, and returns the result to the caller. The rule is not copied into the service.

Python SDK →
TypeScript

An internal app in the browser

The TypeScript client runs in the browser, so an internal tool can call the engine without an application server of its own.

TypeScript SDK →
Vadalog

Rules that live next to the app

Keep .vada files in the repository and evaluate them from the SDK. The engine runs them; the app reads the output.

SDK reference →
Agent

Your interface, the Prometheux agent

Stream the agent's events into a chat you designed. Tool calls, proposals and the answer arrive as they happen.

Python SDK →
FAQ

Questions,
Answered

SDK, API, CLI or MCP?

Use the SDK when you are writing the product in Python or TypeScript. Use the API from any other language, or from a pipeline. Use the CLI to export an ontology as files, test it and apply it. Use MCP when a model or agent does the asking.

Which languages and runtimes?

prometheux-chain supports Python 3.9 or newer. @pmtx/chain supports Node.js 22 or newer and modern browsers.

Can a public website call the SDK from the browser?

The TypeScript client runs in the browser, which suits an internal tool. A public app must not ship the token to visitors. Keep it on your server and follow the frontend guide.

Can I run Vadalog that lives in my repository?

Yes. evaluate_program in Python and vadalog.evaluate in TypeScript send a program to the engine without saving it as a concept. Saving it into an ontology is a separate call.

How do I test a rule from pytest?

check_program runs the program and compares each output with the rows you expect. assert_ok() raises when they differ. A machine must be running. The CLI's px test runs the same check from files and writes JUnit XML.

Do the libraries cover the platform?

Yes. Concepts, data sources, apps, schedules, context, sharing and the agent are methods on the client. The function reference lists them.

Are they open source?

Yes. prometheux-chain and prometheux-chain-ts are on GitHub, with runnable TypeScript examples.

Call a Rule
from Your App

Install the library, point it at your workspace and run a concept you already have.

We use some essential cookies to make this site work. By clicking "Accept All" you agree to the storing of cookies on your device to enhance site navigation, analyse site usage and assist our marketing efforts. For more detailed information see our Cookie Notice.

Accept AllDecline