Skip to main content

sparkient-edge

Sub-10ms local decisions from Sparkient edge bundles — zero cloud dependencies.

Train your decision model on Sparkient, export an edge bundle, and run predictions locally with no network, no database, and no API calls.

Quick Start

pip install sparkient-edge
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 — sub-10ms, no network
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 everything needed: a compiled model, feature configuration, expression rules, metadata, and a text model for text processing (when applicable). Typical bundle size is 1–10 MB.

Optional Dependencies

The base install includes only onnxruntime and numpy. Install extras for additional features:

pip install sparkient-edge[all]    # Everything
pip install sparkient-edge[rules]  # Expression rule evaluation
pip install sparkient-edge[text]   # Text field processing (tokenizers)
pip install sparkient-edge[mcp]    # MCP server support
Extra Adds When needed
rules cel-expr-python Decision types with expression-based hard rules
text tokenizers Decision types with free-text input fields
mcp mcp Running as a local MCP server
all All of the above Recommended for full functionality

MCP Server

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

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

Links

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparkient_edge-0.4.0.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparkient_edge-0.4.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file sparkient_edge-0.4.0.tar.gz.

File metadata

  • Download URL: sparkient_edge-0.4.0.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sparkient_edge-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eafc818e3a642e09775d4a4fa5a6843bf7aac37e4e1c9c2dcd3150ac860d07ea
MD5 83f65f2c825b2c59947941f57123abe4
BLAKE2b-256 71254454393a7fa0835a86782ed6341962376d009719b6ba461512d3d5fd2b6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sparkient_edge-0.4.0.tar.gz:

Publisher: publish-edge.yml on peterdobson1001/FastDecision

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sparkient_edge-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: sparkient_edge-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sparkient_edge-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc5123eebca24122e4a59a1210ea1a44b116144474f57ebeff9f700152989f4
MD5 0326c3802b83187c150af03310baec5e
BLAKE2b-256 345e698e92585d9d55e27d996797d81f803a9c3830d7158032d595a8e36f04fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for sparkient_edge-0.4.0-py3-none-any.whl:

Publisher: publish-edge.yml on peterdobson1001/FastDecision

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page