Give every operation the right backend.
Use a decision model for bounded choices and scores. Use an LLM for source extraction and open-ended writing. Configure the backends independently.
Let Jev make the decisions. Let an LLM do the writing. Bring them together in a single Python workflow.
PYTHONCLIENT 3.10+ / RUNTIME 3.12+MIT
def annotate(anno):
kind = anno.choice(
"Classify this document.",
{"event": "A specific event",
"other": "Other content"},
).choice
summary = ""
if kind == "event":
summary = anno.generate(
"Summarize the event.",
max_length=100,
max_num_tokens=128,
).text
return {"kind": kind,
"summary": summary}{ "kind": …, "summary": … }AnnoScript/Programmable AI Annotation
ONE WORKFLOW. THE RIGHT MODEL FOR EACH STEP.Real data pipelines need more than a generated answer. They need decisions, source evidence, and a result your code can use.
Use a decision model for bounded choices and scores. Use an LLM for source extraction and open-ended writing. Configure the backends independently.
Write branches, loops, and constraints in Python. AnnoScript compiles the program and coordinates dependencies, batching, and conditional generation.
Inspect the IR before calling a model. During execution, trace physical requests and reported usage. Evaluate quality and cost on your own workload.
Try a real automotive annotation workflow. Jev handles classification; Qwen extracts evidence and generates text. Every field runs through AnnoScript.
Assign your output to result. Edit any part of the program, then run it.
Your Python runs in an isolated browser worker with the standard library and the real AnnoScript compiler/runtime. input_data is the JSON input; assign any JSON-compatible output to result. Use await run(function, input_data) for AnnoScript model workflows. Inside a AnnoScript function, the compiler supports its documented Python subset. A model session allows 120 seconds, 12 requests and 8,192 reserved output tokens. Stop terminates the worker. Provider keys stay on the server.
↳Edit and execute your Python program, or explore the complete automotive annotation example. Model outputs are predictions.
Install AnnoScript. Explore a plan offline. Connect your models when you’re ready to run.
The compiler and remote client also support Python 3.10+. Local inference needs both a Decision service and a Generation service.
pip install 'annoscript[server]'
python -m annoscript.inspect $(python -c "import annoscript_examples,pathlib; print(pathlib.Path(annoscript_examples.__file__).with_name('request.json'))")# Explore a compiled workflow. No API keys needed.
python -m annoscript.inspect $(python -c "import annoscript_examples,pathlib; print(pathlib.Path(annoscript_examples.__file__).with_name('request.json'))")# Create a local .credential file with ANNO_* settings.
# Set your Decision + Generation endpoints and keys.
python -m annoscript_examples.run --env-file .credential \
--mode speculativeEdit .credential with your provider endpoints, model names, and API keys. The saved synthetic example runs with the configured services.
The decisions are typed.
The possibilities are open.