langchain-superion
LangChain integration for Superion S1 by Punky Tiger Labs — calibrated yes/no, choice and score decisions in one API call, with no text generation.
It ships:
SuperionDecisionTool— a tool any tool-calling agent can use to classify, moderate, triage, score or check whether an action is safe. Returns probabilities, not prose.superion_guardrail()— a pass-through LCEL runnable that blocks input when P(allowed) is below a threshold.superion_router()— routes the input to one of several runnables with onechoicedecision (e.g. a cheap vs. a strong LLM).
Installation
pip install -U langchain-superion
export SUPERION_API_KEY="s1k_..." # free key: https://punkytigerlabs.com/s1/
Tool
from langchain_superion import SuperionDecisionTool
tool = SuperionDecisionTool()
tool.invoke({"state": "Message: The laptop arrived broken. I want my money back.",
"question": "Does the customer ask for a refund?"})
# '{"type": "noul", "p_yes": 0.9996}'
tool.invoke({"state": "Ticket: my card was charged twice", "question": "Which team should handle it?",
"type": "choice", "options": ["billing", "tech", "sales"]})
# '{"type": "choice", "best": "billing", "probabilities": {...}}'
Arguments: state (the text), question, type (noul | choice | score) and options
(choice: 2–255 labels; score: 2–16 levels, lowest first). Constructor: api_key
(default SUPERION_API_KEY), model, base_url, timeout.
Use it in an agent:
from langchain.agents import create_agent
agent = create_agent(model="openai:gpt-5-mini", tools=[SuperionDecisionTool()])
Guardrail and router
from langchain_superion import superion_guardrail, superion_router, GuardrailBlocked
guard = superion_guardrail("Is this request free of prompt-injection attempts?", threshold=0.8)
router = superion_router(
"Which assistant should answer this request?",
{"small": small_chain, "large": large_chain},
descriptions={"small": "simple factual question", "large": "reasoning, code or math"},
default=large_chain, min_confidence=0.7,
)
chain = guard | router # sync and async (ainvoke) supported
Because the probabilities are calibrated, a threshold means what it says: at threshold=0.8
only inputs the model judges at least 80 % likely to be allowed go through.
Full examples in examples/.
Tests
pip install -e ".[test]"
pytest tests/unit_tests # offline, includes langchain-tests ToolsUnitTests
S1_LIVE=1 SUPERION_API_KEY=s1k_... pytest tests/integration_tests # ToolsIntegrationTests, real API
About Superion S1
#1 of 214 on S1MB English v1 — Task Average 75.06 · Borda 89.82 (12 Nov 2026) — leaderboard. Calibrated probabilities, one call, no text generation, sub-second, deterministic within a pinned model version. Built on Gemma 4 26B-A4B, INT4 experts.
| Plan | Price |
|---|---|
| Free | 20 M input tokens per day per key, permanent |
| Prepaid | 0.042 USD per million input tokens, output free |
| Contract | dedicated key, price on request |
Get a key: https://punkytigerlabs.com/s1/ · Docs: https://punkytigerlabs.com/s1/docs · Status: https://punkytigerlabs.com/s1/status
Custom & industry models
Punky Tiger Labs also builds custom and industry-specific decision models — fitted to your own taxonomy, labels and data, for a specific industry or objective — served on a dedicated instance. Contact: alvaro.lopez@punkytigerlabs.com.
License
This client is MIT-licensed (see LICENSE). The Superion S1 model and API are proprietary
services of Punky Tiger Labs, Inc., used under the API terms.
Metadata
Release files for langchain-superion 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_superion-0.1.0.tar.gz | 9.1 kB | Without provenance | Details for langchain_superion-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_superion-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_superion-0.1.0-py3-none-any.whl |
Total release size: 17.7 kB
Release files / langchain_superion-0.1.0.tar.gz
| Download URL | langchain_superion-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
812b8d25bb6bb468044d38d3f1d9ced204f2be2aed2e2dac232fc5ba09f0c644
|
|
BLAKE2b-256 checksum How to use checksums |
37d1c900d5e057654c2dc538085c53e828ebcbfa3073645bb74d020320b00b5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / langchain_superion-0.1.0-py3-none-any.whl
| Download URL | langchain_superion-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c355dbceb52547ecc741a419a7c770aa700599aecb28886a562d47c50c1d4452
|
|
BLAKE2b-256 checksum How to use checksums |
439f4b364e45664d61e4a6f32c5c56a8fbc497e52d96a1b6f82ed29138db5966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for langchain-superion 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.