SDKs
Use the engine from Python or the browser.
The SDKs wrap the same hosted API surface, with local execution available for fast iteration and product UX.
Python
pip install niyati-core
import niyati
session = niyati.NiyatiSession(schema_json, api_key="your_key")
remote = session.evaluate(budget=None, capability="full")
local = session.simulate_local()
JavaScript / WASM
npm install @causalorlabs/niyati-core
import init, { NiyatiSession } from "@causalorlabs/niyati-core";
await init();
const session = new NiyatiSession(schemaJson, "your_key", "https://api.causalorlabs.com");
const remote = await session.evaluate(null, "full");
const local = await session.simulate_local(null);
Versioning
| Surface | Current version |
|---|---|
X-Niyati-Version hosted API contract |
0.3.2 |
| Python SDK package | 0.3.5 |
| JavaScript / WASM SDK package | 0.3.5 |
Supported Solve Methods
| Method | Route |
|---|---|
solve_reachability(payload_json) |
/v1/solve/reachability |
solve_fragility(payload_json) |
/v1/solve/fragility |
solve_trajectory(payload_json) |
/v1/solve/trajectory |
solve_multiagent(payload_json) |
/v1/solve/multiagent |
solve_competition(payload_json) |
/v1/solve/competition |
solve_pareto(payload_json) |
/v1/solve/pareto |
Execution Model
- Hosted API is the production source of truth
- Local execution is capped for UX and iteration
- Hosted calls include timeout, retry, and version headers
simulatecan run anonymously; solve methods need a key
Developer ergonomics
Use simulate for exploration, then move to solve_*
methods when you need direct theorem surfaces in production demos.