Skip to main content

Prometheux Chain

Description

Prometheux Chain is a Python SDK designed to help you create, evolve, and deploy ontologies with ease. The SDK offers the following capabilities:

  • Data Ingestion: Seamlessly integrate data from various sources, including databases and files.
  • Reasoning & Knowledge Augmentation: Perform logical reasoning to derive new insights and augment your existing knowledge base.
  • Explainability: Gain clear explanations of the results generated by the system.

For more information refer to the documentation

Features

  • Supports a wide range of data sources.
  • Built-in reasoning engine for deriving new knowledge.
  • Easy-to-understand explanations for enhanced interpretability.
  • Ready-to-use configurations for fast deployment.

Installation

Requirements

  • Python 3.9 or higher (Python 3.13 recommended)

Install Using pip

  1. Set Up a Virtual Environment (recommended):
python3 -m venv myenv
source myenv/bin/activate  # On Windows: myenv\Scripts\activate
  1. Install the SDK via pip:
pip install --upgrade prometheux-chain

Usage

This guide demonstrates how to get started with the Prometheux Chain SDK. The example below outlines a typical workflow, including creating an ontology, defining concept logic, and running concepts to generate results.

Workflow

Import the prometheux_chain

import prometheux_chain as px
import os

Define the PMTX_TOKEN environment variable for authentication

os.environ['PMTX_TOKEN'] = 'my_pmtx_token'

Configure the backend connection using your Prometheux account

px.config.set('JARVISPY_URL', "https://platform.prometheux.ai/jarvispy/'my_organization'/'my_username'")

Create a new ontology

ontology_id = px.save_ontology(ontology_name="test_ontology")

Define concept logic using Vadalog syntax and save it

definition = """
company("Apple", "Redwood City, CA").
company("Google", "Mountain View, CA").
company("Microsoft", "Redmond, WA").
company("Amazon", "Seattle, WA").
company("Facebook", "Menlo Park, CA").
company("Twitter", "San Francisco, CA").
company("LinkedIn", "Sunnyvale, CA").
company("Instagram", "Menlo Park, CA").

location(Location) :- company(_,Location).

@output("location").
"""
px.save_concept(ontology_id=ontology_id, definition=definition)

Run the concept to generate results

px.run_concept(ontology_id=ontology_id, concept_name="location")

Fetch the produced facts

results = px.fetch_results(ontology_id=ontology_id, output_predicate="location")

Domains

The SDK exposes a flat, function-based API (import prometheux_chain as px) covering the user-facing JarvisPy backend:

  • Ontologiessave_ontology, list_ontologies, load_ontology, copy_ontology, export_ontology / import_ontology, export_workspace / import_workspace, list_templates, import_template, create_ontology_from_context, create_snapshot, list_snapshots, restore_snapshot, delete_snapshot.
  • Data sourcesconnect_sources, list_sources, infer_schema, list_sheets, list_demo_sources, refresh_sources, preview_datasource, all_pairs_join, cleanup_sources.
  • Files (disk/)upload_file, list_files, make_directory, delete_files, move_file, download_file.
  • Conceptssave_concept, rename_concept, run_concept, run_concept_stream, list_concepts, reorder_concepts, fetch_results, search_results, llm_analysis, download_concept, generate_concept_description, get_concept_description, get_execution_status, get_execution_statuses, cleanup_concepts.
  • Knowledge graphsvisualize_concept_lineage, build_graph, list_graph_functions, run_graph_analytics.
  • Ontology schemasave_ontology_schema, load_ontology_schema, update_concept_ontology_schema_type, add_to_lineage, import_owl.
  • Knowledge / context layerlist_context_notes, create_context_note, create_context_notes_from_file, get_context_note, update_context_note, delete_context_note, search_context_notes, auto_seed, interview_template, submit_interview, onboarding_status, ontology_text.
  • Agentagent_chat (streaming), agent_reset.
  • Sharingcreate_share, revoke_share, update_share_role, list_shares, list_inbox, accept_share, leave_share, sync_inbox.
  • Appslist_all_apps, list_apps, get_app, save_app, delete_app.
  • Schedulescreate_policy, list_policies, get_policy, update_policy, delete_policy, trigger_policy, get_run_history.
  • Alertsget_alert_history, reprocess_alert.
  • Chat historylist_sessions, get_session, rename_session, delete_session.
  • Computecheck_compute_availability.
  • Users / accountsave_user_config, load_user_config, get_role, list_llm_models, get_usage_status, get_login_activity.
  • Auth / tokensissue_token, list_tokens, revoke_token, revoke_specific_token, revoke_all_tokens.
  • Vadalog authoringanalyze_program, build_bind, parse_binds, evaluate_program.
  • Vadalingo translationtranslate_nl_to_vadalog, translate_sql_to_vadalog, translate_rdf_to_vadalog, translate_owl_to_vadalog.

