Skip to main content

STROT

The open decision system. Compile your intent once with an LLM. Then decide on every record forever — classification, scoring, routing — as type-safe JSON with probabilities, confidence, and a fitted statistical guarantee, on your own hardware, at zero marginal cost.

STROT = Agentic Schema Intent + Compiler Creation & State + Code + Execution + NLU
      ⟹ JSON Decisions (classification · scoring · routing)

Agents at compile time. Never at runtime.

pip install strot-ai

How it works

                    COMPILE (once per intent + schema)
  intent + sample ──▶ agent synthesizes config ──▶ golden gate ──▶ teacher labels
                                                   (your known      (LLM annotates
                                                    answers must     your real sample,
                                                    pass)            once)
                      ──▶ calibration fitted ──▶ frozen artifact (.py)
                          (temperature +
                           conformal threshold)

                    RUNTIME (every record, forever)
  record ──▶ projection ──▶ local decision model ──▶ conformal gate ──▶ typed JSON
             (compiled)     (144M, CPU, ~60ms)       (dispatch or        decision
                                                      abstain)

The LLM runs once, at compile time. Production is a frozen, self-contained Python artifact: a small local decision model arbitrates every record, nothing is ever generated, every output is bounded, and low-confidence records abstain instead of guessing.

Decide: typed questions over records

import strot

result = strot.decide(
    records,
    questions={
        "is_bug_report": {"type": "boolean",
            "instructions": "Does this mention malfunctions, errors, or crashes?"},
        "customer_sentiment": {"type": "score", "min": 1, "max": 5,
            "instructions": "1 is furious, 5 is delighted."},
        "routing_bucket": {"type": "choice",
            "options": ["billing_team", "engineering_team", "product_feedback", "spam"]},
    },
    llm="anthropic/claude-opus-4-8",   # used once, on cache miss only
)

result.outcomes[0]["decision"]
# {"booleans": {"is_bug_report": {"type": "boolean", "probability": 0.9998}},
#  "scores":   {"customer_sentiment": {"value": 1.79, "confidence": 0.899}},
#  "choices":  {"routing_bucket": {"selected": "engineering_team",
#               "probabilities": {...}, "confidence": 0.9992}}}

Run: route and dispatch, with a guarantee

result = strot.run(
    tickets,
    query="Triage incoming support tickets into the correct resolution workflow.",
    action_registry={
        "billing_dispute":  "Refunds, invoice corrections, double charges",
        "technical_defect": "Crashes, bugs, broken behavior",
        "account_lifecycle": "Deletion, data export, GDPR requests",
    },
    llm="anthropic/claude-opus-4-8",
    golden=[  # promotion gate: artifacts must pass your known answers
        {"record": {"body": "I was double charged"}, "expect": "billing_dispute"},
    ],
    target_risk=0.1,  # fitted guarantee: ≤10% of dispatched decisions wrong, or abstain
)

result.summary()
# {"processed": 13, "fallbacks": 1, "actions": {...}, "cache_hit": False, ...}

The first call compiles (seconds, cents). Every later call — and every restart sharing the state directory — is a cache hit: no LLM, no API key, pure execution.

Measured

Real model (SupersonicLabs/Julia-1, 144M, CPU), real datasets, clean Docker containers:

Metric Result
Grounded routing accuracy (398 records, ground truth) 92.5% compiled (74.8% naive — the compiler is worth +18pp on the same model)
Hand-tuned ceiling, same model 100%
Typed decisions vs the leading hosted decision API's own example near-identical (score 1.79 vs 1.8)
Calibrated dispatch (α=0.15, 14 records) 13 dispatched, all correct; 1 ambiguous record abstained under the guarantee
Latency ~60 ms/record, CPU, in-process
Marginal cost per decision $0
LLM calls per runtime record 0

Install

pip install strot-ai            # core: pure stdlib
pip install strot-ai[local]     # + torch/transformers for the local decision model
pip install strot-ai[hosted]    # + openai for a hosted decision runtime
pip install strot-ai[anthropic] # + anthropic for the synthesizer

The default local decision model (SupersonicLabs/Julia-1, Apache-2.0) ships its own inference package inside its Hugging Face repository. Bake it into your image at build time:

RUN pip install strot-ai[local] \
 && python -c "import strot; strot.prefetch_nlu(local_dir='/opt/julia-1', install=True)"
ENV STROT_NLU_CHECKPOINT=/opt/julia-1

After that, production runs fully offline. (Never pip install julia — that's an unrelated package.)

What makes it different

  • Compile once, decide forever — content-addressed artifact cache; schema drift automatically triggers exactly one recompile
  • Golden-record promotion — a candidate artifact is executed against your known answers inside the compile loop; only passing artifacts are ever served
  • Fitted guarantees — temperature scaling + split conformal prediction, fitted at compile time, baked into the artifact: dispatched decisions are wrong with probability ≤ α (marginal), everything else abstains
  • 0% structural hallucination — output is selection + computation over your registry; nothing is generated at runtime
  • Model-independent — the decision model is a slot (nlu=): local Julia-1 by default, hosted APIs, or any drop-in selector; the compiler, gates, and calibration keep their value across all of them
  • Every compile is logged (episodes.jsonl) — the dataset for future compile-policy training

Documentation

See DEVELOPERS.md for the developer guide: architecture, artifact anatomy, calibration semantics and caveats, deployment patterns, model swapping, and the API reference.

License

MIT. Default decision model: Apache-2.0 (SupersonicLabs/Julia-1). Implements ideas from STROT (arXiv:2505.01636).

Metadata

Release files for strot-ai 0.8.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 strot-ai 0.8.0
File Size Uploaded
strot_ai-0.8.0.tar.gz 34.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for strot-ai 0.8.0
File Interpreter ABI Platform
strot_ai-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 73.5 kB

Release files / strot_ai-0.8.0.tar.gz

Download URL strot_ai-0.8.0.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bdf2f766dedc31cfb54b8a302158a7a8fa9b3259fb6e27a0f3e29e058a2eba82
BLAKE2b-256 checksum
How to use checksums
d85b51dec663c771a4ef068a8cb0444edf308bd35a4497e5d1fbf0185821aaa7
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 Oct 13, 2026.

Transparency log

Release files / strot_ai-0.8.0-py3-none-any.whl

Download URL strot_ai-0.8.0-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35068d195572cec9194be30272eeaaef2a47af1c75aebc899cced1f3d25035ef
BLAKE2b-256 checksum
How to use checksums
c01edf984343f9be2db0b1e96376477a235b8ca88260d5739866687cf2c5e732
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 Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.1

2 release files

This release

0.8.0 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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