Start with a small script
A command-line script is a convenient way to explore a decision without building a web interface. Install the official Python SDK and set TYPESAFE_API_KEY in your environment.
python -m pip install typesafe-sdkUse a supported Python version; the official quick start documents Python 3.10 or newer. Keep the key out of source files and shared notebooks.
Make one classification visible
The following original example asks which next step suits a short bug report. It uses the synchronous client and an explicit fallback category.
from typesafe_sdk import Choice, TypeSafeClient
with TypeSafeClient() as client:
response = client.system_one(
state={
"report": "Export stops with an error after I select the CSV option."
},
questions={
"next_step": Choice(
instructions="What is the best initial destination for this report?",
criteria={
"bug_triage": "A concrete failure in existing behavior.",
"feature_ideas": "A request for a new capability.",
"review": "The report needs more context before routing.",
},
)
},
)
answer = response.choices["next_step"]
print("Suggested route:", answer.choice)
print("Confidence:", answer.confidence)The synchronous client reference documents the full interface. This example follows that documented shape; it has not been executed against a live account by this publication.
Save enough context to evaluate
For a local experiment, keep the expected label next to the predicted one and record which model version answered. Review every disagreement, including examples where the model was uncertain but happened to choose the expected category.
Do not infer a good threshold from one convincing prediction. Use a separate set of examples to check how a proposed review policy behaves. Keep sensitive source documents out of logs unless their handling is explicitly part of your application's design.
Move to batches carefully
Before adding concurrency, understand your account limits and the client's retry behavior. The retry reference describes the SDK controls. Unbounded parallel requests can turn a small experiment into a queue of retries.
Make each item identifiable within your own application so a failed batch can resume without repeating completed work. If a request fails, preserve that failure state instead of fabricating a label.
Keep exact rules outside the model
File extensions, numeric thresholds and known permissions can often be checked directly. Use Jev for the semantic judgment that remains after those rules. This keeps the model's contribution small enough to evaluate and the rest of the program easy to reason about.
Next, explore the confidence guide and the document-routing case.