Optional configuration

Some recipient-side sharing flows require a Supabase token. Set it via the SUPABASE_TOKEN environment variable (or px.config) and it is attached automatically as the X-Supabase-Token header when present.

Streaming

A few endpoints stream results instead of returning a single response. These return Python generators you iterate over.

Chat with the Vadalog AI agent (NDJSON stream)

for event in px.agent_chat(ontology_id=ontology_id, message="What does this ontology do?"):
    if event.get("type") == "content":
        print(event["data"]["chunk"], end="")

Run a concept with live status updates (WebSocket stream)

WebSocket streaming requires the websocket-client dependency (installed automatically with the SDK).

for event in px.run_concept_stream(ontology_id=ontology_id, concept_name="location"):
    print(event.get("event"), event.get("data"))
    # iteration ends after the terminal "complete" or "error" event

Auto-seed the context layer from connected data sources (NDJSON stream)

for event in px.auto_seed(scope="project", scope_id=ontology_id):
    print(event)

Tokens

Issue and manage API tokens programmatically:

token = px.issue_token(name="ci-bot", expires_in_minutes=60)
print(token["token"])   # the raw JWT — shown only once
px.list_tokens()
px.revoke_specific_token(token["jti"])

For Maintainers

Releasing a New Version

Pushing a v* tag publishes to PyPI — see .github/workflows/publish.yml. Nothing is built from a laptop, so what customers install is always a commit that was merged and reviewed.

# 1. Bump the version. This is the only place it lives: setup.py stamps it into
#    the package metadata, and prometheux_chain.__version__ reads it back out.
echo "0.3.2" > version.txt

# 2. Commit it and get it onto main (via a PR, as usual)
git add version.txt
git commit -m "Release version 0.3.2"

# 3. Tag the merged commit and push the tag — this triggers the release
git checkout main && git pull
git tag v0.3.2
git push origin v0.3.2

The workflow refuses to publish if the tag and version.txt disagree, or if the tagged commit has not reached main. It then imports the package, builds, and uploads. A version already on PyPI fails the upload rather than being skipped quietly.

One-time PyPI setup. The workflow authenticates with trusted publishing rather than a stored API token, so it must be registered once by a PyPI owner of the project: prometheux-chain → Manage → Publishing → add a GitHub publisher with owner prometheuxresearch, repository prometheux-chain, workflow publish.yml, no environment. Until that exists the upload step fails with an OIDC error; nothing else in the workflow is affected.

deploy.sh predates this workflow and uploads straight from the working tree, bypassing every check above. Prefer the tag.


Access to Prometheux Backend

The Prometheux backend is required to use this SDK. To request access:

License

BSD 3-Clause License — see LICENSE file for details.

About Prometheux

Prometheux is an ontology native data engine that processes data anywhere it lives. Define ontologies once and unlock knowledge that spans databases, warehouses, and platforms—built on the Vadalog reasoning engine.

Key capabilities:

  • Connect: Query across Snowflake, Databricks, Neo4j, SQL, CSV, and more without ETL or vendor lock-in
  • Think: Replace 100+ lines of PySpark/SQL with simple declarative logic. Power graph analytics without GraphDBs
  • Explain: Full lineage & traceability with deterministic, repeatable results. Ground AI in structured, explainable context

Exponentially faster and simpler than traditional approaches. Learn more at prometheux.ai.

Support

For issues, questions, or access requests:

Related Projects

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prometheux_chain-0.3.2.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prometheux_chain-0.3.2-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file prometheux_chain-0.3.2.tar.gz.

File metadata

  • Download URL: prometheux_chain-0.3.2.tar.gz
  • Upload date:
  • Size: 36.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prometheux_chain-0.3.2.tar.gz
Algorithm Hash digest
SHA256 57cca36f3f4af57e1543ae9d0691dfbd155c881a34d80ced2b52d3018e0452e6
MD5 458377ed5a9a1c648cb76d7d727ab1c2
BLAKE2b-256 a4d413b33cd1c443b570a01f7517dbc93fee83bf0d216c634a49038f278978ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometheux_chain-0.3.2.tar.gz:

Publisher: publish.yml on prometheuxresearch/prometheux-chain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prometheux_chain-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for prometheux_chain-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 376482da89d82b5b516fd38ad2d37073e786f422ac38578d337da5ea9f362320
MD5 1507f20ac1689cc884a4ecb8d6928b74
BLAKE2b-256 88c480c8255cfc01e317ac1ceddd4aaa9ef13b364b685e9e9e2e2e67c8efdc96

See more details on using hashes here.

Provenance

The following attestation bundles were made for prometheux_chain-0.3.2-py3-none-any.whl:

Publisher: publish.yml on prometheuxresearch/prometheux-chain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.14

2 files

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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