Skip to main content

sparkient-edge

Local decisions from Sparkient edge bundles without a Sparkient API call after download.

Train a decision model on Sparkient, export an edge bundle, and run predictions in a compatible Python 3.10+ environment without a network call.

Status: sparkient-edge is beta software. Benchmark the complete bundle on the target hardware before relying on its latency or capacity in production.

Quick Start

pip install "sparkient-edge[all]"
from sparkient_edge import EdgePredictor

# Load a bundle exported from the Sparkient dashboard or API
predictor = EdgePredictor.from_bundle("my_decision_type.zip")

# Make a local decision — no network; measure latency on target hardware
result = predictor.predict({
    "amount": 750,
    "account_age_days": 45,
    "risk_score": 0.55,
})

print(result.decision)            # "review"
print(result.confidence)          # 0.9985
print(result.stage)               # "classifier"
print(result.class_probabilities) # {"approve": 0.0006, "review": 0.9985, "block": 0.0009}

How It Works

  1. Export an edge bundle from Sparkient (dashboard or GET /api/v1/decision-types/{id}/export)
  2. Load the bundle with EdgePredictor.from_bundle("path/to/bundle.zip")
  3. Predict with predictor.predict(your_input) — runs expression rules then compiled classifier locally

The bundle contains the compiled model, feature configuration, expression rules, metadata, and text-processing assets when applicable. Bundle size and local latency depend on the decision type, model, and target hardware.

Optional Dependencies

The quick start installs every runtime feature so exported rules cannot be skipped. Use the minimal base install only for rule-free bundles when you do not need MCP:

pip install "sparkient-edge[all]"    # Everything; recommended
pip install "sparkient-edge[rules]"  # Expression rule evaluation
pip install "sparkient-edge[mcp]"    # MCP only; use only with rule-free bundles
Extra Adds When needed
rules Rule engine Decision types with expression-based hard rules
mcp mcp Running as a local MCP server
all Both optional features Bundles with rules used through MCP

The base package includes ONNX Runtime, NumPy, and the tokenizer needed by exported text models. Compatible wheels must exist for the target Python version, operating system, and architecture.

MCP Server

Run as a local Model Context Protocol server for AI assistant integration:

pip install "sparkient-edge[all]"
sparkient-edge                    # Uses the CLI entry point
python -m sparkient_edge          # Or run as a module

Add to your MCP client config (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "sparkient-edge": {
      "command": "sparkient-edge",
      "args": []
    }
  }
}

EdgeDecision Fields

Field Type Description
decision str The chosen outcome (e.g., "approve")
confidence float Confidence score (0.0 to 1.0)
reason_codes list[str] Why this decision was made
stage str Which stage decided: "rules", "classifier", or "fallback"
class_probabilities dict[str, float] Probability for each option
rules_triggered list[str] Names of rules that fired

Limits

  • The package runs exported rules and classifiers only. It does not use Sparkient's optional cloud LLM escalation.
  • Bundle size, local latency, memory use, and throughput depend on the model and target hardware.
  • Training, retraining, and bundle export still use the Sparkient service. Edge export is available on Growth and Scale plans.
  • This Python package is not a native Android, iOS, microcontroller, or embedded-device SDK.
  • Local compute and the applicable Sparkient plan still have a cost; offline inference is not the same as free inference.

Metadata

Release files for sparkient-edge 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sparkient-edge 0.5.0
File Size Uploaded
sparkient_edge-0.5.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sparkient-edge 0.5.0
File Interpreter ABI Platform
sparkient_edge-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.3 kB

Release files / sparkient_edge-0.5.0.tar.gz

Download URL sparkient_edge-0.5.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ef6b7cd2d375fb19f3266b571cf255d0b2e85662b992c66e718cdcd31069aa0e
BLAKE2b-256 checksum
How to use checksums
ce13c6666f779ba398b6fc9dcdf71bf1aa4c0558338ecc8ff46bba0827a5d073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / sparkient_edge-0.5.0-py3-none-any.whl

Download URL sparkient_edge-0.5.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ea52b271f9dff15211234af19aac354dc85e477ba103c03575872ecbf789b33
BLAKE2b-256 checksum
How to use checksums
8500e3e9d9d6a197b34dfb84dc8ae755066644ab7ceab86ef8c5a164b14c8642
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.1.0

2 release 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