Skip to main content
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: Connect AI agents to your ontologies via Model Context Protocol
    • Local MCP Server (prometheux-mcp): For Claude Desktop with local installation
    • Remote MCP Server (px-remote-mcp-server): For any MCP client (Claude, Genie Code, and more) with OAuth
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
REST API conventionsBase URL, response envelope, scoping, pagination, errors
AuthenticationObtain, list, and revoke API tokens
ProjectsProject management, export/import, snapshots
ConceptsDefine, run, and read results from concepts
Data SourcesConnect data sources, infer schema, upload and preview data
Knowledge GraphBuild graphs and run graph analytics
VadalogAnalyze and evaluate Vadalog programs
VadalingoNL, SQL, RDF, and OWL to Vadalog translation
DashboardsDashboard CRUD
SchedulesAutomate concept runs
Context LayerManage and search the agent knowledge base
ConfigSDK configuration and LLM setup

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