Vadalog API
The Vadalog API exposes JarvisPy routes for analyzing programs, managing bind annotations, and evaluating logic against the Vadalog engine.
Python SDK: There are no dedicated Vadalog helpers in prometheux_chain. Call these endpoints with your HTTP client (for example httpx or requests) against your JarvisPy base URL, with a valid JWT.
Analyze Program
Inspect a Vadalog program without executing it. Returns predicate structure derived from the parser.
HTTP: POST /api/v1/vadalog/analyze
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
program | string | Yes | Vadalog program source |
conceptType | string | No | When "sql", program is treated as SQL (use with conceptName) |
conceptName | string | No | Concept / output predicate name when using SQL mode |
Response (data)
| Field | Description |
|---|---|
headPredicates | Head predicates in the program |
inputPredicates | Input predicates |
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/analyze" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"program": "@input(\"products\").\n@output(\"expensive_products\").\nexpensive_products(Product, Price) <- products(Product, Price), Price > 100."
}'
Example shape of data:
{
"headPredicates": ["expensive_products"],
"inputPredicates": ["products"]
}
Parse Binds
Parse @bind / @qbind annotations from a program and separate rule code from datasource bindings.
HTTP: POST /api/v1/vadalog/parse-binds
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
program | string | Yes | Full Vadalog source including annotations |
outputPredicate | string | No | Extra predicate name to treat as output when classifying binds |
Response (data)
| Field | Description |
|---|---|
code | Program text without annotation lines |
binds | { "input": [...], "output": [...] } — each entry includes predicate, annotation, and parsed fields when available |
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/parse-binds" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"program": "@bind(\"data\",\"csv useHeaders=true\",\"/tmp\",\"test.csv\").\nresult(X) <- data(X).\n@output(\"result\").",
"outputPredicate": "result"
}'
Build Bind
Rewrite an existing bind annotation for a new predicate name. When isOutput is true, the output target (e.g. CSV filename or query name) is updated for output usage.
HTTP: POST /api/v1/vadalog/build-bind
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
bindAnnotation | string | Yes | Full @bind(...) or @qbind(...) annotation |
predicateName | string | Yes | New predicate name |
isOutput | boolean | No | Default false. If true, adjust output table/query naming |
Response (data)
| Field | Description |
|---|---|
annotation | Updated annotation string |
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/build-bind" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"bindAnnotation": "@bind(\"old_pred\",\"csv useHeaders=true\",\"/tmp\",\"data.csv\").",
"predicateName": "new_pred",
"isOutput": false
}'
Evaluate Program
Run a Vadalog program with optional parameters and compute hints. JarvisPy parses the program and delegates execution to the engine (local or configured compute).
- Python SDK
- REST API
Not available in SDK — use REST API directly.
There is no evaluate_vadalog (or similar) in the Python SDK. Use POST /api/v1/vadalog/evaluate with requests, httpx, or another HTTP client.
HTTP Request
POST /api/v1/vadalog/evaluate
Body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
program | string | Yes | Vadalog program source |
params | object | No | Parameter map passed to evaluation (default {}) |
compute | object | No | Optional compute overrides (resolved with the authenticated user's compute configuration) |
cURL Example
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/evaluate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"program": "@input(\"products\").\n@output(\"expensive_products\").\nexpensive_products(Product, Price) <- products(Product, Price), Price > ?threshold.",
"params": {
"threshold": 100
}
}'
Response
Successful responses use the standard JarvisPy envelope: status, message, and data. The data field contains the evaluation payload returned by the Vadalog client (structure depends on the program and engine).
{
"data": {},
"message": "Vadalog program evaluated successfully",
"status": "success"
}
Evaluate with parameters (engine proxy)
Proxy to the Vadalog engine's evaluateWithParams endpoint. Uses multipart form data (application/x-www-form-urlencoded / multipart/form-data), not JSON.
HTTP: POST /api/v1/vadalog/evaluateWithParams
| Input | Description |
|---|---|
Form: program | Required. Vadalog program text |
Query: measureElapsedTime | Optional. Default false |
JarvisPy forwards program and measureElapsedTime to the engine and supplies empty default params and databricksConfigs in the proxied request.
The response body is whatever the engine returns (not necessarily the same envelope as POST /evaluate).
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/evaluateWithParams?measureElapsedTime=false" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
--form-string 'program=@input("x").@output("y").y(1).'
Stop Evaluation
Signals the engine to stop the current evaluation and breaks any in-flight wait on the JarvisPy side.
HTTP: GET /api/v1/vadalog/stop
curl -X GET "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/stop" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Get Engine Status
Lightweight JarvisPy health-style check for the evaluation service (not per-execution polling).
HTTP: GET /api/v1/vadalog/status
Response (data)
| Field | Description |
|---|---|
status | Service readiness indicator (e.g. "ready") |
timestamp | ISO timestamp |
curl -X GET "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/status" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example:
{
"data": {
"status": "ready",
"timestamp": "2026-03-30T12:00:00.000000"
},
"message": "Evaluation service status retrieved successfully",
"status": "success"
}
Complete Workflow Example
REST-only flow: analyze structure, optionally parse binds, then evaluate.
# 1. Analyze structure
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/analyze" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{"program": "@input(\"products\").\n@output(\"expensive_products\").\nexpensive_products(Product, Price) <- products(Product, Price), Price > ?threshold."}'
# 2. Parse binds (skip if the program has no @bind / @qbind)
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/parse-binds" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{"program": "@input(\"products\").\n@output(\"expensive_products\").\nexpensive_products(Product, Price) <- products(Product, Price), Price > ?threshold.", "outputPredicate": "expensive_products"}'
# 3. Evaluate with parameters
curl -X POST "https://api.prometheux.ai/jarvispy/my-org/my-user/api/v1/vadalog/evaluate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{"program": "@input(\"products\").\n@output(\"expensive_products\").\nexpensive_products(Product, Price) <- products(Product, Price), Price > ?threshold.", "params": {"threshold": 100}}'
Replace YOUR_JWT_TOKEN and the org/user path with your values.