Skip to main content

API Reference

The Prometheux platform provides multiple ways to interact with all platform features programmatically:

  • Python SDK (prometheux_chain): A high-level Python library for seamless integration
  • REST API: Direct HTTP endpoints for maximum flexibility and language-agnostic access
  • MCP Integration (prometheux-mcp): Connect AI agents like Claude to your knowledge graphs via Model Context Protocol

All interfaces provide equivalent functionality—choose the one that best fits your workflow.

Quick Start

Installation

pip install --upgrade prometheux_chain

Configuration

import prometheux_chain as px
import os

# Set your authentication token
os.environ['PMTX_TOKEN'] = 'YOUR_PMTX_TOKEN'

# Configure the backend URL
px.config.set('JARVISPY_URL', "https://api.prometheux.ai/jarvispy/{organization}/{username}")

First API Call

# Create a new project
project_id = px.save_project(project_name="my_first_project")
print(f"Created project: {project_id}")

Install into Jupyter

To manually install the library in your Jupyter Lab or Jupyter Notebook follow these steps:

  1. Create a new notebook with kernel Python and run the following commands in a dedicated cell

  2. Clone the repo

    !git clone https://github.com/prometheuxresearch/prometheux_chain.git
  3. Navigate into the project and install it

    !cd prometheux_chain && pip install -e .
  4. Copy the project into site-packages to allow importing and using it

    !cd prometheux_chain && cp -r prometheux_chain /opt/app-root/lib/python3.x/site-packages
  5. Restart the kernel

To update an existing installation of Prometheux Chain follow these steps:

  1. Uninstall the project

    !pip uninstall prometheux_chain -y
  2. Clone the repo if it is not present

    !git clone https://github.com/prometheuxresearch/prometheux_chain.git

    else update it to the latest changes

    !cd prometheux_chain && git pull
  3. Navigate into the project and install it

    !cd prometheux_chain && pip install -e .
  4. Remove an existing installation if present

    !rm -r /opt/app-root/lib/python3.x/site-packages/prometheux_chain
  5. Copy the project into site-packages to allow importing and using it

    !cd prometheux_chain && cp -r prometheux_chain /opt/app-root/lib/python3.x/site-packages
  6. Restart the kernel

Response Format

All REST API responses follow a consistent format:

{
"data": {}, // Response data (varies by endpoint)
"message": "string", // Human-readable message
"status": "success" // Status: "success" or "error"
}

The Python SDK automatically handles responses and returns the relevant data directly.

API Categories

The API is organized into the following categories:

CategoryDescription
ConfigSDK configuration and LLM setup
DataData connection and management
ProjectsProject management
ConceptsConcept execution and management
VadalogVadalog program evaluation
Rule InferenceSchema inference from data sources
ApplicationsAdvanced applications like Graph RAG

Error Handling

The SDK raises exceptions for errors:

import prometheux_chain as px

try:
result = px.run_concept(project_id="invalid_id", concept_name="test")
except Exception as e:
print(f"Error: {e}")

Requirements

Python SDK

  • Python 3.9 or higher
  • Install via pip: pip install prometheux_chain

REST API

  • Any HTTP client (curl, Postman, programming language HTTP libraries)
  • Valid JWT authentication token