Decido

September 17, 2026 · View on GitHub

Ask typed questions about evidence, keep every probability, and use the results in ordinary Python. Start with Jev or supply your own decision provider.

Decido adds validated distributions, batching, request budgets, ranking, and exportable decision records around a small provider contract. It also includes optional web crawling and local MCP tools.

Install

Python 3.11+:

pip install "decido[typesafe]"
export TYPESAFE_API_KEY="your-api-key"

Get a key from the TypeSafe console. Jev requests use your account and may incur charges. Environment setup

Make a decision

from decido import Choice, SyncSession
from decido.providers.typesafe import TypeSafeProvider

session = SyncSession(TypeSafeProvider()).start()
result = session.decide(
    state="Every API call fails after our signing-key rotation.",
    questions={
        "team": Choice(
            "Which team should handle this? Use unknown if the evidence is unclear.",
            ("billing", "technical", "unknown"),
            descriptions={
                "billing": "Charges, invoices, or subscriptions",
                "technical": "Broken software or integrations",
                "unknown": "The evidence does not establish a team",
            },
        ),
    },
)
answer = result.choice("team")
print(answer.choice)
print(dict(answer.distribution.probabilities))
session.close()

Add questions to the same call; the runtime batches them within the provider's limits. Use result.binary("id"), result.choice("id"), or result.ordinal("id") for typed answers. A context manager is also available for scripts.

Keep missing evidence separate from neutral evidence. “Margins were not reported” is unknown; “margins were unchanged” supports a neutral answer. Model probabilities are not automatically calibrated, and independent questions do not form a joint distribution.

Try it without a key

pip install decido
decido rank

This runs a bundled token-overlap example. The lexical provider exercises the API without network access; its scores are heuristics, not semantic judgments.

Use your own inputs

The CLI accepts JSON files or stdin:

decido decide --input request.json --provider typesafe
decido rank --input candidates.json --provider typesafe

JSON format · Local MCP setup

Examples to edit

Clone the repository to run these scripts:

  • Support routing: classify a request and send uncertain cases to review.
  • Document ranking: select useful documents with independent relevance probabilities.
  • Evidence factors: distinguish reported changes, unchanged conditions, and missing information.

Run the examples · Crawl toward a goal · Evaluate six labeled examples

Extend it

Implement the provider protocol, then pass your object to SyncSession or DecisionModel. Browser backends are separate and optional.

Custom provider example · Provider contract · API usage and records · Contributing

Alpha release under the MIT license. The API may change before 1.0. Tests verify contracts and mechanics; no model-quality or financial-performance advantage is claimed.